Ejemplo n.º 1
0
        private AbstractStatementNode ParseBlockStatement()
        {
            _symbolTable.EnterScope();
            var list = new List <AbstractStatementNode> ();

            _scanner.ExpectToken('{');                // "{ expected for block statement" )

            for ( ; ;)
            {
                if (_scanner.IfToken('}'))
                {
                    _symbolTable.ExitScope();
                    return(new BlockStatement(list));
                }

                var stmt = ParseStatement();
                list.Add(stmt);
            }
        }