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

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

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

            this.Transpiler.GenerateCodeForGlobalsDefinitions(ctx, this.compiler.GetGlobalsDefinitions());
            return(ctx.FlushAndClearBuffer());
        }
Exemplo 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);
        }
Exemplo 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);
        }