Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 2821193002: Fix an error in the parser code to fix the dev build (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index e87b77b4f74d29f984e93671b70526391629a3ec..18bb1c2afe95fbe8c377aa491d4b8a9637904eb1 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -431,7 +431,7 @@ class Parser {
}
Token afterReturnType = skipTypeName(_currentToken);
if (afterReturnType != null &&
- _tokenMatchesKeyword(afterReturnType, Keyword.FUNCTION)) {
+ _tokenMatchesString(afterReturnType, 'Function')) {
afterReturnType = skipGenericFunctionTypeAfterReturnType(afterReturnType);
}
if (afterReturnType == null) {
@@ -4174,7 +4174,7 @@ class Parser {
return astFactory
.emptyStatement(_createSyntheticToken(TokenType.SEMICOLON));
}
- } else if (_inGenerator && _matchesKeyword(Keyword.YIELD)) {
+ } else if (_inGenerator && _matchesString(_YIELD)) {
return parseYieldStatement();
} else if (_inAsync && _matchesString(_AWAIT)) {
if (_tokenMatchesKeyword(_peek(), Keyword.FOR)) {
« no previous file with comments | « no previous file | tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698