File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 311311 ])
312312 ]),
313313
314+ # ? expr :
315+ # Ternary expression without the condition and the second choice.
316+ # NOTE: This appears only in SequenceExpr.
317+ Node ('UnresolvedTernaryExpr' , kind = 'Expr' ,
318+ children = [
319+ Child ("QuestionMark" , kind = 'InfixQuestionMarkToken' ),
320+ Child ("FirstChoice" , kind = 'Expr' ),
321+ Child ("ColonMark" , kind = 'ColonToken' ),
322+ ]),
323+
324+
314325 # a ? 1 : 0
326+ # NOTE: This won't come directly out of the parser. Rather, it is the
327+ # result of "folding" a SequenceExpr based on knowing the precedence
328+ # relationships amongst the different infix operators.
315329 Node ('TernaryExpr' , kind = 'Expr' ,
316330 children = [
317331 Child ("ConditionExpression" , kind = 'Expr' ),
Original file line number Diff line number Diff line change 271271 'LabeledStmt' : 267 ,
272272 'InfixOperatorExpr' : 268 ,
273273 'MoveExpr' : 269 ,
274+ 'UnresolvedTernaryExpr' : 270 ,
274275}
275276
276277
You can’t perform that action at this time.
0 commit comments