Esempio n. 1
0
        public string GetCodeForStructDeclaration(string structName)
        {
            TranspilerContext ctx = this.GetTranspilerContext();

            this.Transpiler.GenerateCodeForStructDeclaration(ctx, structName);
            return(ctx.FlushAndClearBuffer());
        }
Esempio n. 2
0
        public string GetStringConstantTable()
        {
            TranspilerContext ctx = this.GetTranspilerContext();

            this.Transpiler.GenerateCodeForStringTable(ctx, ctx.StringTableBuilder);
            return(ctx.FlushAndClearBuffer());
        }
Esempio n. 3
0
        public string GetCodeForGlobals()
        {
            TranspilerContext ctx = this.GetTranspilerContext();

            this.Transpiler.GenerateCodeForGlobalsDefinitions(ctx, this.compiler.GetGlobalsDefinitions());
            return(ctx.FlushAndClearBuffer());
        }
Esempio n. 4
0
        public Dictionary <string, string> GetCodeForStructs()
        {
            TranspilerContext           ctx    = this.GetTranspilerContext();
            Dictionary <string, string> output = new Dictionary <string, string>();

            foreach (StructDefinition sd in this.GetCompiler().GetStructDefinitions())
            {
                this.Transpiler.GenerateCodeForStruct(ctx, sd);
                output[sd.NameToken.Value] = ctx.FlushAndClearBuffer();
            }
            return(output);
        }
Esempio n. 5
0
        public Dictionary <string, string> GetCodeForClasses()
        {
            TranspilerContext           ctx    = this.GetTranspilerContext();
            Dictionary <string, string> output = new Dictionary <string, string>();

            foreach (ClassDefinition cd in this.GetCompiler().GetClassDefinitions())
            {
                this.Transpiler.GenerateCodeForClass(ctx, cd);
                output[cd.NameToken.Value] = ctx.FlushAndClearBuffer();
            }
            return(output);
        }