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

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

Issue 18129004: Simplify constructors translation, improve code style. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.ast; 3 library engine.ast;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'error.dart'; 7 import 'error.dart';
8 import 'source.dart' show LineInfo; 8 import 'source.dart' show LineInfo;
9 import 'scanner.dart'; 9 import 'scanner.dart';
10 import 'engine.dart' show AnalysisEngine; 10 import 'engine.dart' show AnalysisEngine;
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2617 * @coverage dart.engine.ast 2617 * @coverage dart.engine.ast
2618 */ 2618 */
2619 abstract class ClassMember extends Declaration { 2619 abstract class ClassMember extends Declaration {
2620 2620
2621 /** 2621 /**
2622 * Initialize a newly created member of a class. 2622 * Initialize a newly created member of a class.
2623 * 2623 *
2624 * @param comment the documentation comment associated with this member 2624 * @param comment the documentation comment associated with this member
2625 * @param metadata the annotations associated with this member 2625 * @param metadata the annotations associated with this member
2626 */ 2626 */
2627 ClassMember.full(Comment comment, List<Annotation> metadata) : super.full(comm ent, metadata) { 2627 ClassMember.full(Comment comment, List<Annotation> metadata) : super.full(comm ent, metadata);
2628 }
2629 2628
2630 /** 2629 /**
2631 * Initialize a newly created member of a class. 2630 * Initialize a newly created member of a class.
2632 * 2631 *
2633 * @param comment the documentation comment associated with this member 2632 * @param comment the documentation comment associated with this member
2634 * @param metadata the annotations associated with this member 2633 * @param metadata the annotations associated with this member
2635 */ 2634 */
2636 ClassMember({Comment comment, List<Annotation> metadata}) : this.full(comment, metadata); 2635 ClassMember({Comment comment, List<Annotation> metadata}) : this.full(comment, metadata);
2637 } 2636 }
2638 /** 2637 /**
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 * A documentation comment. 3065 * A documentation comment.
3067 */ 3066 */
3068 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2); 3067 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2);
3069 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION]; 3068 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION];
3070 3069
3071 /// The name of this enum constant, as declared in the enum declaration. 3070 /// The name of this enum constant, as declared in the enum declaration.
3072 final String name; 3071 final String name;
3073 3072
3074 /// The position in the enum declaration. 3073 /// The position in the enum declaration.
3075 final int ordinal; 3074 final int ordinal;
3076 CommentType(this.name, this.ordinal) { 3075 CommentType(this.name, this.ordinal);
3077 }
3078 int compareTo(CommentType other) => ordinal - other.ordinal; 3076 int compareTo(CommentType other) => ordinal - other.ordinal;
3079 int get hashCode => ordinal; 3077 int get hashCode => ordinal;
3080 String toString() => name; 3078 String toString() => name;
3081 } 3079 }
3082 /** 3080 /**
3083 * Instances of the class `CommentReference` represent a reference to a Dart ele ment that is 3081 * Instances of the class `CommentReference` represent a reference to a Dart ele ment that is
3084 * found within a documentation comment. 3082 * found within a documentation comment.
3085 * 3083 *
3086 * <pre> 3084 * <pre>
3087 * commentReference ::= 3085 * commentReference ::=
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
3456 * @coverage dart.engine.ast 3454 * @coverage dart.engine.ast
3457 */ 3455 */
3458 abstract class CompilationUnitMember extends Declaration { 3456 abstract class CompilationUnitMember extends Declaration {
3459 3457
3460 /** 3458 /**
3461 * Initialize a newly created generic compilation unit member. 3459 * Initialize a newly created generic compilation unit member.
3462 * 3460 *
3463 * @param comment the documentation comment associated with this member 3461 * @param comment the documentation comment associated with this member
3464 * @param metadata the annotations associated with this member 3462 * @param metadata the annotations associated with this member
3465 */ 3463 */
3466 CompilationUnitMember.full(Comment comment, List<Annotation> metadata) : super .full(comment, metadata) { 3464 CompilationUnitMember.full(Comment comment, List<Annotation> metadata) : super .full(comment, metadata);
3467 }
3468 3465
3469 /** 3466 /**
3470 * Initialize a newly created generic compilation unit member. 3467 * Initialize a newly created generic compilation unit member.
3471 * 3468 *
3472 * @param comment the documentation comment associated with this member 3469 * @param comment the documentation comment associated with this member
3473 * @param metadata the annotations associated with this member 3470 * @param metadata the annotations associated with this member
3474 */ 3471 */
3475 CompilationUnitMember({Comment comment, List<Annotation> metadata}) : this.ful l(comment, metadata); 3472 CompilationUnitMember({Comment comment, List<Annotation> metadata}) : this.ful l(comment, metadata);
3476 } 3473 }
3477 /** 3474 /**
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
4462 * @coverage dart.engine.ast 4459 * @coverage dart.engine.ast
4463 */ 4460 */
4464 abstract class Declaration extends AnnotatedNode { 4461 abstract class Declaration extends AnnotatedNode {
4465 4462
4466 /** 4463 /**
4467 * Initialize a newly created declaration. 4464 * Initialize a newly created declaration.
4468 * 4465 *
4469 * @param comment the documentation comment associated with this declaration 4466 * @param comment the documentation comment associated with this declaration
4470 * @param metadata the annotations associated with this declaration 4467 * @param metadata the annotations associated with this declaration
4471 */ 4468 */
4472 Declaration.full(Comment comment, List<Annotation> metadata) : super.full(comm ent, metadata) { 4469 Declaration.full(Comment comment, List<Annotation> metadata) : super.full(comm ent, metadata);
4473 }
4474 4470
4475 /** 4471 /**
4476 * Initialize a newly created declaration. 4472 * Initialize a newly created declaration.
4477 * 4473 *
4478 * @param comment the documentation comment associated with this declaration 4474 * @param comment the documentation comment associated with this declaration
4479 * @param metadata the annotations associated with this declaration 4475 * @param metadata the annotations associated with this declaration
4480 */ 4476 */
4481 Declaration({Comment comment, List<Annotation> metadata}) : this.full(comment, metadata); 4477 Declaration({Comment comment, List<Annotation> metadata}) : this.full(comment, metadata);
4482 4478
4483 /** 4479 /**
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
4797 * resolved or if this directive could not be resolved. 4793 * resolved or if this directive could not be resolved.
4798 */ 4794 */
4799 Element _element; 4795 Element _element;
4800 4796
4801 /** 4797 /**
4802 * Initialize a newly create directive. 4798 * Initialize a newly create directive.
4803 * 4799 *
4804 * @param comment the documentation comment associated with this directive 4800 * @param comment the documentation comment associated with this directive
4805 * @param metadata the annotations associated with the directive 4801 * @param metadata the annotations associated with the directive
4806 */ 4802 */
4807 Directive.full(Comment comment, List<Annotation> metadata) : super.full(commen t, metadata) { 4803 Directive.full(Comment comment, List<Annotation> metadata) : super.full(commen t, metadata);
4808 }
4809 4804
4810 /** 4805 /**
4811 * Initialize a newly create directive. 4806 * Initialize a newly create directive.
4812 * 4807 *
4813 * @param comment the documentation comment associated with this directive 4808 * @param comment the documentation comment associated with this directive
4814 * @param metadata the annotations associated with the directive 4809 * @param metadata the annotations associated with the directive
4815 */ 4810 */
4816 Directive({Comment comment, List<Annotation> metadata}) : this.full(comment, m etadata); 4811 Directive({Comment comment, List<Annotation> metadata}) : this.full(comment, m etadata);
4817 4812
4818 /** 4813 /**
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
5259 /** 5254 /**
5260 * Initialize a newly created export directive. 5255 * Initialize a newly created export directive.
5261 * 5256 *
5262 * @param comment the documentation comment associated with this directive 5257 * @param comment the documentation comment associated with this directive
5263 * @param metadata the annotations associated with the directive 5258 * @param metadata the annotations associated with the directive
5264 * @param keyword the token representing the 'export' keyword 5259 * @param keyword the token representing the 'export' keyword
5265 * @param libraryUri the URI of the library being exported 5260 * @param libraryUri the URI of the library being exported
5266 * @param combinators the combinators used to control which names are exported 5261 * @param combinators the combinators used to control which names are exported
5267 * @param semicolon the semicolon terminating the directive 5262 * @param semicolon the semicolon terminating the directive
5268 */ 5263 */
5269 ExportDirective.full(Comment comment, List<Annotation> metadata, Token keyword , StringLiteral libraryUri, List<Combinator> combinators, Token semicolon) : sup er.full(comment, metadata, keyword, libraryUri, combinators, semicolon) { 5264 ExportDirective.full(Comment comment, List<Annotation> metadata, Token keyword , StringLiteral libraryUri, List<Combinator> combinators, Token semicolon) : sup er.full(comment, metadata, keyword, libraryUri, combinators, semicolon);
5270 }
5271 5265
5272 /** 5266 /**
5273 * Initialize a newly created export directive. 5267 * Initialize a newly created export directive.
5274 * 5268 *
5275 * @param comment the documentation comment associated with this directive 5269 * @param comment the documentation comment associated with this directive
5276 * @param metadata the annotations associated with the directive 5270 * @param metadata the annotations associated with the directive
5277 * @param keyword the token representing the 'export' keyword 5271 * @param keyword the token representing the 'export' keyword
5278 * @param libraryUri the URI of the library being exported 5272 * @param libraryUri the URI of the library being exported
5279 * @param combinators the combinators used to control which names are exported 5273 * @param combinators the combinators used to control which names are exported
5280 * @param semicolon the semicolon terminating the directive 5274 * @param semicolon the semicolon terminating the directive
(...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after
7972 MethodElement _propagatedElement; 7966 MethodElement _propagatedElement;
7973 7967
7974 /** 7968 /**
7975 * Initialize a newly created index expression. 7969 * Initialize a newly created index expression.
7976 * 7970 *
7977 * @param target the expression used to compute the object being indexed 7971 * @param target the expression used to compute the object being indexed
7978 * @param leftBracket the left square bracket 7972 * @param leftBracket the left square bracket
7979 * @param index the expression used to compute the index 7973 * @param index the expression used to compute the index
7980 * @param rightBracket the right square bracket 7974 * @param rightBracket the right square bracket
7981 */ 7975 */
7982 IndexExpression.forTarget_full(Expression target2, Token leftBracket2, Express ion index2, Token rightBracket2) { 7976 IndexExpression.forTarget_full(Expression target, Token leftBracket, Expressio n index, Token rightBracket) {
7983 _jtd_constructor_58_impl(target2, leftBracket2, index2, rightBracket2); 7977 this._target = becomeParentOf(target);
7978 this._leftBracket = leftBracket;
7979 this._index = becomeParentOf(index);
7980 this._rightBracket = rightBracket;
7984 } 7981 }
7985 7982
7986 /** 7983 /**
7987 * Initialize a newly created index expression. 7984 * Initialize a newly created index expression.
7988 * 7985 *
7989 * @param target the expression used to compute the object being indexed 7986 * @param target the expression used to compute the object being indexed
7990 * @param leftBracket the left square bracket 7987 * @param leftBracket the left square bracket
7991 * @param index the expression used to compute the index 7988 * @param index the expression used to compute the index
7992 * @param rightBracket the right square bracket 7989 * @param rightBracket the right square bracket
7993 */ 7990 */
7994 IndexExpression.forTarget({Expression target2, Token leftBracket2, Expression index2, Token rightBracket2}) : this.forTarget_full(target2, leftBracket2, index 2, rightBracket2); 7991 IndexExpression.forTarget({Expression target, Token leftBracket, Expression in dex, Token rightBracket}) : this.forTarget_full(target, leftBracket, index, righ tBracket);
7995 _jtd_constructor_58_impl(Expression target2, Token leftBracket2, Expression in dex2, Token rightBracket2) {
7996 this._target = becomeParentOf(target2);
7997 this._leftBracket = leftBracket2;
7998 this._index = becomeParentOf(index2);
7999 this._rightBracket = rightBracket2;
8000 }
8001 7992
8002 /** 7993 /**
8003 * Initialize a newly created index expression. 7994 * Initialize a newly created index expression.
8004 * 7995 *
8005 * @param period the period ("..") before a cascaded index expression 7996 * @param period the period ("..") before a cascaded index expression
8006 * @param leftBracket the left square bracket 7997 * @param leftBracket the left square bracket
8007 * @param index the expression used to compute the index 7998 * @param index the expression used to compute the index
8008 * @param rightBracket the right square bracket 7999 * @param rightBracket the right square bracket
8009 */ 8000 */
8010 IndexExpression.forCascade_full(Token period2, Token leftBracket2, Expression index2, Token rightBracket2) { 8001 IndexExpression.forCascade_full(Token period, Token leftBracket, Expression in dex, Token rightBracket) {
8011 _jtd_constructor_59_impl(period2, leftBracket2, index2, rightBracket2); 8002 this._period = period;
8003 this._leftBracket = leftBracket;
8004 this._index = becomeParentOf(index);
8005 this._rightBracket = rightBracket;
8012 } 8006 }
8013 8007
8014 /** 8008 /**
8015 * Initialize a newly created index expression. 8009 * Initialize a newly created index expression.
8016 * 8010 *
8017 * @param period the period ("..") before a cascaded index expression 8011 * @param period the period ("..") before a cascaded index expression
8018 * @param leftBracket the left square bracket 8012 * @param leftBracket the left square bracket
8019 * @param index the expression used to compute the index 8013 * @param index the expression used to compute the index
8020 * @param rightBracket the right square bracket 8014 * @param rightBracket the right square bracket
8021 */ 8015 */
8022 IndexExpression.forCascade({Token period2, Token leftBracket2, Expression inde x2, Token rightBracket2}) : this.forCascade_full(period2, leftBracket2, index2, rightBracket2); 8016 IndexExpression.forCascade({Token period, Token leftBracket, Expression index, Token rightBracket}) : this.forCascade_full(period, leftBracket, index, rightBr acket);
8023 _jtd_constructor_59_impl(Token period2, Token leftBracket2, Expression index2, Token rightBracket2) {
8024 this._period = period2;
8025 this._leftBracket = leftBracket2;
8026 this._index = becomeParentOf(index2);
8027 this._rightBracket = rightBracket2;
8028 }
8029 accept(ASTVisitor visitor) => visitor.visitIndexExpression(this); 8017 accept(ASTVisitor visitor) => visitor.visitIndexExpression(this);
8030 8018
8031 /** 8019 /**
8032 * Return the expression used to compute the object being indexed, or `null` i f this index 8020 * Return the expression used to compute the object being indexed, or `null` i f this index
8033 * expression is part of a cascade expression. 8021 * expression is part of a cascade expression.
8034 * 8022 *
8035 * @return the expression used to compute the object being indexed 8023 * @return the expression used to compute the object being indexed
8036 * @see #getRealTarget() 8024 * @see #getRealTarget()
8037 */ 8025 */
8038 Expression get array => _target; 8026 Expression get array => _target;
(...skipping 4700 matching lines...) Expand 10 before | Expand all | Expand 10 after
12739 class SwitchDefault extends SwitchMember { 12727 class SwitchDefault extends SwitchMember {
12740 12728
12741 /** 12729 /**
12742 * Initialize a newly created switch default. 12730 * Initialize a newly created switch default.
12743 * 12731 *
12744 * @param labels the labels associated with the switch member 12732 * @param labels the labels associated with the switch member
12745 * @param keyword the token representing the 'case' or 'default' keyword 12733 * @param keyword the token representing the 'case' or 'default' keyword
12746 * @param colon the colon separating the keyword or the expression from the st atements 12734 * @param colon the colon separating the keyword or the expression from the st atements
12747 * @param statements the statements that will be executed if this switch membe r is selected 12735 * @param statements the statements that will be executed if this switch membe r is selected
12748 */ 12736 */
12749 SwitchDefault.full(List<Label> labels, Token keyword, Token colon, List<Statem ent> statements) : super.full(labels, keyword, colon, statements) { 12737 SwitchDefault.full(List<Label> labels, Token keyword, Token colon, List<Statem ent> statements) : super.full(labels, keyword, colon, statements);
12750 }
12751 12738
12752 /** 12739 /**
12753 * Initialize a newly created switch default. 12740 * Initialize a newly created switch default.
12754 * 12741 *
12755 * @param labels the labels associated with the switch member 12742 * @param labels the labels associated with the switch member
12756 * @param keyword the token representing the 'case' or 'default' keyword 12743 * @param keyword the token representing the 'case' or 'default' keyword
12757 * @param colon the colon separating the keyword or the expression from the st atements 12744 * @param colon the colon separating the keyword or the expression from the st atements
12758 * @param statements the statements that will be executed if this switch membe r is selected 12745 * @param statements the statements that will be executed if this switch membe r is selected
12759 */ 12746 */
12760 SwitchDefault({List<Label> labels, Token keyword, Token colon, List<Statement> statements}) : this.full(labels, keyword, colon, statements); 12747 SwitchDefault({List<Label> labels, Token keyword, Token colon, List<Statement> statements}) : this.full(labels, keyword, colon, statements);
(...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after
15348 * is no such element. 15335 * is no such element.
15349 */ 15336 */
15350 ASTNode _foundNode; 15337 ASTNode _foundNode;
15351 15338
15352 /** 15339 /**
15353 * Initialize a newly created locator to locate one or more [ASTNode] by locat ing 15340 * Initialize a newly created locator to locate one or more [ASTNode] by locat ing
15354 * the node within an AST structure that corresponds to the given offset in th e source. 15341 * the node within an AST structure that corresponds to the given offset in th e source.
15355 * 15342 *
15356 * @param offset the offset used to identify the node 15343 * @param offset the offset used to identify the node
15357 */ 15344 */
15358 NodeLocator.con1(int offset) { 15345 NodeLocator.con1(int offset) : this.con2(offset, offset);
15359 _jtd_constructor_121_impl(offset);
15360 }
15361 _jtd_constructor_121_impl(int offset) {
15362 _jtd_constructor_122_impl(offset, offset);
15363 }
15364 15346
15365 /** 15347 /**
15366 * Initialize a newly created locator to locate one or more [ASTNode] by locat ing 15348 * Initialize a newly created locator to locate one or more [ASTNode] by locat ing
15367 * the node within an AST structure that corresponds to the given range of cha racters in the 15349 * the node within an AST structure that corresponds to the given range of cha racters in the
15368 * source. 15350 * source.
15369 * 15351 *
15370 * @param start the start offset of the range used to identify the node 15352 * @param start the start offset of the range used to identify the node
15371 * @param end the end offset of the range used to identify the node 15353 * @param end the end offset of the range used to identify the node
15372 */ 15354 */
15373 NodeLocator.con2(int start, int end) { 15355 NodeLocator.con2(int start, int end) {
15374 _jtd_constructor_122_impl(start, end);
15375 }
15376 _jtd_constructor_122_impl(int start, int end) {
15377 this._startOffset = start; 15356 this._startOffset = start;
15378 this._endOffset = end; 15357 this._endOffset = end;
15379 } 15358 }
15380 15359
15381 /** 15360 /**
15382 * Return the node that was found that corresponds to the given source range, or `null` if 15361 * Return the node that was found that corresponds to the given source range, or `null` if
15383 * there is no such node. 15362 * there is no such node.
15384 * 15363 *
15385 * @return the node that was found 15364 * @return the node that was found
15386 */ 15365 */
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
17155 return elements[elements.length - 1].endToken; 17134 return elements[elements.length - 1].endToken;
17156 } 17135 }
17157 /** 17136 /**
17158 * Return the node that is the parent of each of the elements in the list. 17137 * Return the node that is the parent of each of the elements in the list.
17159 * @return the node that is the parent of each of the elements in the list 17138 * @return the node that is the parent of each of the elements in the list
17160 */ 17139 */
17161 ASTNode getOwner() { 17140 ASTNode getOwner() {
17162 return owner; 17141 return owner;
17163 } 17142 }
17164 } 17143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698