| Index: pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
|
| diff --git a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
|
| index 6274b4a451fe2f7427c8ba1821b7780f7f1d0f45..8159c1ccf8b8f0857f0bc82a321d84ee0de02776 100644
|
| --- a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
|
| +++ b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart
|
| @@ -389,8 +389,7 @@ class CompletionTarget {
|
| // If the node's first token is a keyword or identifier, then the node is a
|
| // candidate entity if its first token is.
|
| Token beginToken = node.beginToken;
|
| - if (beginToken.type == TokenType.KEYWORD ||
|
| - beginToken.type == TokenType.IDENTIFIER) {
|
| + if (beginToken.type.isKeyword || beginToken.type == TokenType.IDENTIFIER) {
|
| return _isCandidateToken(beginToken, offset);
|
| }
|
|
|
| @@ -413,7 +412,7 @@ class CompletionTarget {
|
| if (offset < token.end) {
|
| return true;
|
| } else if (offset == token.end) {
|
| - return token.type == TokenType.KEYWORD ||
|
| + return token.type.isKeyword ||
|
| token.type == TokenType.IDENTIFIER ||
|
| token.length == 0;
|
| } else if (!token.isSynthetic) {
|
| @@ -425,8 +424,7 @@ class CompletionTarget {
|
| if (offset < previous.end) {
|
| return true;
|
| } else if (offset == previous.end) {
|
| - return token.type == TokenType.KEYWORD ||
|
| - previous.type == TokenType.IDENTIFIER;
|
| + return token.type.isKeyword || previous.type == TokenType.IDENTIFIER;
|
| } else {
|
| return false;
|
| }
|
|
|