public LuaInstrCreateGen(GeneratorContext generatorContext) : base(generatorContext.Types) { this.generatorContext = generatorContext; idConverter = LuaIdentifierConverter.Create(); rustIdConverter = RustIdentifierConverter.Create(); docWriter = new LuaDocCommentWriter(idConverter, TargetLanguage.Rust); sb = new StringBuilder(); }
public LuaEnumsGenerator(GeneratorContext generatorContext) : base(generatorContext.Types) { luaIdConverter = LuaIdentifierConverter.Create(); rustIdConverter = RustIdentifierConverter.Create(); rustDocWriter = new Documentation.Rust.RustDocCommentWriter(rustIdConverter); var dirs = generatorContext.Types.Dirs; toFullFileInfo = new(); toFullFileInfo.Add(TypeIds.BlockEncoderOptions, new FullEnumFileInfo(dirs.GetLuaFilename("BlockEncoderOptions.lua"))); toFullFileInfo.Add(TypeIds.CC_a, new FullEnumFileInfo(dirs.GetLuaFilename("CC_a.lua"))); toFullFileInfo.Add(TypeIds.CC_ae, new FullEnumFileInfo(dirs.GetLuaFilename("CC_ae.lua"))); toFullFileInfo.Add(TypeIds.CC_b, new FullEnumFileInfo(dirs.GetLuaFilename("CC_b.lua"))); toFullFileInfo.Add(TypeIds.CC_be, new FullEnumFileInfo(dirs.GetLuaFilename("CC_be.lua"))); toFullFileInfo.Add(TypeIds.CC_e, new FullEnumFileInfo(dirs.GetLuaFilename("CC_e.lua"))); toFullFileInfo.Add(TypeIds.CC_g, new FullEnumFileInfo(dirs.GetLuaFilename("CC_g.lua"))); toFullFileInfo.Add(TypeIds.CC_ge, new FullEnumFileInfo(dirs.GetLuaFilename("CC_ge.lua"))); toFullFileInfo.Add(TypeIds.CC_l, new FullEnumFileInfo(dirs.GetLuaFilename("CC_l.lua"))); toFullFileInfo.Add(TypeIds.CC_le, new FullEnumFileInfo(dirs.GetLuaFilename("CC_le.lua"))); toFullFileInfo.Add(TypeIds.CC_ne, new FullEnumFileInfo(dirs.GetLuaFilename("CC_ne.lua"))); toFullFileInfo.Add(TypeIds.CC_np, new FullEnumFileInfo(dirs.GetLuaFilename("CC_np.lua"))); toFullFileInfo.Add(TypeIds.CC_p, new FullEnumFileInfo(dirs.GetLuaFilename("CC_p.lua"))); toFullFileInfo.Add(TypeIds.Code, new FullEnumFileInfo(dirs.GetLuaFilename("Code.lua"))); toFullFileInfo.Add(TypeIds.CodeSize, new FullEnumFileInfo(dirs.GetLuaFilename("CodeSize.lua"))); toFullFileInfo.Add(TypeIds.ConditionCode, new FullEnumFileInfo(dirs.GetLuaFilename("ConditionCode.lua"))); toFullFileInfo.Add(TypeIds.CpuidFeature, new FullEnumFileInfo(dirs.GetLuaFilename("CpuidFeature.lua"))); toFullFileInfo.Add(TypeIds.DecoderError, new FullEnumFileInfo(dirs.GetLuaFilename("DecoderError.lua"))); toFullFileInfo.Add(TypeIds.DecoderOptions, new FullEnumFileInfo(dirs.GetLuaFilename("DecoderOptions.lua"))); toFullFileInfo.Add(TypeIds.EncodingKind, new FullEnumFileInfo(dirs.GetLuaFilename("EncodingKind.lua"))); toFullFileInfo.Add(TypeIds.FlowControl, new FullEnumFileInfo(dirs.GetLuaFilename("FlowControl.lua"))); toFullFileInfo.Add(TypeIds.FormatMnemonicOptions, new FullEnumFileInfo(dirs.GetLuaFilename("FormatMnemonicOptions.lua"))); toFullFileInfo.Add(TypeIds.MandatoryPrefix, new FullEnumFileInfo(dirs.GetLuaFilename("MandatoryPrefix.lua"))); toFullFileInfo.Add(TypeIds.MemorySize, new FullEnumFileInfo(dirs.GetLuaFilename("MemorySize.lua"))); toFullFileInfo.Add(TypeIds.MemorySizeOptions, new FullEnumFileInfo(dirs.GetLuaFilename("MemorySizeOptions.lua"))); toFullFileInfo.Add(TypeIds.Mnemonic, new FullEnumFileInfo(dirs.GetLuaFilename("Mnemonic.lua"))); toFullFileInfo.Add(TypeIds.OpAccess, new FullEnumFileInfo(dirs.GetLuaFilename("OpAccess.lua"))); toFullFileInfo.Add(TypeIds.OpCodeOperandKind, new FullEnumFileInfo(dirs.GetLuaFilename("OpCodeOperandKind.lua"))); toFullFileInfo.Add(TypeIds.MvexEHBit, new FullEnumFileInfo(dirs.GetLuaFilename("MvexEHBit.lua"))); toFullFileInfo.Add(TypeIds.OpCodeTableKind, new FullEnumFileInfo(dirs.GetLuaFilename("OpCodeTableKind.lua"))); toFullFileInfo.Add(TypeIds.OpKind, new FullEnumFileInfo(dirs.GetLuaFilename("OpKind.lua"))); toFullFileInfo.Add(TypeIds.Register, new FullEnumFileInfo(dirs.GetLuaFilename("Register.lua"))); toFullFileInfo.Add(TypeIds.RepPrefixKind, new FullEnumFileInfo(dirs.GetLuaFilename("RepPrefixKind.lua"))); toFullFileInfo.Add(TypeIds.RflagsBits, new FullEnumFileInfo(dirs.GetLuaFilename("RflagsBits.lua"))); toFullFileInfo.Add(TypeIds.RoundingControl, new FullEnumFileInfo(dirs.GetLuaFilename("RoundingControl.lua"))); toFullFileInfo.Add(TypeIds.TupleType, new FullEnumFileInfo(dirs.GetLuaFilename("TupleType.lua"))); toFullFileInfo.Add(TypeIds.FormatterSyntax, new FullEnumFileInfo(dirs.GetLuaFilename("FormatterSyntax.lua"))); toFullFileInfo.Add(TypeIds.MvexConvFn, new FullEnumFileInfo(dirs.GetLuaFilename("MvexConvFn.lua"))); toFullFileInfo.Add(TypeIds.MvexRegMemConv, new FullEnumFileInfo(dirs.GetLuaFilename("MvexRegMemConv.lua"))); toFullFileInfo.Add(TypeIds.MvexTupleTypeLutKind, new FullEnumFileInfo(dirs.GetLuaFilename("MvexTupleTypeLutKind.lua"))); toPartialFileInfo = new(); toPartialFileInfo.Add(TypeIds.FormatterSyntax, new PartialEnumFileInfo("FormatterSyntax", TargetLanguage.Rust, dirs.GetLuaRustFilename("fmt.rs"))); }
public LuaDocGen(GeneratorContext generatorContext) { genTypes = generatorContext.Types; idConverter = LuaIdentifierConverter.Create(); }