private BlockStatementNode parseBlockStatement() {
            if (lexicalUnit != LexicalUnit.OpenBrace) {
                throw error(ParseErrorId.OpenBraceExpected);
            }
            var result = new BlockStatementNode { StartPosition = scanner.StartPosition };
            setScannerState(result);
            nextLexicalUnit(true);
            while (lexicalUnit != LexicalUnit.CloseBrace) {
                result.Statements.add(parseStatement());
            }
            docCommentEndPosition = 0;
			result.EndPosition = scanner.EndPosition;
            nextLexicalUnit(false);
            return result;
        }
Example #2
0
 protected virtual TResult handleBlock(BlockStatementNode block, TSource source)
 {
     return(defaultHandler());
 }