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 311
311
])
312
312
]),
313
313
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
+
314
325
# 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.
315
329
Node ('TernaryExpr' , kind = 'Expr' ,
316
330
children = [
317
331
Child ("ConditionExpression" , kind = 'Expr' ),
Original file line number Diff line number Diff line change 271
271
'LabeledStmt' : 267 ,
272
272
'InfixOperatorExpr' : 268 ,
273
273
'MoveExpr' : 269 ,
274
+ 'UnresolvedTernaryExpr' : 270 ,
274
275
}
275
276
276
277
You can’t perform that action at this time.
0 commit comments