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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart

Issue 2842213003: new TokenType and Keyword API (Closed)
Patch Set: rebase 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
Index: pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index 9e504c6902737cc7121e6159747f1d8170d75b7c..e8c6645adc232292f88ea973a755cd49eda912e3 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -508,7 +508,7 @@ class ReplacementRange {
factory ReplacementRange.compute(int requestOffset, CompletionTarget target) {
bool isKeywordOrIdentifier(Token token) =>
- token.type == TokenType.KEYWORD || token.type == TokenType.IDENTIFIER;
+ token.type.isKeyword || token.type == TokenType.IDENTIFIER;
//TODO(danrubel) Ideally this needs to be pushed down into the contributors
// but that implies that each suggestion can have a different

Powered by Google App Engine
This is Rietveld 408576698