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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1644043002: Update ConstTopLevelVariableElementImpl constructors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 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 analyzer.src.generated.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/visitor.dart'; 10 import 'package:analyzer/dart/ast/visitor.dart';
(...skipping 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 variable.setVisibleRange(enclosingBlock.offset, enclosingBlock.length); 3462 variable.setVisibleRange(enclosingBlock.offset, enclosingBlock.length);
3463 if ((node.parent as VariableDeclarationList).type == null) { 3463 if ((node.parent as VariableDeclarationList).type == null) {
3464 variable.hasImplicitType = true; 3464 variable.hasImplicitType = true;
3465 } 3465 }
3466 _currentHolder.addLocalVariable(variable); 3466 _currentHolder.addLocalVariable(variable);
3467 variableName.staticElement = element; 3467 variableName.staticElement = element;
3468 } else { 3468 } else {
3469 SimpleIdentifier variableName = node.name; 3469 SimpleIdentifier variableName = node.name;
3470 TopLevelVariableElementImpl variable; 3470 TopLevelVariableElementImpl variable;
3471 if (isConst && hasInitializer) { 3471 if (isConst && hasInitializer) {
3472 variable = new ConstTopLevelVariableElementImpl(variableName); 3472 variable = new ConstTopLevelVariableElementImpl.forNode(variableName);
3473 } else { 3473 } else {
3474 variable = new TopLevelVariableElementImpl.forNode(variableName); 3474 variable = new TopLevelVariableElementImpl.forNode(variableName);
3475 } 3475 }
3476 element = variable; 3476 element = variable;
3477 if (node.parent.parent is TopLevelVariableDeclaration) { 3477 if (node.parent.parent is TopLevelVariableDeclaration) {
3478 _setDoc(element, node.parent.parent); 3478 _setDoc(element, node.parent.parent);
3479 } 3479 }
3480 if ((node.parent as VariableDeclarationList).type == null) { 3480 if ((node.parent as VariableDeclarationList).type == null) {
3481 variable.hasImplicitType = true; 3481 variable.hasImplicitType = true;
3482 } 3482 }
(...skipping 10102 matching lines...) Expand 10 before | Expand all | Expand 10 after
13585 nonFields.add(node); 13585 nonFields.add(node);
13586 return null; 13586 return null;
13587 } 13587 }
13588 13588
13589 @override 13589 @override
13590 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); 13590 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this);
13591 13591
13592 @override 13592 @override
13593 Object visitWithClause(WithClause node) => null; 13593 Object visitWithClause(WithClause node) => null;
13594 } 13594 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/testing/element_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698