[incrParse] Fix parsing of nodes covering no source text

This commit is contained in:
Alex Hoppen
2018-05-08 13:13:46 -07:00
parent 9d3233c556
commit e1a99efd57
8 changed files with 43 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ COMMON_NODES = [
Node('UnknownPattern', kind='Pattern'),
# code-block-item = (decl | stmt | expr) ';'?
Node('CodeBlockItem', kind='Syntax',
Node('CodeBlockItem', kind='Syntax', omit_when_empty=True,
description="""
A CodeBlockItem is any Syntax node that appears on its own line inside
a CodeBlock.
@@ -27,6 +27,7 @@ COMMON_NODES = [
Child('Stmt', kind='Stmt'),
Child('Expr', kind='Expr'),
Child('TokenList', kind='TokenList'),
Child('NonEmptyTokenList', kind='NonEmptyTokenList'),
]),
Child('Semicolon', kind='SemicolonToken',
description="""