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

Unified Diff: pkg/analyzer/lib/src/fasta/token_utils.dart

Issue 2900963009: enable analyzer scanner adapter generic method support (Closed)
Patch Set: Created 3 years, 7 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 | « pkg/analyzer/lib/src/dart/scanner/scanner.dart ('k') | pkg/front_end/lib/src/scanner/reader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/token_utils.dart
diff --git a/pkg/analyzer/lib/src/fasta/token_utils.dart b/pkg/analyzer/lib/src/fasta/token_utils.dart
index 426d2c82f7f47e2654aaff3c75b4283499ecb820..be5b0c592faaf343fa077a994085c7094b644a1a 100644
--- a/pkg/analyzer/lib/src/fasta/token_utils.dart
+++ b/pkg/analyzer/lib/src/fasta/token_utils.dart
@@ -441,8 +441,16 @@ Token fromAnalyzerToken(analyzer.Token token) {
return symbol(TokenType.BACKSLASH);
case TokenType.PERIOD_PERIOD_PERIOD:
return symbol(TokenType.PERIOD_PERIOD_PERIOD);
- // case TokenType.GENERIC_METHOD_TYPE_ASSIGN
- // case TokenType.GENERIC_METHOD_TYPE_LIST
+ case TokenType.GENERIC_METHOD_TYPE_ASSIGN:
+ return new CommentToken.fromSubstring(
+ TokenType.GENERIC_METHOD_TYPE_ASSIGN,
+ token.lexeme,
+ 0,
+ token.lexeme.length,
+ 0);
+ case TokenType.GENERIC_METHOD_TYPE_LIST:
+ return new CommentToken.fromSubstring(TokenType.GENERIC_METHOD_TYPE_LIST,
+ token.lexeme, 0, token.lexeme.length, 0);
default:
return internalError('Unhandled token type ${token.type}');
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/scanner/scanner.dart ('k') | pkg/front_end/lib/src/scanner/reader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698