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

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

Issue 1690783002: Set visible ranges for local variables/functions to the ranges of enclosing blocks. (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/dart/element/builder.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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 * or function (an [ExecutableElement]). 1457 * or function (an [ExecutableElement]).
1458 * 1458 *
1459 * Clients may not extend, implement or mix-in this class. 1459 * Clients may not extend, implement or mix-in this class.
1460 */ 1460 */
1461 abstract class LocalElement implements Element { 1461 abstract class LocalElement implements Element {
1462 /** 1462 /**
1463 * Return a source range that covers the approximate portion of the source in 1463 * Return a source range that covers the approximate portion of the source in
1464 * which the name of this element is visible, or `null` if there is no single 1464 * which the name of this element is visible, or `null` if there is no single
1465 * range of characters within which the element name is visible. 1465 * range of characters within which the element name is visible.
1466 * 1466 *
1467 * * For a local variable, this includes everything from the end of the 1467 * * For a local variable, this is the source range of the end of the block
Brian Wilkerson 2016/02/10 23:08:23 "of the end of the block"? Did you mean "of the bl
1468 * variable's initializer to the end of the block that encloses the variable 1468 * that encloses the variable declaration.
1469 * declaration.
1470 * * For a parameter, this includes the body of the method or function that 1469 * * For a parameter, this includes the body of the method or function that
1471 * declares the parameter. 1470 * declares the parameter.
1472 * * For a local function, this includes everything from the beginning of the 1471 * * For a local function, this is the source range of the end of the block
1473 * function's body to the end of the block that encloses the function 1472 * that encloses the variable declaration.
1474 * declaration.
1475 * * For top-level functions, `null` will be returned because they are 1473 * * For top-level functions, `null` will be returned because they are
1476 * potentially visible in multiple sources. 1474 * potentially visible in multiple sources.
1477 */ 1475 */
1478 SourceRange get visibleRange; 1476 SourceRange get visibleRange;
1479 } 1477 }
1480 1478
1481 /** 1479 /**
1482 * A local variable. 1480 * A local variable.
1483 * 1481 *
1484 * Clients may not extend, implement or mix-in this class. 1482 * Clients may not extend, implement or mix-in this class.
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 */ 1935 */
1938 bool get isStatic; 1936 bool get isStatic;
1939 1937
1940 /** 1938 /**
1941 * Return the declared type of this variable, or `null` if the variable did 1939 * Return the declared type of this variable, or `null` if the variable did
1942 * not have a declared type (such as if it was declared using the keyword 1940 * not have a declared type (such as if it was declared using the keyword
1943 * 'var'). 1941 * 'var').
1944 */ 1942 */
1945 DartType get type; 1943 DartType get type;
1946 } 1944 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698