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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 * initializer. 1393 * initializer.
1394 */ 1394 */
1395 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl 1395 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl
1396 with ConstVariableElement { 1396 with ConstVariableElement {
1397 /** 1397 /**
1398 * The result of evaluating this variable's initializer. 1398 * The result of evaluating this variable's initializer.
1399 */ 1399 */
1400 EvaluationResultImpl _result; 1400 EvaluationResultImpl _result;
1401 1401
1402 /** 1402 /**
1403 * Initialize a newly created synthetic top-level variable element to have the
1404 * given [name] and [offset].
1405 */
1406 ConstTopLevelVariableElementImpl(String name, int offset)
1407 : super(name, offset);
1408
1409 /**
1403 * Initialize a newly created top-level variable element to have the given 1410 * Initialize a newly created top-level variable element to have the given
1404 * [name]. 1411 * [name].
1405 */ 1412 */
1406 ConstTopLevelVariableElementImpl(Identifier name) : super.forNode(name); 1413 ConstTopLevelVariableElementImpl.forNode(Identifier name)
1414 : super.forNode(name);
1407 1415
1408 @override 1416 @override
1409 DartObject get constantValue => _result.value; 1417 DartObject get constantValue => _result.value;
1410 1418
1411 @override 1419 @override
1412 EvaluationResultImpl get evaluationResult => _result; 1420 EvaluationResultImpl get evaluationResult => _result;
1413 1421
1414 @override 1422 @override
1415 void set evaluationResult(EvaluationResultImpl result) { 1423 void set evaluationResult(EvaluationResultImpl result) {
1416 this._result = result; 1424 this._result = result;
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after
4748 4756
4749 @override 4757 @override
4750 void visitElement(Element element) { 4758 void visitElement(Element element) {
4751 int offset = element.nameOffset; 4759 int offset = element.nameOffset;
4752 if (offset != -1) { 4760 if (offset != -1) {
4753 map[offset] = element; 4761 map[offset] = element;
4754 } 4762 }
4755 super.visitElement(element); 4763 super.visitElement(element);
4756 } 4764 }
4757 } 4765 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698