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

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

Issue 1833573006: Distinguish SimpleIdentifier uses and declarations at parse time. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Brace body. 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.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 AST model. The AST (Abstract Syntax Tree) model describes the 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the
7 * syntactic (as opposed to semantic) structure of Dart code. The semantic 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic
8 * structure of the code is modeled by the 8 * structure of the code is modeled by the
9 * [element model](../element/element.dart). 9 * [element model](../element/element.dart).
10 * 10 *
(...skipping 6686 matching lines...) Expand 10 before | Expand all | Expand 10 after
6697 * initialCharacter ::= '_' | '$' | letter 6697 * initialCharacter ::= '_' | '$' | letter
6698 * 6698 *
6699 * internalCharacter ::= '_' | '$' | letter | digit 6699 * internalCharacter ::= '_' | '$' | letter | digit
6700 * 6700 *
6701 * Clients may not extend, implement or mix-in this class. 6701 * Clients may not extend, implement or mix-in this class.
6702 */ 6702 */
6703 abstract class SimpleIdentifier extends Identifier { 6703 abstract class SimpleIdentifier extends Identifier {
6704 /** 6704 /**
6705 * Initialize a newly created identifier. 6705 * Initialize a newly created identifier.
6706 */ 6706 */
6707 factory SimpleIdentifier(Token token) = SimpleIdentifierImpl; 6707 factory SimpleIdentifier(Token token, {bool isDeclaration: false}) {
6708 if (isDeclaration) {
6709 return new DeclaredSimpleIdentifier(token);
6710 }
6711 return new SimpleIdentifierImpl(token);
6712 }
6708 6713
6709 /** 6714 /**
6710 * Return the auxiliary elements associated with this identifier, or `null` if 6715 * Return the auxiliary elements associated with this identifier, or `null` if
6711 * this identifier is not in both a getter and setter context. The auxiliary 6716 * this identifier is not in both a getter and setter context. The auxiliary
6712 * elements hold the static and propagated elements associated with the getter 6717 * elements hold the static and propagated elements associated with the getter
6713 * context. 6718 * context.
6714 */ 6719 */
6715 // TODO(brianwilkerson) Replace this API. 6720 // TODO(brianwilkerson) Replace this API.
6716 AuxiliaryElements get auxiliaryElements; 6721 AuxiliaryElements get auxiliaryElements;
6717 6722
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
8093 /** 8098 /**
8094 * Return the 'yield' keyword. 8099 * Return the 'yield' keyword.
8095 */ 8100 */
8096 Token get yieldKeyword; 8101 Token get yieldKeyword;
8097 8102
8098 /** 8103 /**
8099 * Return the 'yield' keyword to the given [token]. 8104 * Return the 'yield' keyword to the given [token].
8100 */ 8105 */
8101 void set yieldKeyword(Token token); 8106 void set yieldKeyword(Token token);
8102 } 8107 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698