Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library fasta.parser.parser; | 5 library fasta.parser.parser; |
| 6 | 6 |
| 7 import '../fasta_codes.dart' | 7 import '../fasta_codes.dart' |
| 8 show | 8 show |
| 9 FastaCode, | 9 FastaCode, |
| 10 FastaMessage, | 10 FastaMessage, |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1044 reportUnrecoverableErrorCodeWithToken(token, codeExpectedIdentifier) | 1044 reportUnrecoverableErrorCodeWithToken(token, codeExpectedIdentifier) |
| 1045 .next; | 1045 .next; |
| 1046 } else if (token.isBuiltInIdentifier && | 1046 } else if (token.isBuiltInIdentifier && |
| 1047 !context.isBuiltInIdentifierAllowed) { | 1047 !context.isBuiltInIdentifierAllowed) { |
| 1048 if (context.inDeclaration) { | 1048 if (context.inDeclaration) { |
| 1049 reportRecoverableErrorCodeWithToken( | 1049 reportRecoverableErrorCodeWithToken( |
| 1050 token, codeBuiltInIdentifierInDeclaration); | 1050 token, codeBuiltInIdentifierInDeclaration); |
| 1051 } else if (!optional("dynamic", token)) { | 1051 } else if (!optional("dynamic", token)) { |
| 1052 reportRecoverableErrorCodeWithToken(token, codeBuiltInIdentifierAsType); | 1052 reportRecoverableErrorCodeWithToken(token, codeBuiltInIdentifierAsType); |
| 1053 } | 1053 } |
| 1054 } else if (!inPlainSync && token.isPseudo) { | 1054 } else if (!inPlainSync && token.type.isPseudo) { |
|
ahe
2017/05/15 09:23:12
Why this change?
danrubel
2017/05/15 13:03:18
There was no corresponding `isPseudo` accessor in
| |
| 1055 if (optional('await', token)) { | 1055 if (optional('await', token)) { |
| 1056 reportRecoverableErrorCode(token, codeAwaitAsIdentifier); | 1056 reportRecoverableErrorCode(token, codeAwaitAsIdentifier); |
| 1057 } else if (optional('yield', token)) { | 1057 } else if (optional('yield', token)) { |
| 1058 reportRecoverableErrorCode(token, codeYieldAsIdentifier); | 1058 reportRecoverableErrorCode(token, codeYieldAsIdentifier); |
| 1059 } else if (optional('async', token)) { | 1059 } else if (optional('async', token)) { |
| 1060 reportRecoverableErrorCode(token, codeAsyncAsIdentifier); | 1060 reportRecoverableErrorCode(token, codeAsyncAsIdentifier); |
| 1061 } | 1061 } |
| 1062 } | 1062 } |
| 1063 listener.handleIdentifier(token, context); | 1063 listener.handleIdentifier(token, context); |
| 1064 return token.next; | 1064 return token.next; |
| (...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3917 return reportUnrecoverableError( | 3917 return reportUnrecoverableError( |
| 3918 token, () => code.format(uri, token.charOffset, string)); | 3918 token, () => code.format(uri, token.charOffset, string)); |
| 3919 } | 3919 } |
| 3920 } | 3920 } |
| 3921 | 3921 |
| 3922 typedef FastaMessage NoArgument(Uri uri, int charOffset); | 3922 typedef FastaMessage NoArgument(Uri uri, int charOffset); |
| 3923 | 3923 |
| 3924 typedef FastaMessage TokenArgument(Uri uri, int charOffset, Token token); | 3924 typedef FastaMessage TokenArgument(Uri uri, int charOffset, Token token); |
| 3925 | 3925 |
| 3926 typedef FastaMessage StringArgument(Uri uri, int charOffset, String string); | 3926 typedef FastaMessage StringArgument(Uri uri, int charOffset, String string); |
| OLD | NEW |