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

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

Issue 624403002: Write end-of-block comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.ast; 8 library engine.ast;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 3003 matching lines...) Expand 10 before | Expand all | Expand 10 after
3014 Token get beginToken => literal; 3014 Token get beginToken => literal;
3015 3015
3016 @override 3016 @override
3017 Token get endToken => literal; 3017 Token get endToken => literal;
3018 3018
3019 @override 3019 @override
3020 bool get isSynthetic => literal.isSynthetic; 3020 bool get isSynthetic => literal.isSynthetic;
3021 3021
3022 @override 3022 @override
3023 void visitChildren(AstVisitor visitor) { 3023 void visitChildren(AstVisitor visitor) {
3024 // There are no children to visit.
3024 } 3025 }
3025 } 3026 }
3026 3027
3027 /** 3028 /**
3028 * Instances of the class `BreadthFirstVisitor` implement an AST visitor that wi ll recursively 3029 * Instances of the class `BreadthFirstVisitor` implement an AST visitor that wi ll recursively
3029 * visit all of the nodes in an AST structure, similar to [GeneralizingAstVisito r]. This 3030 * visit all of the nodes in an AST structure, similar to [GeneralizingAstVisito r]. This
3030 * visitor uses a breadth-first ordering rather than the depth-first ordering of 3031 * visitor uses a breadth-first ordering rather than the depth-first ordering of
3031 * [GeneralizingAstVisitor]. 3032 * [GeneralizingAstVisitor].
3032 * 3033 *
3033 * Subclasses that override a visit method must either invoke the overridden vis it method or 3034 * Subclasses that override a visit method must either invoke the overridden vis it method or
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4824 * Return the constant value of the static constant represented by the given e lement. 4825 * Return the constant value of the static constant represented by the given e lement.
4825 * 4826 *
4826 * @param element the element whose value is to be returned 4827 * @param element the element whose value is to be returned
4827 * @return the constant value of the static constant 4828 * @return the constant value of the static constant
4828 */ 4829 */
4829 Object _getConstantValue(Element element) { 4830 Object _getConstantValue(Element element) {
4830 // TODO(brianwilkerson) Implement this 4831 // TODO(brianwilkerson) Implement this
4831 if (element is FieldElement) { 4832 if (element is FieldElement) {
4832 FieldElement field = element; 4833 FieldElement field = element;
4833 if (field.isStatic && field.isConst) { 4834 if (field.isStatic && field.isConst) {
4835 //field.getConstantValue();
4834 } 4836 }
4837 // } else if (element instanceof VariableElement) {
4838 // VariableElement variable = (VariableElement) element;
4839 // if (variable.isStatic() && variable.isConst()) {
4840 // //variable.getConstantValue();
4841 // }
4835 } 4842 }
4836 return NOT_A_CONSTANT; 4843 return NOT_A_CONSTANT;
4837 } 4844 }
4838 } 4845 }
4839 4846
4840 /** 4847 /**
4841 * Instances of the class `ConstructorDeclaration` represent a constructor decla ration. 4848 * Instances of the class `ConstructorDeclaration` represent a constructor decla ration.
4842 * 4849 *
4843 * <pre> 4850 * <pre>
4844 * constructorDeclaration ::= 4851 * constructorDeclaration ::=
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
5923 accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this); 5930 accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this);
5924 5931
5925 @override 5932 @override
5926 Token get beginToken => literal; 5933 Token get beginToken => literal;
5927 5934
5928 @override 5935 @override
5929 Token get endToken => literal; 5936 Token get endToken => literal;
5930 5937
5931 @override 5938 @override
5932 void visitChildren(AstVisitor visitor) { 5939 void visitChildren(AstVisitor visitor) {
5940 // There are no children to visit.
5933 } 5941 }
5934 } 5942 }
5935 5943
5936 /** 5944 /**
5937 * Instances of the class `ElementLocator` locate the [Element] 5945 * Instances of the class `ElementLocator` locate the [Element]
5938 * associated with a given [AstNode]. 5946 * associated with a given [AstNode].
5939 */ 5947 */
5940 class ElementLocator { 5948 class ElementLocator {
5941 /** 5949 /**
5942 * Locate the [Element] associated with the given [AstNode]. 5950 * Locate the [Element] associated with the given [AstNode].
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this); 6122 accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this);
6115 6123
6116 @override 6124 @override
6117 Token get beginToken => semicolon; 6125 Token get beginToken => semicolon;
6118 6126
6119 @override 6127 @override
6120 Token get endToken => semicolon; 6128 Token get endToken => semicolon;
6121 6129
6122 @override 6130 @override
6123 void visitChildren(AstVisitor visitor) { 6131 void visitChildren(AstVisitor visitor) {
6132 // Empty function bodies have no children.
6124 } 6133 }
6125 } 6134 }
6126 6135
6127 /** 6136 /**
6128 * Instances of the class `EmptyStatement` represent an empty statement. 6137 * Instances of the class `EmptyStatement` represent an empty statement.
6129 * 6138 *
6130 * <pre> 6139 * <pre>
6131 * emptyStatement ::= 6140 * emptyStatement ::=
6132 * ';' 6141 * ';'
6133 * </pre> 6142 * </pre>
(...skipping 15 matching lines...) Expand all
6149 accept(AstVisitor visitor) => visitor.visitEmptyStatement(this); 6158 accept(AstVisitor visitor) => visitor.visitEmptyStatement(this);
6150 6159
6151 @override 6160 @override
6152 Token get beginToken => semicolon; 6161 Token get beginToken => semicolon;
6153 6162
6154 @override 6163 @override
6155 Token get endToken => semicolon; 6164 Token get endToken => semicolon;
6156 6165
6157 @override 6166 @override
6158 void visitChildren(AstVisitor visitor) { 6167 void visitChildren(AstVisitor visitor) {
6168 // There are no children to visit.
6159 } 6169 }
6160 } 6170 }
6161 6171
6162 /** 6172 /**
6163 * Instances of the class `EnumConstantDeclaration` represent the declaration of an enum 6173 * Instances of the class `EnumConstantDeclaration` represent the declaration of an enum
6164 * constant. 6174 * constant.
6165 */ 6175 */
6166 class EnumConstantDeclaration extends Declaration { 6176 class EnumConstantDeclaration extends Declaration {
6167 /** 6177 /**
6168 * The name of the constant. 6178 * The name of the constant.
(...skipping 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after
10257 accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this); 10267 accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this);
10258 10268
10259 @override 10269 @override
10260 Token get beginToken => literal; 10270 Token get beginToken => literal;
10261 10271
10262 @override 10272 @override
10263 Token get endToken => literal; 10273 Token get endToken => literal;
10264 10274
10265 @override 10275 @override
10266 void visitChildren(AstVisitor visitor) { 10276 void visitChildren(AstVisitor visitor) {
10277 // There are no children to visit.
10267 } 10278 }
10268 } 10279 }
10269 10280
10270 /** 10281 /**
10271 * The abstract class `InterpolationElement` defines the behavior common to elem ents within a 10282 * The abstract class `InterpolationElement` defines the behavior common to elem ents within a
10272 * [StringInterpolation]. 10283 * [StringInterpolation].
10273 * 10284 *
10274 * <pre> 10285 * <pre>
10275 * interpolationElement ::= 10286 * interpolationElement ::=
10276 * [InterpolationExpression] 10287 * [InterpolationExpression]
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
11851 * @param node the AST node within which to search 11862 * @param node the AST node within which to search
11852 * @return the element that was found 11863 * @return the element that was found
11853 */ 11864 */
11854 AstNode searchWithin(AstNode node) { 11865 AstNode searchWithin(AstNode node) {
11855 if (node == null) { 11866 if (node == null) {
11856 return null; 11867 return null;
11857 } 11868 }
11858 try { 11869 try {
11859 node.accept(this); 11870 node.accept(this);
11860 } on NodeLocator_NodeFoundException catch (exception) { 11871 } on NodeLocator_NodeFoundException catch (exception) {
11872 // A node with the right source position was found.
11861 } catch (exception) { 11873 } catch (exception) {
11862 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a t offset (${_startOffset} - ${_endOffset})", exception); 11874 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a t offset (${_startOffset} - ${_endOffset})", exception);
11863 return null; 11875 return null;
11864 } 11876 }
11865 return _foundNode; 11877 return _foundNode;
11866 } 11878 }
11867 11879
11868 @override 11880 @override
11869 Object visitNode(AstNode node) { 11881 Object visitNode(AstNode node) {
11870 int start = node.offset; 11882 int start = node.offset;
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
13220 accept(AstVisitor visitor) => visitor.visitNullLiteral(this); 13232 accept(AstVisitor visitor) => visitor.visitNullLiteral(this);
13221 13233
13222 @override 13234 @override
13223 Token get beginToken => literal; 13235 Token get beginToken => literal;
13224 13236
13225 @override 13237 @override
13226 Token get endToken => literal; 13238 Token get endToken => literal;
13227 13239
13228 @override 13240 @override
13229 void visitChildren(AstVisitor visitor) { 13241 void visitChildren(AstVisitor visitor) {
13242 // There are no children to visit.
13230 } 13243 }
13231 } 13244 }
13232 13245
13233 /** 13246 /**
13234 * Instances of the class `ParenthesizedExpression` represent a parenthesized ex pression. 13247 * Instances of the class `ParenthesizedExpression` represent a parenthesized ex pression.
13235 * 13248 *
13236 * <pre> 13249 * <pre>
13237 * parenthesizedExpression ::= 13250 * parenthesizedExpression ::=
13238 * '(' [Expression] ')' 13251 * '(' [Expression] ')'
13239 * </pre> 13252 * </pre>
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
14855 Token get beginToken => keyword; 14868 Token get beginToken => keyword;
14856 14869
14857 @override 14870 @override
14858 Token get endToken => keyword; 14871 Token get endToken => keyword;
14859 14872
14860 @override 14873 @override
14861 int get precedence => 0; 14874 int get precedence => 0;
14862 14875
14863 @override 14876 @override
14864 void visitChildren(AstVisitor visitor) { 14877 void visitChildren(AstVisitor visitor) {
14878 // There are no children to visit.
14865 } 14879 }
14866 } 14880 }
14867 14881
14868 /** 14882 /**
14869 * Instances of the class `ReturnStatement` represent a return statement. 14883 * Instances of the class `ReturnStatement` represent a return statement.
14870 * 14884 *
14871 * <pre> 14885 * <pre>
14872 * returnStatement ::= 14886 * returnStatement ::=
14873 * 'return' [Expression]? ';' 14887 * 'return' [Expression]? ';'
14874 * </pre> 14888 * </pre>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
15102 } else if (stmt is FunctionDeclarationStatement && !_referenceIsWithinLoca lFunction) { 15116 } else if (stmt is FunctionDeclarationStatement && !_referenceIsWithinLoca lFunction) {
15103 _addToScope(stmt.functionDeclaration.name); 15117 _addToScope(stmt.functionDeclaration.name);
15104 } 15118 }
15105 } 15119 }
15106 } 15120 }
15107 15121
15108 bool _isInRange(AstNode node) { 15122 bool _isInRange(AstNode node) {
15109 if (_position < 0) { 15123 if (_position < 0) {
15110 // if source position is not set then all nodes are in range 15124 // if source position is not set then all nodes are in range
15111 return true; 15125 return true;
15126 // not reached
15112 } 15127 }
15113 return node.end < _position; 15128 return node.end < _position;
15114 } 15129 }
15115 } 15130 }
15116 15131
15117 /** 15132 /**
15118 * Instances of the class `ScriptTag` represent the script tag that can optional ly occur at 15133 * Instances of the class `ScriptTag` represent the script tag that can optional ly occur at
15119 * the beginning of a compilation unit. 15134 * the beginning of a compilation unit.
15120 * 15135 *
15121 * <pre> 15136 * <pre>
(...skipping 18 matching lines...) Expand all
15140 accept(AstVisitor visitor) => visitor.visitScriptTag(this); 15155 accept(AstVisitor visitor) => visitor.visitScriptTag(this);
15141 15156
15142 @override 15157 @override
15143 Token get beginToken => scriptTag; 15158 Token get beginToken => scriptTag;
15144 15159
15145 @override 15160 @override
15146 Token get endToken => scriptTag; 15161 Token get endToken => scriptTag;
15147 15162
15148 @override 15163 @override
15149 void visitChildren(AstVisitor visitor) { 15164 void visitChildren(AstVisitor visitor) {
15165 // There are no children to visit.
15150 } 15166 }
15151 } 15167 }
15152 15168
15153 /** 15169 /**
15154 * Instances of the class `ShowCombinator` represent a combinator that restricts the names 15170 * Instances of the class `ShowCombinator` represent a combinator that restricts the names
15155 * being imported to those in a given list. 15171 * being imported to those in a given list.
15156 * 15172 *
15157 * <pre> 15173 * <pre>
15158 * showCombinator ::= 15174 * showCombinator ::=
15159 * 'show' [SimpleIdentifier] (',' [SimpleIdentifier])* 15175 * 'show' [SimpleIdentifier] (',' [SimpleIdentifier])*
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
15839 * element. 15855 * element.
15840 * 15856 *
15841 * @param element the element to be associated with this identifier 15857 * @param element the element to be associated with this identifier
15842 */ 15858 */
15843 void set staticElement(Element element) { 15859 void set staticElement(Element element) {
15844 _staticElement = _validateElement(element); 15860 _staticElement = _validateElement(element);
15845 } 15861 }
15846 15862
15847 @override 15863 @override
15848 void visitChildren(AstVisitor visitor) { 15864 void visitChildren(AstVisitor visitor) {
15865 // There are no children to visit.
15849 } 15866 }
15850 15867
15851 /** 15868 /**
15852 * Return the given element if it is valid, or report the problem and return ` null` if it is 15869 * Return the given element if it is valid, or report the problem and return ` null` if it is
15853 * not appropriate. 15870 * not appropriate.
15854 * 15871 *
15855 * @param parent the parent of the element, used for reporting when there is a problem 15872 * @param parent the parent of the element, used for reporting when there is a problem
15856 * @param isValid `true` if the element is appropriate 15873 * @param isValid `true` if the element is appropriate
15857 * @param element the element to be associated with this identifier 15874 * @param element the element to be associated with this identifier
15858 * @return the element to be associated with this identifier 15875 * @return the element to be associated with this identifier
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
16028 * Set the value of the literal to the given string. 16045 * Set the value of the literal to the given string.
16029 * 16046 *
16030 * @param string the value of the literal 16047 * @param string the value of the literal
16031 */ 16048 */
16032 void set value(String string) { 16049 void set value(String string) {
16033 _value = StringUtilities.intern(_value); 16050 _value = StringUtilities.intern(_value);
16034 } 16051 }
16035 16052
16036 @override 16053 @override
16037 void visitChildren(AstVisitor visitor) { 16054 void visitChildren(AstVisitor visitor) {
16055 // There are no children to visit.
16038 } 16056 }
16039 16057
16040 @override 16058 @override
16041 void appendStringValue(JavaStringBuilder builder) { 16059 void appendStringValue(JavaStringBuilder builder) {
16042 builder.append(value); 16060 builder.append(value);
16043 } 16061 }
16044 } 16062 }
16045 16063
16046 /** 16064 /**
16047 * Instances of the class `Statement` defines the behavior common to nodes that represent a 16065 * Instances of the class `Statement` defines the behavior common to nodes that represent a
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
16286 Token get beginToken => keyword; 16304 Token get beginToken => keyword;
16287 16305
16288 @override 16306 @override
16289 Token get endToken => keyword; 16307 Token get endToken => keyword;
16290 16308
16291 @override 16309 @override
16292 int get precedence => 16; 16310 int get precedence => 16;
16293 16311
16294 @override 16312 @override
16295 void visitChildren(AstVisitor visitor) { 16313 void visitChildren(AstVisitor visitor) {
16314 // There are no children to visit.
16296 } 16315 }
16297 } 16316 }
16298 16317
16299 /** 16318 /**
16300 * Instances of the class `SwitchCase` represent the case in a switch statement. 16319 * Instances of the class `SwitchCase` represent the case in a switch statement.
16301 * 16320 *
16302 * <pre> 16321 * <pre>
16303 * switchCase ::= 16322 * switchCase ::=
16304 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* 16323 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
16305 * </pre> 16324 * </pre>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
16588 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); 16607 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this);
16589 16608
16590 @override 16609 @override
16591 Token get beginToken => poundSign; 16610 Token get beginToken => poundSign;
16592 16611
16593 @override 16612 @override
16594 Token get endToken => components[components.length - 1]; 16613 Token get endToken => components[components.length - 1];
16595 16614
16596 @override 16615 @override
16597 void visitChildren(AstVisitor visitor) { 16616 void visitChildren(AstVisitor visitor) {
16617 // There are no children to visit.
16598 } 16618 }
16599 } 16619 }
16600 16620
16601 /** 16621 /**
16602 * Instances of the class `ThisExpression` represent a this expression. 16622 * Instances of the class `ThisExpression` represent a this expression.
16603 * 16623 *
16604 * <pre> 16624 * <pre>
16605 * thisExpression ::= 16625 * thisExpression ::=
16606 * 'this' 16626 * 'this'
16607 * </pre> 16627 * </pre>
(...skipping 18 matching lines...) Expand all
16626 Token get beginToken => keyword; 16646 Token get beginToken => keyword;
16627 16647
16628 @override 16648 @override
16629 Token get endToken => keyword; 16649 Token get endToken => keyword;
16630 16650
16631 @override 16651 @override
16632 int get precedence => 16; 16652 int get precedence => 16;
16633 16653
16634 @override 16654 @override
16635 void visitChildren(AstVisitor visitor) { 16655 void visitChildren(AstVisitor visitor) {
16656 // There are no children to visit.
16636 } 16657 }
16637 } 16658 }
16638 16659
16639 /** 16660 /**
16640 * Instances of the class `ThrowExpression` represent a throw expression. 16661 * Instances of the class `ThrowExpression` represent a throw expression.
16641 * 16662 *
16642 * <pre> 16663 * <pre>
16643 * throwExpression ::= 16664 * throwExpression ::=
16644 * 'throw' [Expression] 16665 * 'throw' [Expression]
16645 * </pre> 16666 * </pre>
(...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after
19567 _elements[index] = node; 19588 _elements[index] = node;
19568 } 19589 }
19569 void clear() { 19590 void clear() {
19570 _elements = <E> []; 19591 _elements = <E> [];
19571 } 19592 }
19572 int get length => _elements.length; 19593 int get length => _elements.length;
19573 void set length(int value) { 19594 void set length(int value) {
19574 throw new UnsupportedError("Cannot resize NodeList."); 19595 throw new UnsupportedError("Cannot resize NodeList.");
19575 } 19596 }
19576 } 19597 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698