Skip to content

Commit f78fc5d

Browse files
committed
[Parser] Simplify sequence expression parsing
`SequenceExprSyntax` now gurantees that it has odd number elements using `UnresolvedTernaryExpr`/`UnresolvedAsExpr`/`UnresolvedIsExpr`. Factored out the operator parsing into `parseSequenceExpressionOperator()` which returns the operator expresssion, and optionally the RHS, so we can avoid nested loops. Also, `parseSequenceExprssion()` now has a performance optimization that avoids heap `Array` construction unless the expression is actually sequenced.
1 parent 444509c commit f78fc5d

File tree

2 files changed

+179
-182
lines changed

2 files changed

+179
-182
lines changed

0 commit comments

Comments
 (0)