10b441b16b
This improves recovery when parsing conditional import expressions by repositioning the synthetic closing ')' that was inserted by the scanner in a less than optimal location. This approach relies on the beforeSynthetic field being set correctly. While the scanner still sets the 'next' and 'beforeSynthetic' fields directly for efficiency, most other functions which update an existing token stream have been revised to call 'setNext()' rather than setting the 'next' field directly. This ensures that the 'beforeSynthetic' field will be correctly updated. Change-Id: Id631fd600c64d1feaf00593acb74a7070e354f07 Reviewed-on: https://dart-review.googlesource.com/52120 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Dan Rubel <danrubel@google.com>