Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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) return new DeclaredSimpleIdentifier(token); | |
|
Brian Wilkerson
2016/03/25 15:37:31
nit: block
Bob Nystrom
2016/03/28 16:09:16
Haha, fixed. I swear one day I will remember to no
| |
| 6709 return new SimpleIdentifierImpl(token); | |
| 6710 } | |
| 6708 | 6711 |
| 6709 /** | 6712 /** |
| 6710 * Return the auxiliary elements associated with this identifier, or `null` if | 6713 * 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 | 6714 * 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 | 6715 * elements hold the static and propagated elements associated with the getter |
| 6713 * context. | 6716 * context. |
| 6714 */ | 6717 */ |
| 6715 // TODO(brianwilkerson) Replace this API. | 6718 // TODO(brianwilkerson) Replace this API. |
| 6716 AuxiliaryElements get auxiliaryElements; | 6719 AuxiliaryElements get auxiliaryElements; |
| 6717 | 6720 |
| (...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8093 /** | 8096 /** |
| 8094 * Return the 'yield' keyword. | 8097 * Return the 'yield' keyword. |
| 8095 */ | 8098 */ |
| 8096 Token get yieldKeyword; | 8099 Token get yieldKeyword; |
| 8097 | 8100 |
| 8098 /** | 8101 /** |
| 8099 * Return the 'yield' keyword to the given [token]. | 8102 * Return the 'yield' keyword to the given [token]. |
| 8100 */ | 8103 */ |
| 8101 void set yieldKeyword(Token token); | 8104 void set yieldKeyword(Token token); |
| 8102 } | 8105 } |
| OLD | NEW |