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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart

Issue 2539243002: Transition analyzer and analysis_server to new astFactory; remove old AST factory methods. (Closed)
Patch Set: Update CHANGELOG Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.completion.dart.local.declaration.visitor; 5 library services.completion.dart.local.declaration.visitor;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 9 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 10 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/src/dart/ast/token.dart'; 11 import 'package:analyzer/src/dart/ast/token.dart';
11 12
12 /** 13 /**
13 * `LocalDeclarationCollector` visits an [AstNode] and its parent recursively 14 * `LocalDeclarationCollector` visits an [AstNode] and its parent recursively
14 * along with any declarations in those nodes. Consumers typically call [visit] 15 * along with any declarations in those nodes. Consumers typically call [visit]
15 * which catches the exception thrown by [finished()]. 16 * which catches the exception thrown by [finished()].
16 */ 17 */
17 abstract class LocalDeclarationVisitor extends GeneralizingAstVisitor { 18 abstract class LocalDeclarationVisitor extends GeneralizingAstVisitor {
18 static final TypeName STACKTRACE_TYPE = new TypeName( 19 static final TypeName STACKTRACE_TYPE = astFactory.typeName(
19 new SimpleIdentifier( 20 astFactory.simpleIdentifier(
20 new StringToken(TokenType.IDENTIFIER, 'StackTrace', 0)), 21 new StringToken(TokenType.IDENTIFIER, 'StackTrace', 0)),
21 null); 22 null);
22 23
23 final int offset; 24 final int offset;
24 25
25 LocalDeclarationVisitor(this.offset); 26 LocalDeclarationVisitor(this.offset);
26 27
27 void declaredClass(ClassDeclaration declaration); 28 void declaredClass(ClassDeclaration declaration);
28 29
29 void declaredClassTypeAlias(ClassTypeAlias declaration); 30 void declaredClassTypeAlias(ClassTypeAlias declaration);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 274 }
274 } 275 }
275 } 276 }
276 } 277 }
277 278
278 /** 279 /**
279 * Internal exception used to indicate that [LocalDeclarationVisitor] 280 * Internal exception used to indicate that [LocalDeclarationVisitor]
280 * should stop visiting. 281 * should stop visiting.
281 */ 282 */
282 class _LocalDeclarationVisitorFinished {} 283 class _LocalDeclarationVisitorFinished {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698