b0acaea1e5
* Add mechanisms to try out a recovery and only perform it if is successful. * Recover written out binary operators, e.g. "a xor b", "a or b" etc. This fixes #26810 and is also how these operators are written in e.g. Kotlin. This might be somewhat controversial though. * Adds a mechanism to _replace_ a token by another token. This might be controversial. It is done because just inserting the operator causes the same rewrite to be attempted on the same token stream several times (at least with the way the token stream is parsed via the CFE) in turn causing it to be recovered *sometimes*. This is now avoided by actually replacing the token. Change-Id: Icfa806045575d2aa2e5f35126708651b275bcf84 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162003 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>