コード例 #1
0
ファイル: Parser.cs プロジェクト: PhilipBrockmeyer/Wren
        public ParseTree Parse()
        {
            ParseTree tree = new ParseTree();
            ParseStatementList(tree.Statements);

            return tree;
        }
コード例 #2
0
ファイル: Compiler.cs プロジェクト: PhilipBrockmeyer/Wren
 public Compiler(ParseTree tree)
 {
     _tree = tree;
     _symbols = new SymbolTable();
     var instructionScanner = new InstructionScanner(ExpressionRegistryHelper.Default);
     _instructions = instructionScanner.BuildInstructionInfo(typeof(InstructionInfo).Assembly.GetTypes());
     _machineCode = new List<String>();
 }