示例#1
0
 public SymbolTable Analyse(AstRoot ast)
 {
     SymbolTable retTable = new SymbolTable ();
     RootAnalyser visitor = new RootAnalyser (errorLog, retTable);
     ast.Visit (visitor);
     return retTable;
 }
示例#2
0
        public SymbolTable Analyse(AstRoot ast)
        {
            SymbolTable  retTable = new SymbolTable();
            RootAnalyser visitor  = new RootAnalyser(errorLog, retTable);

            ast.Visit(visitor);
            return(retTable);
        }
示例#3
0
 public IodineModule CompileAst(IodineModule module, AstRoot ast)
 {
     ModuleCompiler compiler = new ModuleCompiler (errorLog, symbolTable, module);
     ast.Visit (compiler);
     module.Initializer.FinalizeLabels ();
     optimizeObject (module);
     return module;
 }
示例#4
0
        public IodineModule Compile(string moduleName)
        {
            IodineModule module = new IodineModule(moduleName);

            ModuleCompiler compiler = new ModuleCompiler(symbolTable, module);

            root.Visit(compiler);
            module.Initializer.FinalizeLabels();
            if (context.ShouldOptimize)
            {
                OptimizeObject(module);
            }
            return(module);
        }