Add InfixOperatorExpr.

This commit is contained in:
Doug Gregor
2022-08-05 16:24:30 -07:00
parent 1ac8adb2d6
commit addffbbd9c
2 changed files with 12 additions and 0 deletions

View File

@@ -199,6 +199,17 @@ EXPR_NODES = [
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

View File

@@ -269,6 +269,7 @@ SYNTAX_NODE_SERIALIZATION_CODES = {
'MissingPattern': 265,
'GarbageNodes' : 266,
'LabeledStmt': 267,
'InfixOperatorExpr': 268,
}