Chromium Code Reviews| Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| index afcabb0fc779ff76d2fb69b8955a7aab78951566..8fd4ef7f892cf4a5a473e0c83c5db56f13e5b104 100644 |
| --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| @@ -2191,7 +2191,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
| Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) { |
| if (isDartLibrary && kind == ErrorKind.ExpectedFunctionBody) { |
| Token recover = skipNativeClause(token); |
| - if (recover != null) return recover; |
| + if (recover != null) return newSyntheticToken(recover); |
|
ahe
2017/03/09 12:08:39
I think we should modify skipNativeClause instead.
Paul Berry
2017/03/09 21:51:21
Done.
|
| } else if (kind == ErrorKind.UnexpectedToken) { |
| String expected = arguments["expected"]; |
| const List<String> trailing = const <String>[")", "}", ";", ","]; |
| @@ -2199,7 +2199,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
| arguments.putIfAbsent("actual", () => token.value); |
| handleRecoverableError(token, ErrorKind.ExpectedButGot, arguments); |
| } |
| - return token; |
| + return newSyntheticToken(token); |
|
ahe
2017/03/09 12:08:39
FYI: Expect an easy conflict here. The return stat
Paul Berry
2017/03/09 21:51:21
Thanks for the heads up.
|
| } |
| return super.handleUnrecoverableError(token, kind, arguments); |
| } |