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

Side by Side Diff: pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analysis_server.src.provisional.completion.dart.completion_target; 5 library analysis_server.src.provisional.completion.dart.completion_target;
6 6
7 import 'package:analyzer/dart/ast/ast.dart';
7 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
8 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
10 import 'package:analyzer/src/generated/ast.dart';
11 import 'package:analyzer/src/generated/utilities_dart.dart'; 11 import 'package:analyzer/src/generated/utilities_dart.dart';
12 12
13 int _computeArgIndex(AstNode containingNode, Object entity) { 13 int _computeArgIndex(AstNode containingNode, Object entity) {
14 var argList = containingNode; 14 var argList = containingNode;
15 if (argList is ArgumentList) { 15 if (argList is ArgumentList) {
16 NodeList<Expression> args = argList.arguments; 16 NodeList<Expression> args = argList.arguments;
17 for (int index = 0; index < args.length; ++index) { 17 for (int index = 0; index < args.length; ++index) {
18 if (entity == args[index]) { 18 if (entity == args[index]) {
19 return index; 19 return index;
20 } 20 }
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (param.parameterKind == ParameterKind.NAMED) { 416 if (param.parameterKind == ParameterKind.NAMED) {
417 // TODO(danrubel) handle named parameters 417 // TODO(danrubel) handle named parameters
418 return false; 418 return false;
419 } else { 419 } else {
420 return paramType is FunctionType || paramType is FunctionTypeAlias; 420 return paramType is FunctionType || paramType is FunctionTypeAlias;
421 } 421 }
422 } 422 }
423 return false; 423 return false;
424 } 424 }
425 } 425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698