Exemplo n.º 1
0
        public RootTree Parse()
        {
            //AST Root Node
            Advance();
            _rootTree = new RootTree(_curToken);
            int length = _tokens.Count;

            Advance();
            do
            {
                BaseTree tree = expr();
                if (tree != null)
                {
                    _rootTree.Bodys.Add(tree);
                }
            } while (this._index < length && this._curToken.type != TokenType.END);
            return(_rootTree);
        }
Exemplo n.º 2
0
 public TSCompile(RootTree rootTree)
 {
     _rootTree = rootTree;
 }