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

Side by Side Diff: pkg/analyzer/lib/dart/element/element.dart

Issue 2694403003: Add CompilationUnitElement.lineInfo and resynthesize it. (Closed)
Patch Set: Created 3 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/dart/element/element.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 /** 5 /**
6 * Defines the element model. The element model describes the semantic (as 6 * Defines the element model. The element model describes the semantic (as
7 * opposed to syntactic) structure of Dart code. The syntactic structure of the 7 * opposed to syntactic) structure of Dart code. The syntactic structure of the
8 * code is modeled by the [AST structure](../ast/ast.dart). 8 * code is modeled by the [AST structure](../ast/ast.dart).
9 * 9 *
10 * The element model consists of two closely related kinds of objects: elements 10 * The element model consists of two closely related kinds of objects: elements
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 */ 446 */
447 List<FunctionTypeAliasElement> get functionTypeAliases; 447 List<FunctionTypeAliasElement> get functionTypeAliases;
448 448
449 /** 449 /**
450 * Return `true` if this compilation unit defines a top-level function named 450 * Return `true` if this compilation unit defines a top-level function named
451 * `loadLibrary`. 451 * `loadLibrary`.
452 */ 452 */
453 bool get hasLoadLibraryFunction; 453 bool get hasLoadLibraryFunction;
454 454
455 /** 455 /**
456 * Return the [LineInfo] for the [source], or `null` if not computed yet.
457 */
458 LineInfo get lineInfo;
459
460 /**
456 * Return a list containing all of the top-level variables contained in this 461 * Return a list containing all of the top-level variables contained in this
457 * compilation unit. 462 * compilation unit.
458 */ 463 */
459 List<TopLevelVariableElement> get topLevelVariables; 464 List<TopLevelVariableElement> get topLevelVariables;
460 465
461 /** 466 /**
462 * Return a list containing all of the classes contained in this compilation 467 * Return a list containing all of the classes contained in this compilation
463 * unit. 468 * unit.
464 */ 469 */
465 List<ClassElement> get types; 470 List<ClassElement> get types;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 * 717 *
713 * This method is expensive, because resolved AST might have been already 718 * This method is expensive, because resolved AST might have been already
714 * evicted from cache, so parsing and resolving will be performed. 719 * evicted from cache, so parsing and resolving will be performed.
715 */ 720 */
716 CompilationUnit get unit; 721 CompilationUnit get unit;
717 722
718 /** 723 /**
719 * Use the given [visitor] to visit this element. Return the value returned by 724 * Use the given [visitor] to visit this element. Return the value returned by
720 * the visitor as a result of visiting this element. 725 * the visitor as a result of visiting this element.
721 */ 726 */
722 /*=T*/ accept/*<T>*/(ElementVisitor<dynamic/*=T*/> visitor); 727 /*=T*/ accept/*<T>*/(ElementVisitor<dynamic/*=T*/ > visitor);
723 728
724 /** 729 /**
725 * Return the documentation comment for this element as it appears in the 730 * Return the documentation comment for this element as it appears in the
726 * original source (complete with the beginning and ending delimiters), or 731 * original source (complete with the beginning and ending delimiters), or
727 * `null` if this element does not have a documentation comment associated 732 * `null` if this element does not have a documentation comment associated
728 * with it. This can be a long-running operation if the information needed to 733 * with it. This can be a long-running operation if the information needed to
729 * access the comment is not cached. 734 * access the comment is not cached.
730 * 735 *
731 * Throws [AnalysisException] if the documentation comment could not be 736 * Throws [AnalysisException] if the documentation comment could not be
732 * determined because the analysis could not be performed 737 * determined because the analysis could not be performed
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 DartType get type; 2050 DartType get type;
2046 2051
2047 /** 2052 /**
2048 * Return a representation of the value of this variable, forcing the value 2053 * Return a representation of the value of this variable, forcing the value
2049 * to be computed if it had not previously been computed, or `null` if either 2054 * to be computed if it had not previously been computed, or `null` if either
2050 * this variable was not declared with the 'const' modifier or if the value of 2055 * this variable was not declared with the 'const' modifier or if the value of
2051 * this variable could not be computed because of errors. 2056 * this variable could not be computed because of errors.
2052 */ 2057 */
2053 DartObject computeConstantValue(); 2058 DartObject computeConstantValue();
2054 } 2059 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698