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

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

Issue 1788223002: Deprecate the generated AST library and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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/analysis_server/lib/src/services/completion/dart/optype.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
index 71c1bfd04efd5a0ea6cad2a92454035481289b6d..e61845ef2c76744b6effee265d1207e891c42f5c 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
@@ -6,9 +6,10 @@ library services.completion.dart.optype;
import 'package:analysis_server/src/protocol_server.dart';
import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
+import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart';
/**
* An [AstVisitor] for determining whether top level suggestions or invocation
@@ -83,7 +84,8 @@ class OpType {
/**
* Indicate whether only type names should be suggested
*/
- bool get includeOnlyTypeNameSuggestions => includeTypeNameSuggestions &&
+ bool get includeOnlyTypeNameSuggestions =>
+ includeTypeNameSuggestions &&
!includeReturnValueSuggestions &&
!includeVoidReturnSuggestions;
}
@@ -136,7 +138,7 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
}
}
-@override
+ @override
void visitAssertStatement(AssertStatement node) {
if (identical(entity, node.condition)) {
optype.includeReturnValueSuggestions = true;

Powered by Google App Engine
This is Rietveld 408576698