Skip to content

Commit 1e45ab0

Browse files
committed
Re-introduce ExpressionStmtSyntax
This was recently removed, but will represent an if/switch expression when used as a statement.
1 parent cc8fc77 commit 1e45ab0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gyb_syntax_support/StmtNodes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
Child('Statement', kind='Stmt'),
1111
]),
1212

13+
# expr-stmt -> expression ';'?
14+
Node('ExpressionStmt', name_for_diagnostics='expression', kind='Stmt',
15+
children=[
16+
Child('Expression', kind='Expr'),
17+
]),
18+
1319
# continue-stmt -> 'continue' label? ';'?
1420
Node('ContinueStmt', name_for_diagnostics="'continue' statement", kind='Stmt',
1521
children=[

0 commit comments

Comments
 (0)