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

Unified Diff: runtime/vm/parser.cc

Issue 2812323002: Fix look-ahead parsing code in the VM (fixes #29243). (Closed)
Patch Set: update status files 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 | tests/language/language_analyzer2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 6e83ad6ded5681538d7c7850ccce109337ad2d85..72f078e230c2e0d2ebd48d395761846368e917e4 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -8248,10 +8248,17 @@ bool Parser::TryParseTypeArguments() {
} else if (ct == Token::kSHR) {
nesting_level -= 2;
} else if (ct == Token::kIDENT) {
- // Check to see if it is a qualified identifier.
- if (LookaheadToken(1) == Token::kPERIOD) {
- // Consume the identifier, the period will be consumed below.
- ConsumeToken();
+ if (IsFunctionTypeSymbol()) {
+ if (!TryParseType(false)) {
+ return false;
+ }
+ continue;
+ } else {
+ // Check to see if it is a qualified identifier.
+ if (LookaheadToken(1) == Token::kPERIOD) {
+ // Consume the identifier, the period will be consumed below.
+ ConsumeToken();
+ }
}
} else if (ct != Token::kCOMMA) {
return false;
@@ -8384,7 +8391,7 @@ bool Parser::TryParseType(bool allow_void) {
if (!TryParseQualIdent()) {
return false;
}
- if ((CurrentToken() == Token::kLT) && !TryParseTypeParameters()) {
+ if ((CurrentToken() == Token::kLT) && !TryParseTypeArguments()) {
return false;
}
found = true;
« no previous file with comments | « no previous file | tests/language/language_analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698