Skip to content

Add InfixOperatorExpr. #60425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions utils/gyb_syntax_support/ExprNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,17 @@
Child('ArrowToken', kind='ArrowToken'),
]),

# An infix binary expression like x + y.
# NOTE: This won't come directly out of the parser. Rather, it is the
# result of "folding" a SequenceExpr based on knowing the precedence
# relationships amongst the different infix operators.
Node('InfixOperatorExpr', kind='Expr',
children=[
Child('LeftOperand', kind='Expr'),
Child('OperatorOperand', kind='Expr'),
Child('RightOperand', kind='Expr'),
]),

# A floating-point literal
# 4.0
# -3.9
Expand Down
1 change: 1 addition & 0 deletions utils/gyb_syntax_support/NodeSerializationCodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
'MissingPattern': 265,
'GarbageNodes' : 266,
'LabeledStmt': 267,
'InfixOperatorExpr': 268,
}


Expand Down