Commit Graph

2 Commits

Author SHA1 Message Date
Jens Johansen 3660b9ecc7 [parser] New syntax for null aware index (2nd try)
This reverts commit bc4893a3b3.

The previous attempt failed because when we check if something is a
conditional expression we used a rewriter that didn't actually rewrite.
This further down the line (still checking if we can parse the expression)
results in errors occurring (that wouldn't have occurred if the rewrite
had happened) and the conclusion was thus that it wasn't a conditional
expression and we parsed it as a null-aware index operator (which gave
errors because it wasn't).

This 2nd try solves it by having a rewriter that actually rewrites,
but then allows to undo the rewrites after we're done parsing.

Change-Id: Ide3c0d6a870d4dc18b6d9475b0227d93c733dc7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136624
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-26 13:31:52 +00:00
Johnni Winther 688454c4a7 [cfe] Compute AssignedVariables in body builder
For-loops and try statements currently not supported.

Change-Id: I52a591b55149ddfd5d0c5792239555d72b8146fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123248
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-10-29 09:17:06 +00:00