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

Unified Diff: pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart

Issue 2750503012: Re-land "Add support for metadata on type variables to Fasta parser." (with fixes). (Closed)
Patch Set: Fixes Created 3 years, 9 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
Index: pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
index e5de58514b2674f814aaa7ef6668a86936a29932..3a44acd575a2408f3fad51f72e92e8cb2a330cc2 100644
--- a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
@@ -14,7 +14,11 @@ import 'token.dart'
show BeginGroupToken, KeywordToken, StringToken, SymbolToken, Token;
import 'token_constants.dart'
- show LT_TOKEN, OPEN_CURLY_BRACKET_TOKEN, STRING_INTERPOLATION_TOKEN;
+ show
+ LT_TOKEN,
+ OPEN_CURLY_BRACKET_TOKEN,
+ OPEN_PAREN_TOKEN,
+ STRING_INTERPOLATION_TOKEN;
import 'characters.dart' show $LF, $STX;
@@ -132,8 +136,11 @@ abstract class ArrayBasedScanner extends AbstractScanner {
Token token = new BeginGroupToken(info, tokenStart);
appendToken(token);
- // { ( [ ${ cannot appear inside a type parameters / arguments.
- if (!identical(info.kind, LT_TOKEN)) discardOpenLt();
+ // { [ ${ cannot appear inside a type parameters / arguments.
+ if (!identical(info.kind, LT_TOKEN) &&
+ !identical(info.kind, OPEN_PAREN_TOKEN)) {
+ discardOpenLt();
+ }
groupingStack = groupingStack.prepend(token);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/source/outline_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698