| OLD | NEW |
| 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 | 3 |
| 4 library engine.ast; | 4 library engine.ast; |
| 5 | 5 |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'java_core.dart'; | 7 import 'java_core.dart'; |
| 8 import 'java_engine.dart'; | 8 import 'java_engine.dart'; |
| 9 import 'error.dart'; | 9 import 'error.dart'; |
| 10 import 'source.dart' show LineInfo; | 10 import 'source.dart' show LineInfo; |
| 11 import 'scanner.dart'; | 11 import 'scanner.dart'; |
| 12 import 'engine.dart' show AnalysisEngine; | 12 import 'engine.dart' show AnalysisEngine; |
| 13 import 'utilities_dart.dart'; | 13 import 'utilities_dart.dart'; |
| 14 import 'element.dart' hide Annotation; | 14 import 'element.dart' hide Annotation; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * The abstract class {@code ASTNode} defines the behavior common to all nodes i
n the AST structure | 17 * The abstract class {@code ASTNode} defines the behavior common to all nodes i
n the AST structure |
| 18 * for a Dart program. | 18 * for a Dart program. |
| 19 * @coverage dart.engine.ast |
| 19 */ | 20 */ |
| 20 abstract class ASTNode { | 21 abstract class ASTNode { |
| 21 /** | 22 /** |
| 22 * The parent of the node, or {@code null} if the node is the root of an AST s
tructure. | 23 * The parent of the node, or {@code null} if the node is the root of an AST s
tructure. |
| 23 */ | 24 */ |
| 24 ASTNode _parent; | 25 ASTNode _parent; |
| 25 /** | 26 /** |
| 26 * A table mapping the names of properties to their values, or {@code null} if
this node does not | 27 * A table mapping the names of properties to their values, or {@code null} if
this node does not |
| 27 * have any properties associated with it. | 28 * have any properties associated with it. |
| 28 */ | 29 */ |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 */ | 200 */ |
| 200 void set parent(ASTNode newParent) { | 201 void set parent(ASTNode newParent) { |
| 201 _parent = newParent; | 202 _parent = newParent; |
| 202 } | 203 } |
| 203 static int _hashCodeGenerator = 0; | 204 static int _hashCodeGenerator = 0; |
| 204 final int hashCode = ++_hashCodeGenerator; | 205 final int hashCode = ++_hashCodeGenerator; |
| 205 } | 206 } |
| 206 /** | 207 /** |
| 207 * The interface {@code ASTVisitor} defines the behavior of objects that can be
used to visit an AST | 208 * The interface {@code ASTVisitor} defines the behavior of objects that can be
used to visit an AST |
| 208 * structure. | 209 * structure. |
| 210 * @coverage dart.engine.ast |
| 209 */ | 211 */ |
| 210 abstract class ASTVisitor<R> { | 212 abstract class ASTVisitor<R> { |
| 211 R visitAdjacentStrings(AdjacentStrings node); | 213 R visitAdjacentStrings(AdjacentStrings node); |
| 212 R visitAnnotation(Annotation node); | 214 R visitAnnotation(Annotation node); |
| 213 R visitArgumentDefinitionTest(ArgumentDefinitionTest node); | 215 R visitArgumentDefinitionTest(ArgumentDefinitionTest node); |
| 214 R visitArgumentList(ArgumentList node); | 216 R visitArgumentList(ArgumentList node); |
| 215 R visitAsExpression(AsExpression node); | 217 R visitAsExpression(AsExpression node); |
| 216 R visitAssertStatement(AssertStatement assertStatement); | 218 R visitAssertStatement(AssertStatement assertStatement); |
| 217 R visitAssignmentExpression(AssignmentExpression node); | 219 R visitAssignmentExpression(AssignmentExpression node); |
| 218 R visitBinaryExpression(BinaryExpression node); | 220 R visitBinaryExpression(BinaryExpression node); |
| 219 R visitBlock(Block node); | 221 R visitBlock(Block node); |
| 220 R visitBlockFunctionBody(BlockFunctionBody node); | 222 R visitBlockFunctionBody(BlockFunctionBody node); |
| 221 R visitBooleanLiteral(BooleanLiteral node); | 223 R visitBooleanLiteral(BooleanLiteral node); |
| 222 R visitBreakStatement(BreakStatement node); | 224 R visitBreakStatement(BreakStatement node); |
| 223 R visitCascadeExpression(CascadeExpression node); | 225 R visitCascadeExpression(CascadeExpression node); |
| 224 R visitCatchClause(CatchClause node); | 226 R visitCatchClause(CatchClause node); |
| 225 R visitClassDeclaration(ClassDeclaration node); | 227 R visitClassDeclaration(ClassDeclaration node); |
| 226 R visitClassTypeAlias(ClassTypeAlias node); | 228 R visitClassTypeAlias(ClassTypeAlias node); |
| 227 R visitComment(Comment node); | 229 R visitComment(Comment node); |
| 228 R visitCommentReference(CommentReference node); | 230 R visitCommentReference(CommentReference node); |
| 229 R visitCompilationUnit(CompilationUnit node); | 231 R visitCompilationUnit(CompilationUnit node); |
| 230 R visitConditionalExpression(ConditionalExpression node); | 232 R visitConditionalExpression(ConditionalExpression node); |
| 231 R visitConstructorDeclaration(ConstructorDeclaration node); | 233 R visitConstructorDeclaration(ConstructorDeclaration node); |
| 232 R visitConstructorFieldInitializer(ConstructorFieldInitializer node); | 234 R visitConstructorFieldInitializer(ConstructorFieldInitializer node); |
| 233 R visitConstructorName(ConstructorName node); | 235 R visitConstructorName(ConstructorName node); |
| 234 R visitContinueStatement(ContinueStatement node); | 236 R visitContinueStatement(ContinueStatement node); |
| 237 R visitDeclaredIdentifier(DeclaredIdentifier node); |
| 235 R visitDefaultFormalParameter(DefaultFormalParameter node); | 238 R visitDefaultFormalParameter(DefaultFormalParameter node); |
| 236 R visitDoStatement(DoStatement node); | 239 R visitDoStatement(DoStatement node); |
| 237 R visitDoubleLiteral(DoubleLiteral node); | 240 R visitDoubleLiteral(DoubleLiteral node); |
| 238 R visitEmptyFunctionBody(EmptyFunctionBody node); | 241 R visitEmptyFunctionBody(EmptyFunctionBody node); |
| 239 R visitEmptyStatement(EmptyStatement node); | 242 R visitEmptyStatement(EmptyStatement node); |
| 240 R visitExportDirective(ExportDirective node); | 243 R visitExportDirective(ExportDirective node); |
| 241 R visitExpressionFunctionBody(ExpressionFunctionBody node); | 244 R visitExpressionFunctionBody(ExpressionFunctionBody node); |
| 242 R visitExpressionStatement(ExpressionStatement node); | 245 R visitExpressionStatement(ExpressionStatement node); |
| 243 R visitExtendsClause(ExtendsClause node); | 246 R visitExtendsClause(ExtendsClause node); |
| 244 R visitFieldDeclaration(FieldDeclaration node); | 247 R visitFieldDeclaration(FieldDeclaration node); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 312 } |
| 310 /** | 313 /** |
| 311 * Instances of the class {@code AdjacentStrings} represents two or more string
literals that are | 314 * Instances of the class {@code AdjacentStrings} represents two or more string
literals that are |
| 312 * implicitly concatenated because of being adjacent (separated only by whitespa
ce). | 315 * implicitly concatenated because of being adjacent (separated only by whitespa
ce). |
| 313 * <p> | 316 * <p> |
| 314 * While the grammar only allows adjacent strings when all of the strings are of
the same kind | 317 * While the grammar only allows adjacent strings when all of the strings are of
the same kind |
| 315 * (single line or multi-line), this class doesn't enforce that restriction. | 318 * (single line or multi-line), this class doesn't enforce that restriction. |
| 316 * <pre> | 319 * <pre> |
| 317 * adjacentStrings ::={@link StringLiteral string} {@link StringLiteral string}+ | 320 * adjacentStrings ::={@link StringLiteral string} {@link StringLiteral string}+ |
| 318 * </pre> | 321 * </pre> |
| 322 * @coverage dart.engine.ast |
| 319 */ | 323 */ |
| 320 class AdjacentStrings extends StringLiteral { | 324 class AdjacentStrings extends StringLiteral { |
| 321 /** | 325 /** |
| 322 * The strings that are implicitly concatenated. | 326 * The strings that are implicitly concatenated. |
| 323 */ | 327 */ |
| 324 NodeList<StringLiteral> _strings; | 328 NodeList<StringLiteral> _strings; |
| 325 /** | 329 /** |
| 326 * Initialize a newly created list of adjacent strings. | 330 * Initialize a newly created list of adjacent strings. |
| 327 * @param strings the strings that are implicitly concatenated | 331 * @param strings the strings that are implicitly concatenated |
| 328 */ | 332 */ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 343 * @return the strings that are implicitly concatenated | 347 * @return the strings that are implicitly concatenated |
| 344 */ | 348 */ |
| 345 NodeList<StringLiteral> get strings => _strings; | 349 NodeList<StringLiteral> get strings => _strings; |
| 346 void visitChildren(ASTVisitor<Object> visitor) { | 350 void visitChildren(ASTVisitor<Object> visitor) { |
| 347 _strings.accept(visitor); | 351 _strings.accept(visitor); |
| 348 } | 352 } |
| 349 } | 353 } |
| 350 /** | 354 /** |
| 351 * The abstract class {@code AnnotatedNode} defines the behavior of nodes that c
an be annotated with | 355 * The abstract class {@code AnnotatedNode} defines the behavior of nodes that c
an be annotated with |
| 352 * both a comment and metadata. | 356 * both a comment and metadata. |
| 357 * @coverage dart.engine.ast |
| 353 */ | 358 */ |
| 354 abstract class AnnotatedNode extends ASTNode { | 359 abstract class AnnotatedNode extends ASTNode { |
| 355 /** | 360 /** |
| 356 * The documentation comment associated with this node, or {@code null} if thi
s node does not have | 361 * The documentation comment associated with this node, or {@code null} if thi
s node does not have |
| 357 * a documentation comment associated with it. | 362 * a documentation comment associated with it. |
| 358 */ | 363 */ |
| 359 Comment _comment; | 364 Comment _comment; |
| 360 /** | 365 /** |
| 361 * The annotations associated with this node. | 366 * The annotations associated with this node. |
| 362 */ | 367 */ |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 } | 460 } |
| 456 /** | 461 /** |
| 457 * Instances of the class {@code Annotation} represent an annotation that can be
associated with an | 462 * Instances of the class {@code Annotation} represent an annotation that can be
associated with an |
| 458 * AST node. | 463 * AST node. |
| 459 * <pre> | 464 * <pre> |
| 460 * metadata ::= | 465 * metadata ::= |
| 461 * annotation | 466 * annotation |
| 462 * annotation ::= | 467 * annotation ::= |
| 463 * '@' {@link Identifier qualified} (‘.’ {@link SimpleIdentifier identifier}
)? {@link ArgumentList arguments}? | 468 * '@' {@link Identifier qualified} (‘.’ {@link SimpleIdentifier identifier}
)? {@link ArgumentList arguments}? |
| 464 * </pre> | 469 * </pre> |
| 470 * @coverage dart.engine.ast |
| 465 */ | 471 */ |
| 466 class Annotation extends ASTNode { | 472 class Annotation extends ASTNode { |
| 467 /** | 473 /** |
| 468 * The at sign that introduced the annotation. | 474 * The at sign that introduced the annotation. |
| 469 */ | 475 */ |
| 470 Token _atSign; | 476 Token _atSign; |
| 471 /** | 477 /** |
| 472 * The name of the class defining the constructor that is being invoked or the
name of the field | 478 * The name of the class defining the constructor that is being invoked or the
name of the field |
| 473 * that is being referenced. | 479 * that is being referenced. |
| 474 */ | 480 */ |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 safelyVisitChild(_name, visitor); | 605 safelyVisitChild(_name, visitor); |
| 600 safelyVisitChild(_constructorName, visitor); | 606 safelyVisitChild(_constructorName, visitor); |
| 601 safelyVisitChild(_arguments, visitor); | 607 safelyVisitChild(_arguments, visitor); |
| 602 } | 608 } |
| 603 } | 609 } |
| 604 /** | 610 /** |
| 605 * Instances of the class {@code ArgumentDefinitionTest} represent an argument d
efinition test. | 611 * Instances of the class {@code ArgumentDefinitionTest} represent an argument d
efinition test. |
| 606 * <pre> | 612 * <pre> |
| 607 * argumentDefinitionTest ::= | 613 * argumentDefinitionTest ::= |
| 608 * '?' {@link SimpleIdentifier identifier}</pre> | 614 * '?' {@link SimpleIdentifier identifier}</pre> |
| 615 * @coverage dart.engine.ast |
| 609 */ | 616 */ |
| 610 class ArgumentDefinitionTest extends Expression { | 617 class ArgumentDefinitionTest extends Expression { |
| 611 /** | 618 /** |
| 612 * The token representing the question mark. | 619 * The token representing the question mark. |
| 613 */ | 620 */ |
| 614 Token _question; | 621 Token _question; |
| 615 /** | 622 /** |
| 616 * The identifier representing the argument being tested. | 623 * The identifier representing the argument being tested. |
| 617 */ | 624 */ |
| 618 SimpleIdentifier _identifier; | 625 SimpleIdentifier _identifier; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 } | 671 } |
| 665 /** | 672 /** |
| 666 * Instances of the class {@code ArgumentList} represent a list of arguments in
the invocation of a | 673 * Instances of the class {@code ArgumentList} represent a list of arguments in
the invocation of a |
| 667 * executable element: a function, method, or constructor. | 674 * executable element: a function, method, or constructor. |
| 668 * <pre> | 675 * <pre> |
| 669 * argumentList ::= | 676 * argumentList ::= |
| 670 * '(' arguments? ')' | 677 * '(' arguments? ')' |
| 671 * arguments ::={@link NamedExpression namedArgument} (',' {@link NamedExpressio
n namedArgument}) | 678 * arguments ::={@link NamedExpression namedArgument} (',' {@link NamedExpressio
n namedArgument}) |
| 672 * | {@link Expression expressionList} (',' {@link NamedExpression namedArgument
}) | 679 * | {@link Expression expressionList} (',' {@link NamedExpression namedArgument
}) |
| 673 * </pre> | 680 * </pre> |
| 681 * @coverage dart.engine.ast |
| 674 */ | 682 */ |
| 675 class ArgumentList extends ASTNode { | 683 class ArgumentList extends ASTNode { |
| 676 /** | 684 /** |
| 677 * The left parenthesis. | 685 * The left parenthesis. |
| 678 */ | 686 */ |
| 679 Token _leftParenthesis; | 687 Token _leftParenthesis; |
| 680 /** | 688 /** |
| 681 * The expressions producing the values of the arguments. | 689 * The expressions producing the values of the arguments. |
| 682 */ | 690 */ |
| 683 NodeList<Expression> _arguments; | 691 NodeList<Expression> _arguments; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 if (index < 0) { | 789 if (index < 0) { |
| 782 return null; | 790 return null; |
| 783 } | 791 } |
| 784 return _correspondingParameters[index]; | 792 return _correspondingParameters[index]; |
| 785 } | 793 } |
| 786 } | 794 } |
| 787 /** | 795 /** |
| 788 * Instances of the class {@code AsExpression} represent an 'as' expression. | 796 * Instances of the class {@code AsExpression} represent an 'as' expression. |
| 789 * <pre> | 797 * <pre> |
| 790 * asExpression ::={@link Expression expression} 'as' {@link TypeName type}</pre
> | 798 * asExpression ::={@link Expression expression} 'as' {@link TypeName type}</pre
> |
| 799 * @coverage dart.engine.ast |
| 791 */ | 800 */ |
| 792 class AsExpression extends Expression { | 801 class AsExpression extends Expression { |
| 793 /** | 802 /** |
| 794 * The expression used to compute the value being cast. | 803 * The expression used to compute the value being cast. |
| 795 */ | 804 */ |
| 796 Expression _expression; | 805 Expression _expression; |
| 797 /** | 806 /** |
| 798 * The as operator. | 807 * The as operator. |
| 799 */ | 808 */ |
| 800 Token _asOperator; | 809 Token _asOperator; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 safelyVisitChild(_expression, visitor); | 872 safelyVisitChild(_expression, visitor); |
| 864 safelyVisitChild(_type, visitor); | 873 safelyVisitChild(_type, visitor); |
| 865 } | 874 } |
| 866 } | 875 } |
| 867 /** | 876 /** |
| 868 * Instances of the class {@code AssertStatement} represent an assert statement. | 877 * Instances of the class {@code AssertStatement} represent an assert statement. |
| 869 * <pre> | 878 * <pre> |
| 870 * assertStatement ::= | 879 * assertStatement ::= |
| 871 * 'assert' '(' {@link Expression conditionalExpression} ')' ';' | 880 * 'assert' '(' {@link Expression conditionalExpression} ')' ';' |
| 872 * </pre> | 881 * </pre> |
| 882 * @coverage dart.engine.ast |
| 873 */ | 883 */ |
| 874 class AssertStatement extends Statement { | 884 class AssertStatement extends Statement { |
| 875 /** | 885 /** |
| 876 * The token representing the 'assert' keyword. | 886 * The token representing the 'assert' keyword. |
| 877 */ | 887 */ |
| 878 Token _keyword; | 888 Token _keyword; |
| 879 /** | 889 /** |
| 880 * The left parenthesis. | 890 * The left parenthesis. |
| 881 */ | 891 */ |
| 882 Token _leftParenthesis; | 892 Token _leftParenthesis; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 this._semicolon = semicolon2; | 990 this._semicolon = semicolon2; |
| 981 } | 991 } |
| 982 void visitChildren(ASTVisitor<Object> visitor) { | 992 void visitChildren(ASTVisitor<Object> visitor) { |
| 983 safelyVisitChild(_condition, visitor); | 993 safelyVisitChild(_condition, visitor); |
| 984 } | 994 } |
| 985 } | 995 } |
| 986 /** | 996 /** |
| 987 * Instances of the class {@code AssignmentExpression} represent an assignment e
xpression. | 997 * Instances of the class {@code AssignmentExpression} represent an assignment e
xpression. |
| 988 * <pre> | 998 * <pre> |
| 989 * assignmentExpression ::={@link Expression leftHandSide} {@link Token operator
} {@link Expression rightHandSide}</pre> | 999 * assignmentExpression ::={@link Expression leftHandSide} {@link Token operator
} {@link Expression rightHandSide}</pre> |
| 1000 * @coverage dart.engine.ast |
| 990 */ | 1001 */ |
| 991 class AssignmentExpression extends Expression { | 1002 class AssignmentExpression extends Expression { |
| 992 /** | 1003 /** |
| 993 * The expression used to compute the left hand side. | 1004 * The expression used to compute the left hand side. |
| 994 */ | 1005 */ |
| 995 Expression _leftHandSide; | 1006 Expression _leftHandSide; |
| 996 /** | 1007 /** |
| 997 * The assignment operator being applied. | 1008 * The assignment operator being applied. |
| 998 */ | 1009 */ |
| 999 Token _operator; | 1010 Token _operator; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 } | 1091 } |
| 1081 void visitChildren(ASTVisitor<Object> visitor) { | 1092 void visitChildren(ASTVisitor<Object> visitor) { |
| 1082 safelyVisitChild(_leftHandSide, visitor); | 1093 safelyVisitChild(_leftHandSide, visitor); |
| 1083 safelyVisitChild(_rightHandSide, visitor); | 1094 safelyVisitChild(_rightHandSide, visitor); |
| 1084 } | 1095 } |
| 1085 } | 1096 } |
| 1086 /** | 1097 /** |
| 1087 * Instances of the class {@code BinaryExpression} represent a binary (infix) ex
pression. | 1098 * Instances of the class {@code BinaryExpression} represent a binary (infix) ex
pression. |
| 1088 * <pre> | 1099 * <pre> |
| 1089 * binaryExpression ::={@link Expression leftOperand} {@link Token operator} {@l
ink Expression rightOperand}</pre> | 1100 * binaryExpression ::={@link Expression leftOperand} {@link Token operator} {@l
ink Expression rightOperand}</pre> |
| 1101 * @coverage dart.engine.ast |
| 1090 */ | 1102 */ |
| 1091 class BinaryExpression extends Expression { | 1103 class BinaryExpression extends Expression { |
| 1092 /** | 1104 /** |
| 1093 * The expression used to compute the left operand. | 1105 * The expression used to compute the left operand. |
| 1094 */ | 1106 */ |
| 1095 Expression _leftOperand; | 1107 Expression _leftOperand; |
| 1096 /** | 1108 /** |
| 1097 * The binary operator being applied. | 1109 * The binary operator being applied. |
| 1098 */ | 1110 */ |
| 1099 Token _operator; | 1111 Token _operator; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 safelyVisitChild(_leftOperand, visitor); | 1194 safelyVisitChild(_leftOperand, visitor); |
| 1183 safelyVisitChild(_rightOperand, visitor); | 1195 safelyVisitChild(_rightOperand, visitor); |
| 1184 } | 1196 } |
| 1185 } | 1197 } |
| 1186 /** | 1198 /** |
| 1187 * Instances of the class {@code Block} represent a sequence of statements. | 1199 * Instances of the class {@code Block} represent a sequence of statements. |
| 1188 * <pre> | 1200 * <pre> |
| 1189 * block ::= | 1201 * block ::= |
| 1190 * '{' statement* '}' | 1202 * '{' statement* '}' |
| 1191 * </pre> | 1203 * </pre> |
| 1204 * @coverage dart.engine.ast |
| 1192 */ | 1205 */ |
| 1193 class Block extends Statement { | 1206 class Block extends Statement { |
| 1194 /** | 1207 /** |
| 1195 * The left curly bracket. | 1208 * The left curly bracket. |
| 1196 */ | 1209 */ |
| 1197 Token _leftBracket; | 1210 Token _leftBracket; |
| 1198 /** | 1211 /** |
| 1199 * The statements contained in the block. | 1212 * The statements contained in the block. |
| 1200 */ | 1213 */ |
| 1201 NodeList<Statement> _statements; | 1214 NodeList<Statement> _statements; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 } | 1269 } |
| 1257 void visitChildren(ASTVisitor<Object> visitor) { | 1270 void visitChildren(ASTVisitor<Object> visitor) { |
| 1258 _statements.accept(visitor); | 1271 _statements.accept(visitor); |
| 1259 } | 1272 } |
| 1260 } | 1273 } |
| 1261 /** | 1274 /** |
| 1262 * Instances of the class {@code BlockFunctionBody} represent a function body th
at consists of a | 1275 * Instances of the class {@code BlockFunctionBody} represent a function body th
at consists of a |
| 1263 * block of statements. | 1276 * block of statements. |
| 1264 * <pre> | 1277 * <pre> |
| 1265 * blockFunctionBody ::={@link Block block}</pre> | 1278 * blockFunctionBody ::={@link Block block}</pre> |
| 1279 * @coverage dart.engine.ast |
| 1266 */ | 1280 */ |
| 1267 class BlockFunctionBody extends FunctionBody { | 1281 class BlockFunctionBody extends FunctionBody { |
| 1268 /** | 1282 /** |
| 1269 * The block representing the body of the function. | 1283 * The block representing the body of the function. |
| 1270 */ | 1284 */ |
| 1271 Block _block; | 1285 Block _block; |
| 1272 /** | 1286 /** |
| 1273 * Initialize a newly created function body consisting of a block of statement
s. | 1287 * Initialize a newly created function body consisting of a block of statement
s. |
| 1274 * @param block the block representing the body of the function | 1288 * @param block the block representing the body of the function |
| 1275 */ | 1289 */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1299 void visitChildren(ASTVisitor<Object> visitor) { | 1313 void visitChildren(ASTVisitor<Object> visitor) { |
| 1300 safelyVisitChild(_block, visitor); | 1314 safelyVisitChild(_block, visitor); |
| 1301 } | 1315 } |
| 1302 } | 1316 } |
| 1303 /** | 1317 /** |
| 1304 * Instances of the class {@code BooleanLiteral} represent a boolean literal exp
ression. | 1318 * Instances of the class {@code BooleanLiteral} represent a boolean literal exp
ression. |
| 1305 * <pre> | 1319 * <pre> |
| 1306 * booleanLiteral ::= | 1320 * booleanLiteral ::= |
| 1307 * 'false' | 'true' | 1321 * 'false' | 'true' |
| 1308 * </pre> | 1322 * </pre> |
| 1323 * @coverage dart.engine.ast |
| 1309 */ | 1324 */ |
| 1310 class BooleanLiteral extends Literal { | 1325 class BooleanLiteral extends Literal { |
| 1311 /** | 1326 /** |
| 1312 * The token representing the literal. | 1327 * The token representing the literal. |
| 1313 */ | 1328 */ |
| 1314 Token _literal; | 1329 Token _literal; |
| 1315 /** | 1330 /** |
| 1316 * The value of the literal. | 1331 * The value of the literal. |
| 1317 */ | 1332 */ |
| 1318 bool _value = false; | 1333 bool _value = false; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 } | 1376 } |
| 1362 void visitChildren(ASTVisitor<Object> visitor) { | 1377 void visitChildren(ASTVisitor<Object> visitor) { |
| 1363 } | 1378 } |
| 1364 } | 1379 } |
| 1365 /** | 1380 /** |
| 1366 * Instances of the class {@code BreakStatement} represent a break statement. | 1381 * Instances of the class {@code BreakStatement} represent a break statement. |
| 1367 * <pre> | 1382 * <pre> |
| 1368 * breakStatement ::= | 1383 * breakStatement ::= |
| 1369 * 'break' {@link SimpleIdentifier label}? ';' | 1384 * 'break' {@link SimpleIdentifier label}? ';' |
| 1370 * </pre> | 1385 * </pre> |
| 1386 * @coverage dart.engine.ast |
| 1371 */ | 1387 */ |
| 1372 class BreakStatement extends Statement { | 1388 class BreakStatement extends Statement { |
| 1373 /** | 1389 /** |
| 1374 * The token representing the 'break' keyword. | 1390 * The token representing the 'break' keyword. |
| 1375 */ | 1391 */ |
| 1376 Token _keyword; | 1392 Token _keyword; |
| 1377 /** | 1393 /** |
| 1378 * The label associated with the statement, or {@code null} if there is no lab
el. | 1394 * The label associated with the statement, or {@code null} if there is no lab
el. |
| 1379 */ | 1395 */ |
| 1380 SimpleIdentifier _label; | 1396 SimpleIdentifier _label; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 * expressions that share a common target. There are three kinds of expressions
that can be used in | 1464 * expressions that share a common target. There are three kinds of expressions
that can be used in |
| 1449 * a cascade expression: {@link IndexExpression}, {@link MethodInvocation} and{@
link PropertyAccess}. | 1465 * a cascade expression: {@link IndexExpression}, {@link MethodInvocation} and{@
link PropertyAccess}. |
| 1450 * <pre> | 1466 * <pre> |
| 1451 * cascadeExpression ::={@link Expression conditionalExpression} cascadeSection | 1467 * cascadeExpression ::={@link Expression conditionalExpression} cascadeSection |
| 1452 * cascadeSection ::= | 1468 * cascadeSection ::= |
| 1453 * '..' (cascadeSelector arguments*) (assignableSelector arguments*)* (assignme
ntOperator expressionWithoutCascade)? | 1469 * '..' (cascadeSelector arguments*) (assignableSelector arguments*)* (assignme
ntOperator expressionWithoutCascade)? |
| 1454 * cascadeSelector ::= | 1470 * cascadeSelector ::= |
| 1455 * '[ ' expression '] ' | 1471 * '[ ' expression '] ' |
| 1456 * | identifier | 1472 * | identifier |
| 1457 * </pre> | 1473 * </pre> |
| 1474 * @coverage dart.engine.ast |
| 1458 */ | 1475 */ |
| 1459 class CascadeExpression extends Expression { | 1476 class CascadeExpression extends Expression { |
| 1460 /** | 1477 /** |
| 1461 * The target of the cascade sections. | 1478 * The target of the cascade sections. |
| 1462 */ | 1479 */ |
| 1463 Expression _target; | 1480 Expression _target; |
| 1464 /** | 1481 /** |
| 1465 * The cascade sections sharing the common target. | 1482 * The cascade sections sharing the common target. |
| 1466 */ | 1483 */ |
| 1467 NodeList<Expression> _cascadeSections; | 1484 NodeList<Expression> _cascadeSections; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 _cascadeSections.accept(visitor); | 1523 _cascadeSections.accept(visitor); |
| 1507 } | 1524 } |
| 1508 } | 1525 } |
| 1509 /** | 1526 /** |
| 1510 * Instances of the class {@code CatchClause} represent a catch clause within a
try statement. | 1527 * Instances of the class {@code CatchClause} represent a catch clause within a
try statement. |
| 1511 * <pre> | 1528 * <pre> |
| 1512 * onPart ::= | 1529 * onPart ::= |
| 1513 * catchPart {@link Block block}| 'on' type catchPart? {@link Block block}catchP
art ::= | 1530 * catchPart {@link Block block}| 'on' type catchPart? {@link Block block}catchP
art ::= |
| 1514 * 'catch' '(' {@link SimpleIdentifier exceptionParameter} (',' {@link SimpleIde
ntifier stackTraceParameter})? ')' | 1531 * 'catch' '(' {@link SimpleIdentifier exceptionParameter} (',' {@link SimpleIde
ntifier stackTraceParameter})? ')' |
| 1515 * </pre> | 1532 * </pre> |
| 1533 * @coverage dart.engine.ast |
| 1516 */ | 1534 */ |
| 1517 class CatchClause extends ASTNode { | 1535 class CatchClause extends ASTNode { |
| 1518 /** | 1536 /** |
| 1519 * The token representing the 'on' keyword, or {@code null} if there is no 'on
' keyword. | 1537 * The token representing the 'on' keyword, or {@code null} if there is no 'on
' keyword. |
| 1520 */ | 1538 */ |
| 1521 Token _onKeyword; | 1539 Token _onKeyword; |
| 1522 /** | 1540 /** |
| 1523 * The type of exceptions caught by this catch clause, or {@code null} if this
catch clause | 1541 * The type of exceptions caught by this catch clause, or {@code null} if this
catch clause |
| 1524 * catches every type of exception. | 1542 * catches every type of exception. |
| 1525 */ | 1543 */ |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 } | 1734 } |
| 1717 } | 1735 } |
| 1718 /** | 1736 /** |
| 1719 * Instances of the class {@code ClassDeclaration} represent the declaration of
a class. | 1737 * Instances of the class {@code ClassDeclaration} represent the declaration of
a class. |
| 1720 * <pre> | 1738 * <pre> |
| 1721 * classDeclaration ::= | 1739 * classDeclaration ::= |
| 1722 * 'abstract'? 'class' {@link SimpleIdentifier name} {@link TypeParameterList ty
peParameterList}? | 1740 * 'abstract'? 'class' {@link SimpleIdentifier name} {@link TypeParameterList ty
peParameterList}? |
| 1723 * ({@link ExtendsClause extendsClause} {@link WithClause withClause}?)?{@link I
mplementsClause implementsClause}? | 1741 * ({@link ExtendsClause extendsClause} {@link WithClause withClause}?)?{@link I
mplementsClause implementsClause}? |
| 1724 * '{' {@link ClassMember classMember}* '}' | 1742 * '{' {@link ClassMember classMember}* '}' |
| 1725 * </pre> | 1743 * </pre> |
| 1744 * @coverage dart.engine.ast |
| 1726 */ | 1745 */ |
| 1727 class ClassDeclaration extends CompilationUnitMember { | 1746 class ClassDeclaration extends CompilationUnitMember { |
| 1728 /** | 1747 /** |
| 1729 * The 'abstract' keyword, or {@code null} if the keyword was absent. | 1748 * The 'abstract' keyword, or {@code null} if the keyword was absent. |
| 1730 */ | 1749 */ |
| 1731 Token _abstractKeyword; | 1750 Token _abstractKeyword; |
| 1732 /** | 1751 /** |
| 1733 * The token representing the 'class' keyword. | 1752 * The token representing the 'class' keyword. |
| 1734 */ | 1753 */ |
| 1735 Token _classKeyword; | 1754 Token _classKeyword; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 Token get firstTokenAfterCommentAndMetadata { | 1961 Token get firstTokenAfterCommentAndMetadata { |
| 1943 if (_abstractKeyword != null) { | 1962 if (_abstractKeyword != null) { |
| 1944 return _abstractKeyword; | 1963 return _abstractKeyword; |
| 1945 } | 1964 } |
| 1946 return _classKeyword; | 1965 return _classKeyword; |
| 1947 } | 1966 } |
| 1948 } | 1967 } |
| 1949 /** | 1968 /** |
| 1950 * The abstract class {@code ClassMember} defines the behavior common to nodes t
hat declare a name | 1969 * The abstract class {@code ClassMember} defines the behavior common to nodes t
hat declare a name |
| 1951 * within the scope of a class. | 1970 * within the scope of a class. |
| 1971 * @coverage dart.engine.ast |
| 1952 */ | 1972 */ |
| 1953 abstract class ClassMember extends Declaration { | 1973 abstract class ClassMember extends Declaration { |
| 1954 /** | 1974 /** |
| 1955 * Initialize a newly created member of a class. | 1975 * Initialize a newly created member of a class. |
| 1956 * @param comment the documentation comment associated with this member | 1976 * @param comment the documentation comment associated with this member |
| 1957 * @param metadata the annotations associated with this member | 1977 * @param metadata the annotations associated with this member |
| 1958 */ | 1978 */ |
| 1959 ClassMember.full(Comment comment, List<Annotation> metadata) : super.full(comm
ent, metadata) { | 1979 ClassMember.full(Comment comment, List<Annotation> metadata) : super.full(comm
ent, metadata) { |
| 1960 } | 1980 } |
| 1961 /** | 1981 /** |
| 1962 * Initialize a newly created member of a class. | 1982 * Initialize a newly created member of a class. |
| 1963 * @param comment the documentation comment associated with this member | 1983 * @param comment the documentation comment associated with this member |
| 1964 * @param metadata the annotations associated with this member | 1984 * @param metadata the annotations associated with this member |
| 1965 */ | 1985 */ |
| 1966 ClassMember({Comment comment, List<Annotation> metadata}) : this.full(comment,
metadata); | 1986 ClassMember({Comment comment, List<Annotation> metadata}) : this.full(comment,
metadata); |
| 1967 } | 1987 } |
| 1968 /** | 1988 /** |
| 1969 * Instances of the class {@code ClassTypeAlias} represent a class type alias. | 1989 * Instances of the class {@code ClassTypeAlias} represent a class type alias. |
| 1970 * <pre> | 1990 * <pre> |
| 1971 * classTypeAlias ::={@link SimpleIdentifier identifier} {@link TypeParameterLis
t typeParameters}? '=' 'abstract'? mixinApplication | 1991 * classTypeAlias ::={@link SimpleIdentifier identifier} {@link TypeParameterLis
t typeParameters}? '=' 'abstract'? mixinApplication |
| 1972 * mixinApplication ::={@link TypeName superclass} {@link WithClause withClause}
{@link ImplementsClause implementsClause}? ';' | 1992 * mixinApplication ::={@link TypeName superclass} {@link WithClause withClause}
{@link ImplementsClause implementsClause}? ';' |
| 1973 * </pre> | 1993 * </pre> |
| 1994 * @coverage dart.engine.ast |
| 1974 */ | 1995 */ |
| 1975 class ClassTypeAlias extends TypeAlias { | 1996 class ClassTypeAlias extends TypeAlias { |
| 1976 /** | 1997 /** |
| 1977 * The name of the class being declared. | 1998 * The name of the class being declared. |
| 1978 */ | 1999 */ |
| 1979 SimpleIdentifier _name; | 2000 SimpleIdentifier _name; |
| 1980 /** | 2001 /** |
| 1981 * The type parameters for the class, or {@code null} if the class does not ha
ve any type | 2002 * The type parameters for the class, or {@code null} if the class does not ha
ve any type |
| 1982 * parameters. | 2003 * parameters. |
| 1983 */ | 2004 */ |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 safelyVisitChild(_superclass, visitor); | 2157 safelyVisitChild(_superclass, visitor); |
| 2137 safelyVisitChild(_withClause, visitor); | 2158 safelyVisitChild(_withClause, visitor); |
| 2138 safelyVisitChild(_implementsClause, visitor); | 2159 safelyVisitChild(_implementsClause, visitor); |
| 2139 } | 2160 } |
| 2140 } | 2161 } |
| 2141 /** | 2162 /** |
| 2142 * Instances of the class {@code Combinator} represent the combinator associated
with an import | 2163 * Instances of the class {@code Combinator} represent the combinator associated
with an import |
| 2143 * directive. | 2164 * directive. |
| 2144 * <pre> | 2165 * <pre> |
| 2145 * combinator ::={@link HideCombinator hideCombinator}| {@link ShowCombinator sh
owCombinator}</pre> | 2166 * combinator ::={@link HideCombinator hideCombinator}| {@link ShowCombinator sh
owCombinator}</pre> |
| 2167 * @coverage dart.engine.ast |
| 2146 */ | 2168 */ |
| 2147 abstract class Combinator extends ASTNode { | 2169 abstract class Combinator extends ASTNode { |
| 2148 /** | 2170 /** |
| 2149 * The keyword specifying what kind of processing is to be done on the importe
d names. | 2171 * The keyword specifying what kind of processing is to be done on the importe
d names. |
| 2150 */ | 2172 */ |
| 2151 Token _keyword; | 2173 Token _keyword; |
| 2152 /** | 2174 /** |
| 2153 * Initialize a newly created import combinator. | 2175 * Initialize a newly created import combinator. |
| 2154 * @param keyword the keyword specifying what kind of processing is to be done
on the imported | 2176 * @param keyword the keyword specifying what kind of processing is to be done
on the imported |
| 2155 * names | 2177 * names |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 * | blockComment | 2209 * | blockComment |
| 2188 * | documentationComment | 2210 * | documentationComment |
| 2189 * endOfLineComment ::= | 2211 * endOfLineComment ::= |
| 2190 * '//' (CHARACTER - EOL)* EOL | 2212 * '//' (CHARACTER - EOL)* EOL |
| 2191 * blockComment ::= | 2213 * blockComment ::= |
| 2192 * '/ *' CHARACTER* '*/' | 2214 * '/ *' CHARACTER* '*/' |
| 2193 * documentationComment ::= | 2215 * documentationComment ::= |
| 2194 * '/ **' (CHARACTER | {@link CommentReference commentReference})* '*/' | 2216 * '/ **' (CHARACTER | {@link CommentReference commentReference})* '*/' |
| 2195 * | ('///' (CHARACTER - EOL)* EOL)+ | 2217 * | ('///' (CHARACTER - EOL)* EOL)+ |
| 2196 * </pre> | 2218 * </pre> |
| 2219 * @coverage dart.engine.ast |
| 2197 */ | 2220 */ |
| 2198 class Comment extends ASTNode { | 2221 class Comment extends ASTNode { |
| 2199 /** | 2222 /** |
| 2200 * Create a block comment. | 2223 * Create a block comment. |
| 2201 * @param tokens the tokens representing the comment | 2224 * @param tokens the tokens representing the comment |
| 2202 * @return the block comment that was created | 2225 * @return the block comment that was created |
| 2203 */ | 2226 */ |
| 2204 static Comment createBlockComment(List<Token> tokens) => new Comment.full(toke
ns, CommentType.BLOCK, null); | 2227 static Comment createBlockComment(List<Token> tokens) => new Comment.full(toke
ns, CommentType.BLOCK, null); |
| 2205 /** | 2228 /** |
| 2206 * Create a documentation comment. | 2229 * Create a documentation comment. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2293 * A block comment. | 2316 * A block comment. |
| 2294 */ | 2317 */ |
| 2295 static final CommentType BLOCK = new CommentType('BLOCK', 1); | 2318 static final CommentType BLOCK = new CommentType('BLOCK', 1); |
| 2296 /** | 2319 /** |
| 2297 * A documentation comment. | 2320 * A documentation comment. |
| 2298 */ | 2321 */ |
| 2299 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2); | 2322 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2); |
| 2300 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION]; | 2323 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION]; |
| 2301 final String __name; | 2324 final String __name; |
| 2302 final int __ordinal; | 2325 final int __ordinal; |
| 2326 int get ordinal => __ordinal; |
| 2303 CommentType(this.__name, this.__ordinal) { | 2327 CommentType(this.__name, this.__ordinal) { |
| 2304 } | 2328 } |
| 2305 String toString() => __name; | 2329 String toString() => __name; |
| 2306 } | 2330 } |
| 2307 /** | 2331 /** |
| 2308 * Instances of the class {@code CommentReference} represent a reference to a Da
rt element that is | 2332 * Instances of the class {@code CommentReference} represent a reference to a Da
rt element that is |
| 2309 * found within a documentation comment. | 2333 * found within a documentation comment. |
| 2310 * <pre> | 2334 * <pre> |
| 2311 * commentReference ::= | 2335 * commentReference ::= |
| 2312 * '[' 'new'? {@link Identifier identifier} ']' | 2336 * '[' 'new'? {@link Identifier identifier} ']' |
| 2313 * </pre> | 2337 * </pre> |
| 2338 * @coverage dart.engine.ast |
| 2314 */ | 2339 */ |
| 2315 class CommentReference extends ASTNode { | 2340 class CommentReference extends ASTNode { |
| 2316 /** | 2341 /** |
| 2317 * The token representing the 'new' keyword, or {@code null} if there was no '
new' keyword. | 2342 * The token representing the 'new' keyword, or {@code null} if there was no '
new' keyword. |
| 2318 */ | 2343 */ |
| 2319 Token _newKeyword; | 2344 Token _newKeyword; |
| 2320 /** | 2345 /** |
| 2321 * The identifier being referenced. | 2346 * The identifier being referenced. |
| 2322 */ | 2347 */ |
| 2323 Identifier _identifier; | 2348 Identifier _identifier; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2346 Identifier get identifier => _identifier; | 2371 Identifier get identifier => _identifier; |
| 2347 /** | 2372 /** |
| 2348 * Return the token representing the 'new' keyword, or {@code null} if there w
as no 'new' keyword. | 2373 * Return the token representing the 'new' keyword, or {@code null} if there w
as no 'new' keyword. |
| 2349 * @return the token representing the 'new' keyword | 2374 * @return the token representing the 'new' keyword |
| 2350 */ | 2375 */ |
| 2351 Token get newKeyword => _newKeyword; | 2376 Token get newKeyword => _newKeyword; |
| 2352 /** | 2377 /** |
| 2353 * Set the identifier being referenced to the given identifier. | 2378 * Set the identifier being referenced to the given identifier. |
| 2354 * @param identifier the identifier being referenced | 2379 * @param identifier the identifier being referenced |
| 2355 */ | 2380 */ |
| 2356 void set identifier(Identifier identifier23) { | 2381 void set identifier(Identifier identifier24) { |
| 2357 identifier23 = becomeParentOf(identifier23); | 2382 identifier24 = becomeParentOf(identifier24); |
| 2358 } | 2383 } |
| 2359 /** | 2384 /** |
| 2360 * Set the token representing the 'new' keyword to the given token. | 2385 * Set the token representing the 'new' keyword to the given token. |
| 2361 * @param newKeyword the token representing the 'new' keyword | 2386 * @param newKeyword the token representing the 'new' keyword |
| 2362 */ | 2387 */ |
| 2363 void set newKeyword(Token newKeyword2) { | 2388 void set newKeyword(Token newKeyword2) { |
| 2364 this._newKeyword = newKeyword2; | 2389 this._newKeyword = newKeyword2; |
| 2365 } | 2390 } |
| 2366 void visitChildren(ASTVisitor<Object> visitor) { | 2391 void visitChildren(ASTVisitor<Object> visitor) { |
| 2367 safelyVisitChild(_identifier, visitor); | 2392 safelyVisitChild(_identifier, visitor); |
| 2368 } | 2393 } |
| 2369 } | 2394 } |
| 2370 /** | 2395 /** |
| 2371 * Instances of the class {@code CompilationUnit} represent a compilation unit. | 2396 * Instances of the class {@code CompilationUnit} represent a compilation unit. |
| 2372 * <p> | 2397 * <p> |
| 2373 * While the grammar restricts the order of the directives and declarations with
in a compilation | 2398 * While the grammar restricts the order of the directives and declarations with
in a compilation |
| 2374 * unit, this class does not enforce those restrictions. In particular, the chil
dren of a | 2399 * unit, this class does not enforce those restrictions. In particular, the chil
dren of a |
| 2375 * compilation unit will be visited in lexical order even if lexical order does
not conform to the | 2400 * compilation unit will be visited in lexical order even if lexical order does
not conform to the |
| 2376 * restrictions of the grammar. | 2401 * restrictions of the grammar. |
| 2377 * <pre> | 2402 * <pre> |
| 2378 * compilationUnit ::= | 2403 * compilationUnit ::= |
| 2379 * directives declarations | 2404 * directives declarations |
| 2380 * directives ::={@link ScriptTag scriptTag}? {@link LibraryDirective libraryDir
ective}? namespaceDirective* {@link PartDirective partDirective}| {@link PartOfD
irective partOfDirective}namespaceDirective ::={@link ImportDirective importDire
ctive}| {@link ExportDirective exportDirective}declarations ::={@link Compilatio
nUnitMember compilationUnitMember}</pre> | 2405 * directives ::={@link ScriptTag scriptTag}? {@link LibraryDirective libraryDir
ective}? namespaceDirective* {@link PartDirective partDirective}| {@link PartOfD
irective partOfDirective}namespaceDirective ::={@link ImportDirective importDire
ctive}| {@link ExportDirective exportDirective}declarations ::={@link Compilatio
nUnitMember compilationUnitMember}</pre> |
| 2406 * @coverage dart.engine.ast |
| 2381 */ | 2407 */ |
| 2382 class CompilationUnit extends ASTNode { | 2408 class CompilationUnit extends ASTNode { |
| 2383 /** | 2409 /** |
| 2384 * The first token in the token stream that was parsed to form this compilatio
n unit. | 2410 * The first token in the token stream that was parsed to form this compilatio
n unit. |
| 2385 */ | 2411 */ |
| 2386 Token _beginToken; | 2412 Token _beginToken; |
| 2387 /** | 2413 /** |
| 2388 * The script tag at the beginning of the compilation unit, or {@code null} if
there is no script | 2414 * The script tag at the beginning of the compilation unit, or {@code null} if
there is no script |
| 2389 * tag in this compilation unit. | 2415 * tag in this compilation unit. |
| 2390 */ | 2416 */ |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 JavaSystem.arraycopy(parserErrors, 0, allErrors, 0, parserErrors.length); | 2508 JavaSystem.arraycopy(parserErrors, 0, allErrors, 0, parserErrors.length); |
| 2483 JavaSystem.arraycopy(resolverErrors, 0, allErrors, parserErrors.length, re
solverErrors.length); | 2509 JavaSystem.arraycopy(resolverErrors, 0, allErrors, parserErrors.length, re
solverErrors.length); |
| 2484 return allErrors; | 2510 return allErrors; |
| 2485 } | 2511 } |
| 2486 } | 2512 } |
| 2487 int get length { | 2513 int get length { |
| 2488 Token endToken3 = endToken; | 2514 Token endToken3 = endToken; |
| 2489 if (endToken3 == null) { | 2515 if (endToken3 == null) { |
| 2490 return 0; | 2516 return 0; |
| 2491 } | 2517 } |
| 2492 return endToken3.offset + endToken3.length - beginToken.offset; | 2518 return endToken3.offset + endToken3.length; |
| 2493 } | 2519 } |
| 2494 /** | 2520 /** |
| 2495 * Get the {@link LineInfo} object for this compilation unit. | 2521 * Get the {@link LineInfo} object for this compilation unit. |
| 2496 * @return the associated {@link LineInfo} | 2522 * @return the associated {@link LineInfo} |
| 2497 */ | 2523 */ |
| 2498 LineInfo get lineInfo => _lineInfo; | 2524 LineInfo get lineInfo => _lineInfo; |
| 2499 int get offset { | 2525 int get offset => 0; |
| 2500 Token beginToken4 = beginToken; | |
| 2501 if (beginToken4 == null) { | |
| 2502 return 0; | |
| 2503 } | |
| 2504 return beginToken4.offset; | |
| 2505 } | |
| 2506 /** | 2526 /** |
| 2507 * Return an array containing all of the parsing errors associated with the re
ceiver. | 2527 * Return an array containing all of the parsing errors associated with the re
ceiver. |
| 2508 * @return an array of errors (not {@code null}, contains no {@code null}s). | 2528 * @return an array of errors (not {@code null}, contains no {@code null}s). |
| 2509 */ | 2529 */ |
| 2510 List<AnalysisError> get parsingErrors => _parsingErrors; | 2530 List<AnalysisError> get parsingErrors => _parsingErrors; |
| 2511 /** | 2531 /** |
| 2512 * Return an array containing all of the resolution errors associated with the
receiver. If the | 2532 * Return an array containing all of the resolution errors associated with the
receiver. If the |
| 2513 * receiver has not been resolved, then return {@code null}. | 2533 * receiver has not been resolved, then return {@code null}. |
| 2514 * @return an array of errors (contains no {@code null}s) or {@code null} if t
he receiver has not | 2534 * @return an array of errors (contains no {@code null}s) or {@code null} if t
he receiver has not |
| 2515 * been resolved | 2535 * been resolved |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2594 List<ASTNode> children = new List.from(childList); | 2614 List<ASTNode> children = new List.from(childList); |
| 2595 children.sort(); | 2615 children.sort(); |
| 2596 return children; | 2616 return children; |
| 2597 } | 2617 } |
| 2598 } | 2618 } |
| 2599 /** | 2619 /** |
| 2600 * Instances of the class {@code CompilationUnitMember} defines the behavior com
mon to nodes that | 2620 * Instances of the class {@code CompilationUnitMember} defines the behavior com
mon to nodes that |
| 2601 * declare a name within the scope of a compilation unit. | 2621 * declare a name within the scope of a compilation unit. |
| 2602 * <pre> | 2622 * <pre> |
| 2603 * compilationUnitMember ::={@link ClassDeclaration classDeclaration}| {@link Ty
peAlias typeAlias}| {@link FunctionDeclaration functionDeclaration}| {@link Meth
odDeclaration getOrSetDeclaration}| {@link VariableDeclaration constantsDeclarat
ion}| {@link VariableDeclaration variablesDeclaration}</pre> | 2623 * compilationUnitMember ::={@link ClassDeclaration classDeclaration}| {@link Ty
peAlias typeAlias}| {@link FunctionDeclaration functionDeclaration}| {@link Meth
odDeclaration getOrSetDeclaration}| {@link VariableDeclaration constantsDeclarat
ion}| {@link VariableDeclaration variablesDeclaration}</pre> |
| 2624 * @coverage dart.engine.ast |
| 2604 */ | 2625 */ |
| 2605 abstract class CompilationUnitMember extends Declaration { | 2626 abstract class CompilationUnitMember extends Declaration { |
| 2606 /** | 2627 /** |
| 2607 * Initialize a newly created generic compilation unit member. | 2628 * Initialize a newly created generic compilation unit member. |
| 2608 * @param comment the documentation comment associated with this member | 2629 * @param comment the documentation comment associated with this member |
| 2609 * @param metadata the annotations associated with this member | 2630 * @param metadata the annotations associated with this member |
| 2610 */ | 2631 */ |
| 2611 CompilationUnitMember.full(Comment comment, List<Annotation> metadata) : super
.full(comment, metadata) { | 2632 CompilationUnitMember.full(Comment comment, List<Annotation> metadata) : super
.full(comment, metadata) { |
| 2612 } | 2633 } |
| 2613 /** | 2634 /** |
| 2614 * Initialize a newly created generic compilation unit member. | 2635 * Initialize a newly created generic compilation unit member. |
| 2615 * @param comment the documentation comment associated with this member | 2636 * @param comment the documentation comment associated with this member |
| 2616 * @param metadata the annotations associated with this member | 2637 * @param metadata the annotations associated with this member |
| 2617 */ | 2638 */ |
| 2618 CompilationUnitMember({Comment comment, List<Annotation> metadata}) : this.ful
l(comment, metadata); | 2639 CompilationUnitMember({Comment comment, List<Annotation> metadata}) : this.ful
l(comment, metadata); |
| 2619 } | 2640 } |
| 2620 /** | 2641 /** |
| 2621 * Instances of the class {@code ConditionalExpression} represent a conditional
expression. | 2642 * Instances of the class {@code ConditionalExpression} represent a conditional
expression. |
| 2622 * <pre> | 2643 * <pre> |
| 2623 * conditionalExpression ::={@link Expression condition} '?' {@link Expression t
henExpression} ':' {@link Expression elseExpression}</pre> | 2644 * conditionalExpression ::={@link Expression condition} '?' {@link Expression t
henExpression} ':' {@link Expression elseExpression}</pre> |
| 2645 * @coverage dart.engine.ast |
| 2624 */ | 2646 */ |
| 2625 class ConditionalExpression extends Expression { | 2647 class ConditionalExpression extends Expression { |
| 2626 /** | 2648 /** |
| 2627 * The condition used to determine which of the expressions is executed next. | 2649 * The condition used to determine which of the expressions is executed next. |
| 2628 */ | 2650 */ |
| 2629 Expression _condition; | 2651 Expression _condition; |
| 2630 /** | 2652 /** |
| 2631 * The token used to separate the condition from the then expression. | 2653 * The token used to separate the condition from the then expression. |
| 2632 */ | 2654 */ |
| 2633 Token _question; | 2655 Token _question; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2747 * | constructorName formalParameterList ':' 'this' ('.' {@link SimpleIdentifier
name})? arguments | 2769 * | constructorName formalParameterList ':' 'this' ('.' {@link SimpleIdentifier
name})? arguments |
| 2748 * constructorSignature ::= | 2770 * constructorSignature ::= |
| 2749 * 'external'? constructorName formalParameterList initializerList? | 2771 * 'external'? constructorName formalParameterList initializerList? |
| 2750 * | 'external'? 'factory' factoryName formalParameterList initializerList? | 2772 * | 'external'? 'factory' factoryName formalParameterList initializerList? |
| 2751 * | 'external'? 'const' constructorName formalParameterList initializerList? | 2773 * | 'external'? 'const' constructorName formalParameterList initializerList? |
| 2752 * constructorName ::={@link SimpleIdentifier returnType} ('.' {@link SimpleIden
tifier name})? | 2774 * constructorName ::={@link SimpleIdentifier returnType} ('.' {@link SimpleIden
tifier name})? |
| 2753 * factoryName ::={@link Identifier returnType} ('.' {@link SimpleIdentifier nam
e})? | 2775 * factoryName ::={@link Identifier returnType} ('.' {@link SimpleIdentifier nam
e})? |
| 2754 * initializerList ::= | 2776 * initializerList ::= |
| 2755 * ':' {@link ConstructorInitializer initializer} (',' {@link ConstructorInitial
izer initializer}) | 2777 * ':' {@link ConstructorInitializer initializer} (',' {@link ConstructorInitial
izer initializer}) |
| 2756 * </pre> | 2778 * </pre> |
| 2779 * @coverage dart.engine.ast |
| 2757 */ | 2780 */ |
| 2758 class ConstructorDeclaration extends ClassMember { | 2781 class ConstructorDeclaration extends ClassMember { |
| 2759 /** | 2782 /** |
| 2760 * The token for the 'external' keyword, or {@code null} if the constructor is
not external. | 2783 * The token for the 'external' keyword, or {@code null} if the constructor is
not external. |
| 2761 */ | 2784 */ |
| 2762 Token _externalKeyword; | 2785 Token _externalKeyword; |
| 2763 /** | 2786 /** |
| 2764 * The token for the 'const' keyword, or {@code null} if the constructor is no
t a const | 2787 * The token for the 'const' keyword, or {@code null} if the constructor is no
t a const |
| 2765 * constructor. | 2788 * constructor. |
| 2766 */ | 2789 */ |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3041 } | 3064 } |
| 3042 return leftMost; | 3065 return leftMost; |
| 3043 } | 3066 } |
| 3044 } | 3067 } |
| 3045 /** | 3068 /** |
| 3046 * Instances of the class {@code ConstructorFieldInitializer} represent the init
ialization of a | 3069 * Instances of the class {@code ConstructorFieldInitializer} represent the init
ialization of a |
| 3047 * field within a constructor's initialization list. | 3070 * field within a constructor's initialization list. |
| 3048 * <pre> | 3071 * <pre> |
| 3049 * fieldInitializer ::= | 3072 * fieldInitializer ::= |
| 3050 * ('this' '.')? {@link SimpleIdentifier fieldName} '=' {@link Expression condit
ionalExpression cascadeSection*}</pre> | 3073 * ('this' '.')? {@link SimpleIdentifier fieldName} '=' {@link Expression condit
ionalExpression cascadeSection*}</pre> |
| 3074 * @coverage dart.engine.ast |
| 3051 */ | 3075 */ |
| 3052 class ConstructorFieldInitializer extends ConstructorInitializer { | 3076 class ConstructorFieldInitializer extends ConstructorInitializer { |
| 3053 /** | 3077 /** |
| 3054 * The token for the 'this' keyword, or {@code null} if there is no 'this' key
word. | 3078 * The token for the 'this' keyword, or {@code null} if there is no 'this' key
word. |
| 3055 */ | 3079 */ |
| 3056 Token _keyword; | 3080 Token _keyword; |
| 3057 /** | 3081 /** |
| 3058 * The token for the period after the 'this' keyword, or {@code null} if there
is no 'this' | 3082 * The token for the period after the 'this' keyword, or {@code null} if there
is no 'this' |
| 3059 * keyword. | 3083 * keyword. |
| 3060 */ | 3084 */ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3170 void visitChildren(ASTVisitor<Object> visitor) { | 3194 void visitChildren(ASTVisitor<Object> visitor) { |
| 3171 safelyVisitChild(_fieldName, visitor); | 3195 safelyVisitChild(_fieldName, visitor); |
| 3172 safelyVisitChild(_expression, visitor); | 3196 safelyVisitChild(_expression, visitor); |
| 3173 } | 3197 } |
| 3174 } | 3198 } |
| 3175 /** | 3199 /** |
| 3176 * Instances of the class {@code ConstructorInitializer} defines the behavior of
nodes that can | 3200 * Instances of the class {@code ConstructorInitializer} defines the behavior of
nodes that can |
| 3177 * occur in the initializer list of a constructor declaration. | 3201 * occur in the initializer list of a constructor declaration. |
| 3178 * <pre> | 3202 * <pre> |
| 3179 * constructorInitializer ::={@link SuperConstructorInvocation superInvocation}|
{@link ConstructorFieldInitializer fieldInitializer}</pre> | 3203 * constructorInitializer ::={@link SuperConstructorInvocation superInvocation}|
{@link ConstructorFieldInitializer fieldInitializer}</pre> |
| 3204 * @coverage dart.engine.ast |
| 3180 */ | 3205 */ |
| 3181 abstract class ConstructorInitializer extends ASTNode { | 3206 abstract class ConstructorInitializer extends ASTNode { |
| 3182 } | 3207 } |
| 3183 /** | 3208 /** |
| 3184 * Instances of the class {@code ConstructorName} represent the name of the cons
tructor. | 3209 * Instances of the class {@code ConstructorName} represent the name of the cons
tructor. |
| 3185 * <pre> | 3210 * <pre> |
| 3186 * constructorName: | 3211 * constructorName: |
| 3187 * type ('.' identifier)? | 3212 * type ('.' identifier)? |
| 3188 * </pre> | 3213 * </pre> |
| 3214 * @coverage dart.engine.ast |
| 3189 */ | 3215 */ |
| 3190 class ConstructorName extends ASTNode { | 3216 class ConstructorName extends ASTNode { |
| 3191 /** | 3217 /** |
| 3192 * The name of the type defining the constructor. | 3218 * The name of the type defining the constructor. |
| 3193 */ | 3219 */ |
| 3194 TypeName _type; | 3220 TypeName _type; |
| 3195 /** | 3221 /** |
| 3196 * The token for the period before the constructor name, or {@code null} if th
e specified | 3222 * The token for the period before the constructor name, or {@code null} if th
e specified |
| 3197 * constructor is the unnamed constructor. | 3223 * constructor is the unnamed constructor. |
| 3198 */ | 3224 */ |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3288 safelyVisitChild(_type, visitor); | 3314 safelyVisitChild(_type, visitor); |
| 3289 safelyVisitChild(_name, visitor); | 3315 safelyVisitChild(_name, visitor); |
| 3290 } | 3316 } |
| 3291 } | 3317 } |
| 3292 /** | 3318 /** |
| 3293 * Instances of the class {@code ContinueStatement} represent a continue stateme
nt. | 3319 * Instances of the class {@code ContinueStatement} represent a continue stateme
nt. |
| 3294 * <pre> | 3320 * <pre> |
| 3295 * continueStatement ::= | 3321 * continueStatement ::= |
| 3296 * 'continue' {@link SimpleIdentifier label}? ';' | 3322 * 'continue' {@link SimpleIdentifier label}? ';' |
| 3297 * </pre> | 3323 * </pre> |
| 3324 * @coverage dart.engine.ast |
| 3298 */ | 3325 */ |
| 3299 class ContinueStatement extends Statement { | 3326 class ContinueStatement extends Statement { |
| 3300 /** | 3327 /** |
| 3301 * The token representing the 'continue' keyword. | 3328 * The token representing the 'continue' keyword. |
| 3302 */ | 3329 */ |
| 3303 Token _keyword; | 3330 Token _keyword; |
| 3304 /** | 3331 /** |
| 3305 * The label associated with the statement, or {@code null} if there is no lab
el. | 3332 * The label associated with the statement, or {@code null} if there is no lab
el. |
| 3306 */ | 3333 */ |
| 3307 SimpleIdentifier _label; | 3334 SimpleIdentifier _label; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3366 void set semicolon(Token semicolon4) { | 3393 void set semicolon(Token semicolon4) { |
| 3367 this._semicolon = semicolon4; | 3394 this._semicolon = semicolon4; |
| 3368 } | 3395 } |
| 3369 void visitChildren(ASTVisitor<Object> visitor) { | 3396 void visitChildren(ASTVisitor<Object> visitor) { |
| 3370 safelyVisitChild(_label, visitor); | 3397 safelyVisitChild(_label, visitor); |
| 3371 } | 3398 } |
| 3372 } | 3399 } |
| 3373 /** | 3400 /** |
| 3374 * The abstract class {@code Declaration} defines the behavior common to nodes t
hat represent the | 3401 * The abstract class {@code Declaration} defines the behavior common to nodes t
hat represent the |
| 3375 * declaration of a name. Each declared name is visible within a name scope. | 3402 * declaration of a name. Each declared name is visible within a name scope. |
| 3403 * @coverage dart.engine.ast |
| 3376 */ | 3404 */ |
| 3377 abstract class Declaration extends AnnotatedNode { | 3405 abstract class Declaration extends AnnotatedNode { |
| 3378 /** | 3406 /** |
| 3379 * Initialize a newly created declaration. | 3407 * Initialize a newly created declaration. |
| 3380 * @param comment the documentation comment associated with this declaration | 3408 * @param comment the documentation comment associated with this declaration |
| 3381 * @param metadata the annotations associated with this declaration | 3409 * @param metadata the annotations associated with this declaration |
| 3382 */ | 3410 */ |
| 3383 Declaration.full(Comment comment, List<Annotation> metadata) : super.full(comm
ent, metadata) { | 3411 Declaration.full(Comment comment, List<Annotation> metadata) : super.full(comm
ent, metadata) { |
| 3384 } | 3412 } |
| 3385 /** | 3413 /** |
| 3386 * Initialize a newly created declaration. | 3414 * Initialize a newly created declaration. |
| 3387 * @param comment the documentation comment associated with this declaration | 3415 * @param comment the documentation comment associated with this declaration |
| 3388 * @param metadata the annotations associated with this declaration | 3416 * @param metadata the annotations associated with this declaration |
| 3389 */ | 3417 */ |
| 3390 Declaration({Comment comment, List<Annotation> metadata}) : this.full(comment,
metadata); | 3418 Declaration({Comment comment, List<Annotation> metadata}) : this.full(comment,
metadata); |
| 3391 /** | 3419 /** |
| 3392 * Return the element associated with this declaration, or {@code null} if eit
her this node | 3420 * Return the element associated with this declaration, or {@code null} if eit
her this node |
| 3393 * corresponds to a list of declarations or if the AST structure has not been
resolved. | 3421 * corresponds to a list of declarations or if the AST structure has not been
resolved. |
| 3394 * @return the element associated with this declaration | 3422 * @return the element associated with this declaration |
| 3395 */ | 3423 */ |
| 3396 Element get element; | 3424 Element get element; |
| 3397 } | 3425 } |
| 3398 /** | 3426 /** |
| 3427 * Instances of the class {@code DeclaredIdentifier} represent the declaration o
f a single |
| 3428 * identifier. |
| 3429 * <pre> |
| 3430 * declaredIdentifier ::= |
| 3431 * ({@link Annotation metadata} finalConstVarOrType {@link SimpleIdentifier iden
tifier}</pre> |
| 3432 * @coverage dart.engine.ast |
| 3433 */ |
| 3434 class DeclaredIdentifier extends Declaration { |
| 3435 /** |
| 3436 * The token representing either the 'final', 'const' or 'var' keyword, or {@c
ode null} if no |
| 3437 * keyword was used. |
| 3438 */ |
| 3439 Token _keyword; |
| 3440 /** |
| 3441 * The name of the declared type of the parameter, or {@code null} if the para
meter does not have |
| 3442 * a declared type. |
| 3443 */ |
| 3444 TypeName _type; |
| 3445 /** |
| 3446 * The name of the variable being declared. |
| 3447 */ |
| 3448 SimpleIdentifier _identifier; |
| 3449 /** |
| 3450 * Initialize a newly created formal parameter. |
| 3451 * @param comment the documentation comment associated with this parameter |
| 3452 * @param metadata the annotations associated with this parameter |
| 3453 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 3454 * @param type the name of the declared type of the parameter |
| 3455 * @param identifier the name of the parameter being declared |
| 3456 */ |
| 3457 DeclaredIdentifier.full(Comment comment, List<Annotation> metadata, Token keyw
ord, TypeName type, SimpleIdentifier identifier) : super.full(comment, metadata)
{ |
| 3458 this._keyword = keyword; |
| 3459 this._type = becomeParentOf(type); |
| 3460 this._identifier = becomeParentOf(identifier); |
| 3461 } |
| 3462 /** |
| 3463 * Initialize a newly created formal parameter. |
| 3464 * @param comment the documentation comment associated with this parameter |
| 3465 * @param metadata the annotations associated with this parameter |
| 3466 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 3467 * @param type the name of the declared type of the parameter |
| 3468 * @param identifier the name of the parameter being declared |
| 3469 */ |
| 3470 DeclaredIdentifier({Comment comment, List<Annotation> metadata, Token keyword,
TypeName type, SimpleIdentifier identifier}) : this.full(comment, metadata, key
word, type, identifier); |
| 3471 accept(ASTVisitor visitor) => visitor.visitDeclaredIdentifier(this); |
| 3472 LocalVariableElement get element { |
| 3473 SimpleIdentifier identifier11 = identifier; |
| 3474 if (identifier11 == null) { |
| 3475 return null; |
| 3476 } |
| 3477 return identifier11.element as LocalVariableElement; |
| 3478 } |
| 3479 Token get endToken => _identifier.endToken; |
| 3480 /** |
| 3481 * Return the name of the variable being declared. |
| 3482 * @return the name of the variable being declared |
| 3483 */ |
| 3484 SimpleIdentifier get identifier => _identifier; |
| 3485 /** |
| 3486 * Return the token representing either the 'final', 'const' or 'var' keyword. |
| 3487 * @return the token representing either the 'final', 'const' or 'var' keyword |
| 3488 */ |
| 3489 Token get keyword => _keyword; |
| 3490 /** |
| 3491 * Return the name of the declared type of the parameter, or {@code null} if t
he parameter does |
| 3492 * not have a declared type. |
| 3493 * @return the name of the declared type of the parameter |
| 3494 */ |
| 3495 TypeName get type => _type; |
| 3496 /** |
| 3497 * Return {@code true} if this variable was declared with the 'const' modifier
. |
| 3498 * @return {@code true} if this variable was declared with the 'const' modifie
r |
| 3499 */ |
| 3500 bool isConst() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.CONST); |
| 3501 /** |
| 3502 * Return {@code true} if this variable was declared with the 'final' modifier
. Variables that are |
| 3503 * declared with the 'const' modifier will return {@code false} even though th
ey are implicitly |
| 3504 * final. |
| 3505 * @return {@code true} if this variable was declared with the 'final' modifie
r |
| 3506 */ |
| 3507 bool isFinal() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.FINAL); |
| 3508 /** |
| 3509 * Set the token representing either the 'final', 'const' or 'var' keyword to
the given token. |
| 3510 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 3511 */ |
| 3512 void set keyword(Token keyword8) { |
| 3513 this._keyword = keyword8; |
| 3514 } |
| 3515 /** |
| 3516 * Set the name of the declared type of the parameter to the given type name. |
| 3517 * @param typeName the name of the declared type of the parameter |
| 3518 */ |
| 3519 void set type(TypeName typeName) { |
| 3520 _type = becomeParentOf(typeName); |
| 3521 } |
| 3522 void visitChildren(ASTVisitor<Object> visitor) { |
| 3523 super.visitChildren(visitor); |
| 3524 safelyVisitChild(_type, visitor); |
| 3525 safelyVisitChild(_identifier, visitor); |
| 3526 } |
| 3527 Token get firstTokenAfterCommentAndMetadata { |
| 3528 if (_keyword != null) { |
| 3529 return _keyword; |
| 3530 } else if (_type != null) { |
| 3531 return _type.beginToken; |
| 3532 } |
| 3533 return _identifier.beginToken; |
| 3534 } |
| 3535 } |
| 3536 /** |
| 3399 * Instances of the class {@code DefaultFormalParameter} represent a formal para
meter with a default | 3537 * Instances of the class {@code DefaultFormalParameter} represent a formal para
meter with a default |
| 3400 * value. There are two kinds of parameters that are both represented by this cl
ass: named formal | 3538 * value. There are two kinds of parameters that are both represented by this cl
ass: named formal |
| 3401 * parameters and positional formal parameters. | 3539 * parameters and positional formal parameters. |
| 3402 * <pre> | 3540 * <pre> |
| 3403 * defaultFormalParameter ::={@link NormalFormalParameter normalFormalParameter}
('=' {@link Expression defaultValue})? | 3541 * defaultFormalParameter ::={@link NormalFormalParameter normalFormalParameter}
('=' {@link Expression defaultValue})? |
| 3404 * defaultNamedParameter ::={@link NormalFormalParameter normalFormalParameter}
(':' {@link Expression defaultValue})? | 3542 * defaultNamedParameter ::={@link NormalFormalParameter normalFormalParameter}
(':' {@link Expression defaultValue})? |
| 3405 * </pre> | 3543 * </pre> |
| 3544 * @coverage dart.engine.ast |
| 3406 */ | 3545 */ |
| 3407 class DefaultFormalParameter extends FormalParameter { | 3546 class DefaultFormalParameter extends FormalParameter { |
| 3408 /** | 3547 /** |
| 3409 * The formal parameter with which the default value is associated. | 3548 * The formal parameter with which the default value is associated. |
| 3410 */ | 3549 */ |
| 3411 NormalFormalParameter _parameter; | 3550 NormalFormalParameter _parameter; |
| 3412 /** | 3551 /** |
| 3413 * The kind of this parameter. | 3552 * The kind of this parameter. |
| 3414 */ | 3553 */ |
| 3415 ParameterKind _kind; | 3554 ParameterKind _kind; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3465 * @return the formal parameter with which the default value is associated | 3604 * @return the formal parameter with which the default value is associated |
| 3466 */ | 3605 */ |
| 3467 NormalFormalParameter get parameter => _parameter; | 3606 NormalFormalParameter get parameter => _parameter; |
| 3468 /** | 3607 /** |
| 3469 * Return the token separating the parameter from the default value, or {@code
null} if there is | 3608 * Return the token separating the parameter from the default value, or {@code
null} if there is |
| 3470 * no default value. | 3609 * no default value. |
| 3471 * @return the token separating the parameter from the default value | 3610 * @return the token separating the parameter from the default value |
| 3472 */ | 3611 */ |
| 3473 Token get separator => _separator; | 3612 Token get separator => _separator; |
| 3474 /** | 3613 /** |
| 3475 * Return {@code true} if this parameter is a const parameter. | 3614 * Return {@code true} if this parameter was declared with the 'const' modifie
r. |
| 3476 * @return {@code true} if this parameter is a const parameter | 3615 * @return {@code true} if this parameter was declared with the 'const' modifi
er |
| 3477 */ | 3616 */ |
| 3478 bool isConst() => _parameter != null && _parameter.isConst(); | 3617 bool isConst() => _parameter != null && _parameter.isConst(); |
| 3479 /** | 3618 /** |
| 3480 * Return {@code true} if this parameter is a final parameter. | 3619 * Return {@code true} if this parameter was declared with the 'final' modifie
r. Parameters that |
| 3481 * @return {@code true} if this parameter is a final parameter | 3620 * are declared with the 'const' modifier will return {@code false} even thoug
h they are |
| 3621 * implicitly final. |
| 3622 * @return {@code true} if this parameter was declared with the 'final' modifi
er |
| 3482 */ | 3623 */ |
| 3483 bool isFinal() => _parameter != null && _parameter.isFinal(); | 3624 bool isFinal() => _parameter != null && _parameter.isFinal(); |
| 3484 /** | 3625 /** |
| 3485 * Set the expression computing the default value for the parameter to the giv
en expression. | 3626 * Set the expression computing the default value for the parameter to the giv
en expression. |
| 3486 * @param expression the expression computing the default value for the parame
ter | 3627 * @param expression the expression computing the default value for the parame
ter |
| 3487 */ | 3628 */ |
| 3488 void set defaultValue(Expression expression) { | 3629 void set defaultValue(Expression expression) { |
| 3489 _defaultValue = becomeParentOf(expression); | 3630 _defaultValue = becomeParentOf(expression); |
| 3490 } | 3631 } |
| 3491 /** | 3632 /** |
| (...skipping 20 matching lines...) Expand all Loading... |
| 3512 void visitChildren(ASTVisitor<Object> visitor) { | 3653 void visitChildren(ASTVisitor<Object> visitor) { |
| 3513 safelyVisitChild(_parameter, visitor); | 3654 safelyVisitChild(_parameter, visitor); |
| 3514 safelyVisitChild(_defaultValue, visitor); | 3655 safelyVisitChild(_defaultValue, visitor); |
| 3515 } | 3656 } |
| 3516 } | 3657 } |
| 3517 /** | 3658 /** |
| 3518 * The abstract class {@code Directive} defines the behavior common to nodes tha
t represent a | 3659 * The abstract class {@code Directive} defines the behavior common to nodes tha
t represent a |
| 3519 * directive. | 3660 * directive. |
| 3520 * <pre> | 3661 * <pre> |
| 3521 * directive ::={@link ExportDirective exportDirective}| {@link ImportDirective
importDirective}| {@link LibraryDirective libraryDirective}| {@link PartDirectiv
e partDirective}| {@link PartOfDirective partOfDirective}</pre> | 3662 * directive ::={@link ExportDirective exportDirective}| {@link ImportDirective
importDirective}| {@link LibraryDirective libraryDirective}| {@link PartDirectiv
e partDirective}| {@link PartOfDirective partOfDirective}</pre> |
| 3663 * @coverage dart.engine.ast |
| 3522 */ | 3664 */ |
| 3523 abstract class Directive extends AnnotatedNode { | 3665 abstract class Directive extends AnnotatedNode { |
| 3524 /** | 3666 /** |
| 3525 * The element associated with this directive, or {@code null} if the AST stru
cture has not been | 3667 * The element associated with this directive, or {@code null} if the AST stru
cture has not been |
| 3526 * resolved or if this directive could not be resolved. | 3668 * resolved or if this directive could not be resolved. |
| 3527 */ | 3669 */ |
| 3528 Element _element; | 3670 Element _element; |
| 3529 /** | 3671 /** |
| 3530 * Initialize a newly create directive. | 3672 * Initialize a newly create directive. |
| 3531 * @param comment the documentation comment associated with this directive | 3673 * @param comment the documentation comment associated with this directive |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3559 void set element(Element element8) { | 3701 void set element(Element element8) { |
| 3560 this._element = element8; | 3702 this._element = element8; |
| 3561 } | 3703 } |
| 3562 } | 3704 } |
| 3563 /** | 3705 /** |
| 3564 * Instances of the class {@code DoStatement} represent a do statement. | 3706 * Instances of the class {@code DoStatement} represent a do statement. |
| 3565 * <pre> | 3707 * <pre> |
| 3566 * doStatement ::= | 3708 * doStatement ::= |
| 3567 * 'do' {@link Statement body} 'while' '(' {@link Expression condition} ')' ';' | 3709 * 'do' {@link Statement body} 'while' '(' {@link Expression condition} ')' ';' |
| 3568 * </pre> | 3710 * </pre> |
| 3711 * @coverage dart.engine.ast |
| 3569 */ | 3712 */ |
| 3570 class DoStatement extends Statement { | 3713 class DoStatement extends Statement { |
| 3571 /** | 3714 /** |
| 3572 * The token representing the 'do' keyword. | 3715 * The token representing the 'do' keyword. |
| 3573 */ | 3716 */ |
| 3574 Token _doKeyword; | 3717 Token _doKeyword; |
| 3575 /** | 3718 /** |
| 3576 * The body of the loop. | 3719 * The body of the loop. |
| 3577 */ | 3720 */ |
| 3578 Statement _body; | 3721 Statement _body; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3720 } | 3863 } |
| 3721 /** | 3864 /** |
| 3722 * Instances of the class {@code DoubleLiteral} represent a floating point liter
al expression. | 3865 * Instances of the class {@code DoubleLiteral} represent a floating point liter
al expression. |
| 3723 * <pre> | 3866 * <pre> |
| 3724 * doubleLiteral ::= | 3867 * doubleLiteral ::= |
| 3725 * decimalDigit+ ('.' decimalDigit*)? exponent? | 3868 * decimalDigit+ ('.' decimalDigit*)? exponent? |
| 3726 * | '.' decimalDigit+ exponent? | 3869 * | '.' decimalDigit+ exponent? |
| 3727 * exponent ::= | 3870 * exponent ::= |
| 3728 * ('e' | 'E') ('+' | '-')? decimalDigit+ | 3871 * ('e' | 'E') ('+' | '-')? decimalDigit+ |
| 3729 * </pre> | 3872 * </pre> |
| 3873 * @coverage dart.engine.ast |
| 3730 */ | 3874 */ |
| 3731 class DoubleLiteral extends Literal { | 3875 class DoubleLiteral extends Literal { |
| 3732 /** | 3876 /** |
| 3733 * The token representing the literal. | 3877 * The token representing the literal. |
| 3734 */ | 3878 */ |
| 3735 Token _literal; | 3879 Token _literal; |
| 3736 /** | 3880 /** |
| 3737 * The value of the literal. | 3881 * The value of the literal. |
| 3738 */ | 3882 */ |
| 3739 double _value = 0.0; | 3883 double _value = 0.0; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3782 void visitChildren(ASTVisitor<Object> visitor) { | 3926 void visitChildren(ASTVisitor<Object> visitor) { |
| 3783 } | 3927 } |
| 3784 } | 3928 } |
| 3785 /** | 3929 /** |
| 3786 * Instances of the class {@code EmptyFunctionBody} represent an empty function
body, which can only | 3930 * Instances of the class {@code EmptyFunctionBody} represent an empty function
body, which can only |
| 3787 * appear in constructors or abstract methods. | 3931 * appear in constructors or abstract methods. |
| 3788 * <pre> | 3932 * <pre> |
| 3789 * emptyFunctionBody ::= | 3933 * emptyFunctionBody ::= |
| 3790 * ';' | 3934 * ';' |
| 3791 * </pre> | 3935 * </pre> |
| 3936 * @coverage dart.engine.ast |
| 3792 */ | 3937 */ |
| 3793 class EmptyFunctionBody extends FunctionBody { | 3938 class EmptyFunctionBody extends FunctionBody { |
| 3794 /** | 3939 /** |
| 3795 * The token representing the semicolon that marks the end of the function bod
y. | 3940 * The token representing the semicolon that marks the end of the function bod
y. |
| 3796 */ | 3941 */ |
| 3797 Token _semicolon; | 3942 Token _semicolon; |
| 3798 /** | 3943 /** |
| 3799 * Initialize a newly created function body. | 3944 * Initialize a newly created function body. |
| 3800 * @param semicolon the token representing the semicolon that marks the end of
the function body | 3945 * @param semicolon the token representing the semicolon that marks the end of
the function body |
| 3801 */ | 3946 */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3825 } | 3970 } |
| 3826 void visitChildren(ASTVisitor<Object> visitor) { | 3971 void visitChildren(ASTVisitor<Object> visitor) { |
| 3827 } | 3972 } |
| 3828 } | 3973 } |
| 3829 /** | 3974 /** |
| 3830 * Instances of the class {@code EmptyStatement} represent an empty statement. | 3975 * Instances of the class {@code EmptyStatement} represent an empty statement. |
| 3831 * <pre> | 3976 * <pre> |
| 3832 * emptyStatement ::= | 3977 * emptyStatement ::= |
| 3833 * ';' | 3978 * ';' |
| 3834 * </pre> | 3979 * </pre> |
| 3980 * @coverage dart.engine.ast |
| 3835 */ | 3981 */ |
| 3836 class EmptyStatement extends Statement { | 3982 class EmptyStatement extends Statement { |
| 3837 /** | 3983 /** |
| 3838 * The semicolon terminating the statement. | 3984 * The semicolon terminating the statement. |
| 3839 */ | 3985 */ |
| 3840 Token _semicolon; | 3986 Token _semicolon; |
| 3841 /** | 3987 /** |
| 3842 * Initialize a newly created empty statement. | 3988 * Initialize a newly created empty statement. |
| 3843 * @param semicolon the semicolon terminating the statement | 3989 * @param semicolon the semicolon terminating the statement |
| 3844 */ | 3990 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3863 * @param semicolon the semicolon terminating the statement | 4009 * @param semicolon the semicolon terminating the statement |
| 3864 */ | 4010 */ |
| 3865 void set semicolon(Token semicolon7) { | 4011 void set semicolon(Token semicolon7) { |
| 3866 this._semicolon = semicolon7; | 4012 this._semicolon = semicolon7; |
| 3867 } | 4013 } |
| 3868 void visitChildren(ASTVisitor<Object> visitor) { | 4014 void visitChildren(ASTVisitor<Object> visitor) { |
| 3869 } | 4015 } |
| 3870 } | 4016 } |
| 3871 /** | 4017 /** |
| 3872 * Ephemeral identifiers are created as needed to mimic the presence of an empty
identifier. | 4018 * Ephemeral identifiers are created as needed to mimic the presence of an empty
identifier. |
| 4019 * @coverage dart.engine.ast |
| 3873 */ | 4020 */ |
| 3874 class EphemeralIdentifier extends SimpleIdentifier { | 4021 class EphemeralIdentifier extends SimpleIdentifier { |
| 3875 EphemeralIdentifier.full(ASTNode parent, int location) : super.full(new Token(
TokenType.IDENTIFIER, location)) { | 4022 EphemeralIdentifier.full(ASTNode parent, int location) : super.full(new Token(
TokenType.IDENTIFIER, location)) { |
| 3876 parent.becomeParentOf(this); | 4023 parent.becomeParentOf(this); |
| 3877 } | 4024 } |
| 3878 EphemeralIdentifier({ASTNode parent, int location}) : this.full(parent, locati
on); | 4025 EphemeralIdentifier({ASTNode parent, int location}) : this.full(parent, locati
on); |
| 3879 } | 4026 } |
| 3880 /** | 4027 /** |
| 3881 * Instances of the class {@code ExportDirective} represent an export directive. | 4028 * Instances of the class {@code ExportDirective} represent an export directive. |
| 3882 * <pre> | 4029 * <pre> |
| 3883 * exportDirective ::={@link Annotation metadata} 'export' {@link StringLiteral
libraryUri} {@link Combinator combinator}* ';' | 4030 * exportDirective ::={@link Annotation metadata} 'export' {@link StringLiteral
libraryUri} {@link Combinator combinator}* ';' |
| 3884 * </pre> | 4031 * </pre> |
| 4032 * @coverage dart.engine.ast |
| 3885 */ | 4033 */ |
| 3886 class ExportDirective extends NamespaceDirective { | 4034 class ExportDirective extends NamespaceDirective { |
| 3887 /** | 4035 /** |
| 3888 * Initialize a newly created export directive. | 4036 * Initialize a newly created export directive. |
| 3889 * @param comment the documentation comment associated with this directive | 4037 * @param comment the documentation comment associated with this directive |
| 3890 * @param metadata the annotations associated with the directive | 4038 * @param metadata the annotations associated with the directive |
| 3891 * @param keyword the token representing the 'export' keyword | 4039 * @param keyword the token representing the 'export' keyword |
| 3892 * @param libraryUri the URI of the library being exported | 4040 * @param libraryUri the URI of the library being exported |
| 3893 * @param combinators the combinators used to control which names are exported | 4041 * @param combinators the combinators used to control which names are exported |
| 3894 * @param semicolon the semicolon terminating the directive | 4042 * @param semicolon the semicolon terminating the directive |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3910 super.visitChildren(visitor); | 4058 super.visitChildren(visitor); |
| 3911 combinators.accept(visitor); | 4059 combinators.accept(visitor); |
| 3912 } | 4060 } |
| 3913 } | 4061 } |
| 3914 /** | 4062 /** |
| 3915 * Instances of the class {@code Expression} defines the behavior common to node
s that represent an | 4063 * Instances of the class {@code Expression} defines the behavior common to node
s that represent an |
| 3916 * expression. | 4064 * expression. |
| 3917 * <pre> | 4065 * <pre> |
| 3918 * expression ::={@link AssignmentExpression assignmentExpression}| {@link Condi
tionalExpression conditionalExpression} cascadeSection | 4066 * expression ::={@link AssignmentExpression assignmentExpression}| {@link Condi
tionalExpression conditionalExpression} cascadeSection |
| 3919 * | {@link ThrowExpression throwExpression}</pre> | 4067 * | {@link ThrowExpression throwExpression}</pre> |
| 4068 * @coverage dart.engine.ast |
| 3920 */ | 4069 */ |
| 3921 abstract class Expression extends ASTNode { | 4070 abstract class Expression extends ASTNode { |
| 3922 /** | 4071 /** |
| 3923 * The static type of this expression, or {@code null} if the AST structure ha
s not been resolved. | 4072 * The static type of this expression, or {@code null} if the AST structure ha
s not been resolved. |
| 3924 */ | 4073 */ |
| 3925 Type2 _staticType; | 4074 Type2 _staticType; |
| 3926 /** | 4075 /** |
| 3927 * The propagated type of this expression, or {@code null} if type propagation
has not been | 4076 * The propagated type of this expression, or {@code null} if type propagation
has not been |
| 3928 * performed on the AST structure. | 4077 * performed on the AST structure. |
| 3929 */ | 4078 */ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3975 this._staticType = staticType2; | 4124 this._staticType = staticType2; |
| 3976 } | 4125 } |
| 3977 } | 4126 } |
| 3978 /** | 4127 /** |
| 3979 * Instances of the class {@code ExpressionFunctionBody} represent a function bo
dy consisting of a | 4128 * Instances of the class {@code ExpressionFunctionBody} represent a function bo
dy consisting of a |
| 3980 * single expression. | 4129 * single expression. |
| 3981 * <pre> | 4130 * <pre> |
| 3982 * expressionFunctionBody ::= | 4131 * expressionFunctionBody ::= |
| 3983 * '=>' {@link Expression expression} ';' | 4132 * '=>' {@link Expression expression} ';' |
| 3984 * </pre> | 4133 * </pre> |
| 4134 * @coverage dart.engine.ast |
| 3985 */ | 4135 */ |
| 3986 class ExpressionFunctionBody extends FunctionBody { | 4136 class ExpressionFunctionBody extends FunctionBody { |
| 3987 /** | 4137 /** |
| 3988 * The token introducing the expression that represents the body of the functi
on. | 4138 * The token introducing the expression that represents the body of the functi
on. |
| 3989 */ | 4139 */ |
| 3990 Token _functionDefinition; | 4140 Token _functionDefinition; |
| 3991 /** | 4141 /** |
| 3992 * The expression representing the body of the function. | 4142 * The expression representing the body of the function. |
| 3993 */ | 4143 */ |
| 3994 Expression _expression; | 4144 Expression _expression; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4063 } | 4213 } |
| 4064 void visitChildren(ASTVisitor<Object> visitor) { | 4214 void visitChildren(ASTVisitor<Object> visitor) { |
| 4065 safelyVisitChild(_expression, visitor); | 4215 safelyVisitChild(_expression, visitor); |
| 4066 } | 4216 } |
| 4067 } | 4217 } |
| 4068 /** | 4218 /** |
| 4069 * Instances of the class {@code ExpressionStatement} wrap an expression as a st
atement. | 4219 * Instances of the class {@code ExpressionStatement} wrap an expression as a st
atement. |
| 4070 * <pre> | 4220 * <pre> |
| 4071 * expressionStatement ::={@link Expression expression}? ';' | 4221 * expressionStatement ::={@link Expression expression}? ';' |
| 4072 * </pre> | 4222 * </pre> |
| 4223 * @coverage dart.engine.ast |
| 4073 */ | 4224 */ |
| 4074 class ExpressionStatement extends Statement { | 4225 class ExpressionStatement extends Statement { |
| 4075 /** | 4226 /** |
| 4076 * The expression that comprises the statement. | 4227 * The expression that comprises the statement. |
| 4077 */ | 4228 */ |
| 4078 Expression _expression; | 4229 Expression _expression; |
| 4079 /** | 4230 /** |
| 4080 * The semicolon terminating the statement, or {@code null} if the expression
is a function | 4231 * The semicolon terminating the statement, or {@code null} if the expression
is a function |
| 4081 * expression and isn't followed by a semicolon. | 4232 * expression and isn't followed by a semicolon. |
| 4082 */ | 4233 */ |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4132 void visitChildren(ASTVisitor<Object> visitor) { | 4283 void visitChildren(ASTVisitor<Object> visitor) { |
| 4133 safelyVisitChild(_expression, visitor); | 4284 safelyVisitChild(_expression, visitor); |
| 4134 } | 4285 } |
| 4135 } | 4286 } |
| 4136 /** | 4287 /** |
| 4137 * Instances of the class {@code ExtendsClause} represent the "extends" clause i
n a class | 4288 * Instances of the class {@code ExtendsClause} represent the "extends" clause i
n a class |
| 4138 * declaration. | 4289 * declaration. |
| 4139 * <pre> | 4290 * <pre> |
| 4140 * extendsClause ::= | 4291 * extendsClause ::= |
| 4141 * 'extends' {@link TypeName superclass}</pre> | 4292 * 'extends' {@link TypeName superclass}</pre> |
| 4293 * @coverage dart.engine.ast |
| 4142 */ | 4294 */ |
| 4143 class ExtendsClause extends ASTNode { | 4295 class ExtendsClause extends ASTNode { |
| 4144 /** | 4296 /** |
| 4145 * The token representing the 'extends' keyword. | 4297 * The token representing the 'extends' keyword. |
| 4146 */ | 4298 */ |
| 4147 Token _keyword; | 4299 Token _keyword; |
| 4148 /** | 4300 /** |
| 4149 * The name of the class that is being extended. | 4301 * The name of the class that is being extended. |
| 4150 */ | 4302 */ |
| 4151 TypeName _superclass; | 4303 TypeName _superclass; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 4174 Token get keyword => _keyword; | 4326 Token get keyword => _keyword; |
| 4175 /** | 4327 /** |
| 4176 * Return the name of the class that is being extended. | 4328 * Return the name of the class that is being extended. |
| 4177 * @return the name of the class that is being extended | 4329 * @return the name of the class that is being extended |
| 4178 */ | 4330 */ |
| 4179 TypeName get superclass => _superclass; | 4331 TypeName get superclass => _superclass; |
| 4180 /** | 4332 /** |
| 4181 * Set the token representing the 'extends' keyword to the given token. | 4333 * Set the token representing the 'extends' keyword to the given token. |
| 4182 * @param keyword the token representing the 'extends' keyword | 4334 * @param keyword the token representing the 'extends' keyword |
| 4183 */ | 4335 */ |
| 4184 void set keyword(Token keyword8) { | 4336 void set keyword(Token keyword9) { |
| 4185 this._keyword = keyword8; | 4337 this._keyword = keyword9; |
| 4186 } | 4338 } |
| 4187 /** | 4339 /** |
| 4188 * Set the name of the class that is being extended to the given name. | 4340 * Set the name of the class that is being extended to the given name. |
| 4189 * @param name the name of the class that is being extended | 4341 * @param name the name of the class that is being extended |
| 4190 */ | 4342 */ |
| 4191 void set superclass(TypeName name) { | 4343 void set superclass(TypeName name) { |
| 4192 _superclass = becomeParentOf(name); | 4344 _superclass = becomeParentOf(name); |
| 4193 } | 4345 } |
| 4194 void visitChildren(ASTVisitor<Object> visitor) { | 4346 void visitChildren(ASTVisitor<Object> visitor) { |
| 4195 safelyVisitChild(_superclass, visitor); | 4347 safelyVisitChild(_superclass, visitor); |
| 4196 } | 4348 } |
| 4197 } | 4349 } |
| 4198 /** | 4350 /** |
| 4199 * Instances of the class {@code FieldDeclaration} represent the declaration of
one or more fields | 4351 * Instances of the class {@code FieldDeclaration} represent the declaration of
one or more fields |
| 4200 * of the same type. | 4352 * of the same type. |
| 4201 * <pre> | 4353 * <pre> |
| 4202 * fieldDeclaration ::= | 4354 * fieldDeclaration ::= |
| 4203 * 'static'? {@link VariableDeclarationList fieldList} ';' | 4355 * 'static'? {@link VariableDeclarationList fieldList} ';' |
| 4204 * </pre> | 4356 * </pre> |
| 4357 * @coverage dart.engine.ast |
| 4205 */ | 4358 */ |
| 4206 class FieldDeclaration extends ClassMember { | 4359 class FieldDeclaration extends ClassMember { |
| 4207 /** | 4360 /** |
| 4208 * The token representing the 'static' keyword, or {@code null} if the fields
are not static. | 4361 * The token representing the 'static' keyword, or {@code null} if the fields
are not static. |
| 4209 */ | 4362 */ |
| 4210 Token _keyword; | 4363 Token _keyword; |
| 4211 /** | 4364 /** |
| 4212 * The fields being declared. | 4365 * The fields being declared. |
| 4213 */ | 4366 */ |
| 4214 VariableDeclarationList _fieldList; | 4367 VariableDeclarationList _fieldList; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4261 * Set the fields being declared to the given list of variables. | 4414 * Set the fields being declared to the given list of variables. |
| 4262 * @param fieldList the fields being declared | 4415 * @param fieldList the fields being declared |
| 4263 */ | 4416 */ |
| 4264 void set fields(VariableDeclarationList fieldList) { | 4417 void set fields(VariableDeclarationList fieldList) { |
| 4265 fieldList = becomeParentOf(fieldList); | 4418 fieldList = becomeParentOf(fieldList); |
| 4266 } | 4419 } |
| 4267 /** | 4420 /** |
| 4268 * Set the token representing the 'static' keyword to the given token. | 4421 * Set the token representing the 'static' keyword to the given token. |
| 4269 * @param keyword the token representing the 'static' keyword | 4422 * @param keyword the token representing the 'static' keyword |
| 4270 */ | 4423 */ |
| 4271 void set keyword(Token keyword9) { | 4424 void set keyword(Token keyword10) { |
| 4272 this._keyword = keyword9; | 4425 this._keyword = keyword10; |
| 4273 } | 4426 } |
| 4274 /** | 4427 /** |
| 4275 * Set the semicolon terminating the declaration to the given token. | 4428 * Set the semicolon terminating the declaration to the given token. |
| 4276 * @param semicolon the semicolon terminating the declaration | 4429 * @param semicolon the semicolon terminating the declaration |
| 4277 */ | 4430 */ |
| 4278 void set semicolon(Token semicolon10) { | 4431 void set semicolon(Token semicolon10) { |
| 4279 this._semicolon = semicolon10; | 4432 this._semicolon = semicolon10; |
| 4280 } | 4433 } |
| 4281 void visitChildren(ASTVisitor<Object> visitor) { | 4434 void visitChildren(ASTVisitor<Object> visitor) { |
| 4282 super.visitChildren(visitor); | 4435 super.visitChildren(visitor); |
| 4283 safelyVisitChild(_fieldList, visitor); | 4436 safelyVisitChild(_fieldList, visitor); |
| 4284 } | 4437 } |
| 4285 Token get firstTokenAfterCommentAndMetadata { | 4438 Token get firstTokenAfterCommentAndMetadata { |
| 4286 if (_keyword != null) { | 4439 if (_keyword != null) { |
| 4287 return _keyword; | 4440 return _keyword; |
| 4288 } | 4441 } |
| 4289 return _fieldList.beginToken; | 4442 return _fieldList.beginToken; |
| 4290 } | 4443 } |
| 4291 } | 4444 } |
| 4292 /** | 4445 /** |
| 4293 * Instances of the class {@code FieldFormalParameter} represent a field formal
parameter. | 4446 * Instances of the class {@code FieldFormalParameter} represent a field formal
parameter. |
| 4294 * <pre> | 4447 * <pre> |
| 4295 * fieldFormalParameter ::= | 4448 * fieldFormalParameter ::= |
| 4296 * ('final' {@link TypeName type} | 'const' {@link TypeName type} | 'var' | {@li
nk TypeName type})? 'this' '.' {@link SimpleIdentifier identifier}</pre> | 4449 * ('final' {@link TypeName type} | 'const' {@link TypeName type} | 'var' | {@li
nk TypeName type})? 'this' '.' {@link SimpleIdentifier identifier}</pre> |
| 4450 * @coverage dart.engine.ast |
| 4297 */ | 4451 */ |
| 4298 class FieldFormalParameter extends NormalFormalParameter { | 4452 class FieldFormalParameter extends NormalFormalParameter { |
| 4299 /** | 4453 /** |
| 4300 * The token representing either the 'final', 'const' or 'var' keyword, or {@c
ode null} if no | 4454 * The token representing either the 'final', 'const' or 'var' keyword, or {@c
ode null} if no |
| 4301 * keyword was used. | 4455 * keyword was used. |
| 4302 */ | 4456 */ |
| 4303 Token _keyword; | 4457 Token _keyword; |
| 4304 /** | 4458 /** |
| 4305 * The name of the declared type of the parameter, or {@code null} if the para
meter does not have | 4459 * The name of the declared type of the parameter, or {@code null} if the para
meter does not have |
| 4306 * a declared type. | 4460 * a declared type. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4371 * not have a declared type. | 4525 * not have a declared type. |
| 4372 * @return the name of the declared type of the parameter | 4526 * @return the name of the declared type of the parameter |
| 4373 */ | 4527 */ |
| 4374 TypeName get type => _type; | 4528 TypeName get type => _type; |
| 4375 bool isConst() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.CONST); | 4529 bool isConst() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.CONST); |
| 4376 bool isFinal() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.FINAL); | 4530 bool isFinal() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.FINAL); |
| 4377 /** | 4531 /** |
| 4378 * Set the token representing either the 'final', 'const' or 'var' keyword to
the given token. | 4532 * Set the token representing either the 'final', 'const' or 'var' keyword to
the given token. |
| 4379 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 4533 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 4380 */ | 4534 */ |
| 4381 void set keyword(Token keyword10) { | 4535 void set keyword(Token keyword11) { |
| 4382 this._keyword = keyword10; | 4536 this._keyword = keyword11; |
| 4383 } | 4537 } |
| 4384 /** | 4538 /** |
| 4385 * Set the token representing the period to the given token. | 4539 * Set the token representing the period to the given token. |
| 4386 * @param period the token representing the period | 4540 * @param period the token representing the period |
| 4387 */ | 4541 */ |
| 4388 void set period(Token period6) { | 4542 void set period(Token period6) { |
| 4389 this._period = period6; | 4543 this._period = period6; |
| 4390 } | 4544 } |
| 4391 /** | 4545 /** |
| 4392 * Set the token representing the 'this' keyword to the given token. | 4546 * Set the token representing the 'this' keyword to the given token. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 4406 super.visitChildren(visitor); | 4560 super.visitChildren(visitor); |
| 4407 safelyVisitChild(_type, visitor); | 4561 safelyVisitChild(_type, visitor); |
| 4408 safelyVisitChild(identifier, visitor); | 4562 safelyVisitChild(identifier, visitor); |
| 4409 } | 4563 } |
| 4410 } | 4564 } |
| 4411 /** | 4565 /** |
| 4412 * Instances of the class {@code ForEachStatement} represent a for-each statemen
t. | 4566 * Instances of the class {@code ForEachStatement} represent a for-each statemen
t. |
| 4413 * <pre> | 4567 * <pre> |
| 4414 * forEachStatement ::= | 4568 * forEachStatement ::= |
| 4415 * 'for' '(' {@link SimpleFormalParameter loopParameter} 'in' {@link Expression
iterator} ')' {@link Block body}</pre> | 4569 * 'for' '(' {@link SimpleFormalParameter loopParameter} 'in' {@link Expression
iterator} ')' {@link Block body}</pre> |
| 4570 * @coverage dart.engine.ast |
| 4416 */ | 4571 */ |
| 4417 class ForEachStatement extends Statement { | 4572 class ForEachStatement extends Statement { |
| 4418 /** | 4573 /** |
| 4419 * The token representing the 'for' keyword. | 4574 * The token representing the 'for' keyword. |
| 4420 */ | 4575 */ |
| 4421 Token _forKeyword; | 4576 Token _forKeyword; |
| 4422 /** | 4577 /** |
| 4423 * The left parenthesis. | 4578 * The left parenthesis. |
| 4424 */ | 4579 */ |
| 4425 Token _leftParenthesis; | 4580 Token _leftParenthesis; |
| 4426 /** | 4581 /** |
| 4427 * The declaration of the loop variable. | 4582 * The declaration of the loop variable. |
| 4428 */ | 4583 */ |
| 4429 SimpleFormalParameter _loopParameter; | 4584 DeclaredIdentifier _loopVariable; |
| 4430 /** | 4585 /** |
| 4431 * The token representing the 'in' keyword. | 4586 * The token representing the 'in' keyword. |
| 4432 */ | 4587 */ |
| 4433 Token _inKeyword; | 4588 Token _inKeyword; |
| 4434 /** | 4589 /** |
| 4435 * The expression evaluated to produce the iterator. | 4590 * The expression evaluated to produce the iterator. |
| 4436 */ | 4591 */ |
| 4437 Expression _iterator; | 4592 Expression _iterator; |
| 4438 /** | 4593 /** |
| 4439 * The right parenthesis. | 4594 * The right parenthesis. |
| 4440 */ | 4595 */ |
| 4441 Token _rightParenthesis; | 4596 Token _rightParenthesis; |
| 4442 /** | 4597 /** |
| 4443 * The body of the loop. | 4598 * The body of the loop. |
| 4444 */ | 4599 */ |
| 4445 Statement _body; | 4600 Statement _body; |
| 4446 /** | 4601 /** |
| 4447 * Initialize a newly created for-each statement. | 4602 * Initialize a newly created for-each statement. |
| 4448 * @param forKeyword the token representing the 'for' keyword | 4603 * @param forKeyword the token representing the 'for' keyword |
| 4449 * @param leftParenthesis the left parenthesis | 4604 * @param leftParenthesis the left parenthesis |
| 4450 * @param loopParameter the declaration of the loop variable | 4605 * @param loopVariable the declaration of the loop variable |
| 4451 * @param iterator the expression evaluated to produce the iterator | 4606 * @param iterator the expression evaluated to produce the iterator |
| 4452 * @param rightParenthesis the right parenthesis | 4607 * @param rightParenthesis the right parenthesis |
| 4453 * @param body the body of the loop | 4608 * @param body the body of the loop |
| 4454 */ | 4609 */ |
| 4455 ForEachStatement.full(Token forKeyword, Token leftParenthesis, SimpleFormalPar
ameter loopParameter, Token inKeyword, Expression iterator, Token rightParenthes
is, Statement body) { | 4610 ForEachStatement.full(Token forKeyword, Token leftParenthesis, DeclaredIdentif
ier loopVariable, Token inKeyword, Expression iterator, Token rightParenthesis,
Statement body) { |
| 4456 this._forKeyword = forKeyword; | 4611 this._forKeyword = forKeyword; |
| 4457 this._leftParenthesis = leftParenthesis; | 4612 this._leftParenthesis = leftParenthesis; |
| 4458 this._loopParameter = becomeParentOf(loopParameter); | 4613 this._loopVariable = becomeParentOf(loopVariable); |
| 4459 this._inKeyword = inKeyword; | 4614 this._inKeyword = inKeyword; |
| 4460 this._iterator = becomeParentOf(iterator); | 4615 this._iterator = becomeParentOf(iterator); |
| 4461 this._rightParenthesis = rightParenthesis; | 4616 this._rightParenthesis = rightParenthesis; |
| 4462 this._body = becomeParentOf(body); | 4617 this._body = becomeParentOf(body); |
| 4463 } | 4618 } |
| 4464 /** | 4619 /** |
| 4465 * Initialize a newly created for-each statement. | 4620 * Initialize a newly created for-each statement. |
| 4466 * @param forKeyword the token representing the 'for' keyword | 4621 * @param forKeyword the token representing the 'for' keyword |
| 4467 * @param leftParenthesis the left parenthesis | 4622 * @param leftParenthesis the left parenthesis |
| 4468 * @param loopParameter the declaration of the loop variable | 4623 * @param loopVariable the declaration of the loop variable |
| 4469 * @param iterator the expression evaluated to produce the iterator | 4624 * @param iterator the expression evaluated to produce the iterator |
| 4470 * @param rightParenthesis the right parenthesis | 4625 * @param rightParenthesis the right parenthesis |
| 4471 * @param body the body of the loop | 4626 * @param body the body of the loop |
| 4472 */ | 4627 */ |
| 4473 ForEachStatement({Token forKeyword, Token leftParenthesis, SimpleFormalParamet
er loopParameter, Token inKeyword, Expression iterator, Token rightParenthesis,
Statement body}) : this.full(forKeyword, leftParenthesis, loopParameter, inKeywo
rd, iterator, rightParenthesis, body); | 4628 ForEachStatement({Token forKeyword, Token leftParenthesis, DeclaredIdentifier
loopVariable, Token inKeyword, Expression iterator, Token rightParenthesis, Stat
ement body}) : this.full(forKeyword, leftParenthesis, loopVariable, inKeyword, i
terator, rightParenthesis, body); |
| 4474 accept(ASTVisitor visitor) => visitor.visitForEachStatement(this); | 4629 accept(ASTVisitor visitor) => visitor.visitForEachStatement(this); |
| 4475 Token get beginToken => _forKeyword; | 4630 Token get beginToken => _forKeyword; |
| 4476 /** | 4631 /** |
| 4477 * Return the body of the loop. | 4632 * Return the body of the loop. |
| 4478 * @return the body of the loop | 4633 * @return the body of the loop |
| 4479 */ | 4634 */ |
| 4480 Statement get body => _body; | 4635 Statement get body => _body; |
| 4481 Token get endToken => _body.endToken; | 4636 Token get endToken => _body.endToken; |
| 4482 /** | 4637 /** |
| 4483 * Return the token representing the 'for' keyword. | 4638 * Return the token representing the 'for' keyword. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 4496 Expression get iterator => _iterator; | 4651 Expression get iterator => _iterator; |
| 4497 /** | 4652 /** |
| 4498 * Return the left parenthesis. | 4653 * Return the left parenthesis. |
| 4499 * @return the left parenthesis | 4654 * @return the left parenthesis |
| 4500 */ | 4655 */ |
| 4501 Token get leftParenthesis => _leftParenthesis; | 4656 Token get leftParenthesis => _leftParenthesis; |
| 4502 /** | 4657 /** |
| 4503 * Return the declaration of the loop variable. | 4658 * Return the declaration of the loop variable. |
| 4504 * @return the declaration of the loop variable | 4659 * @return the declaration of the loop variable |
| 4505 */ | 4660 */ |
| 4506 SimpleFormalParameter get loopParameter => _loopParameter; | 4661 DeclaredIdentifier get loopVariable => _loopVariable; |
| 4507 /** | 4662 /** |
| 4508 * Return the right parenthesis. | 4663 * Return the right parenthesis. |
| 4509 * @return the right parenthesis | 4664 * @return the right parenthesis |
| 4510 */ | 4665 */ |
| 4511 Token get rightParenthesis => _rightParenthesis; | 4666 Token get rightParenthesis => _rightParenthesis; |
| 4512 /** | 4667 /** |
| 4513 * Set the body of the loop to the given block. | 4668 * Set the body of the loop to the given block. |
| 4514 * @param body the body of the loop | 4669 * @param body the body of the loop |
| 4515 */ | 4670 */ |
| 4516 void set body(Statement body2) { | 4671 void set body(Statement body2) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 4538 _iterator = becomeParentOf(expression); | 4693 _iterator = becomeParentOf(expression); |
| 4539 } | 4694 } |
| 4540 /** | 4695 /** |
| 4541 * Set the left parenthesis to the given token. | 4696 * Set the left parenthesis to the given token. |
| 4542 * @param leftParenthesis the left parenthesis | 4697 * @param leftParenthesis the left parenthesis |
| 4543 */ | 4698 */ |
| 4544 void set leftParenthesis(Token leftParenthesis3) { | 4699 void set leftParenthesis(Token leftParenthesis3) { |
| 4545 this._leftParenthesis = leftParenthesis3; | 4700 this._leftParenthesis = leftParenthesis3; |
| 4546 } | 4701 } |
| 4547 /** | 4702 /** |
| 4548 * Set the declaration of the loop variable to the given parameter. | 4703 * Set the declaration of the loop variable to the given variable. |
| 4549 * @param parameter the declaration of the loop variable | 4704 * @param variable the declaration of the loop variable |
| 4550 */ | 4705 */ |
| 4551 void set loopParameter(SimpleFormalParameter parameter) { | 4706 void set loopVariable(DeclaredIdentifier variable) { |
| 4552 _loopParameter = becomeParentOf(parameter); | 4707 _loopVariable = becomeParentOf(variable); |
| 4553 } | 4708 } |
| 4554 /** | 4709 /** |
| 4555 * Set the right parenthesis to the given token. | 4710 * Set the right parenthesis to the given token. |
| 4556 * @param rightParenthesis the right parenthesis | 4711 * @param rightParenthesis the right parenthesis |
| 4557 */ | 4712 */ |
| 4558 void set rightParenthesis(Token rightParenthesis3) { | 4713 void set rightParenthesis(Token rightParenthesis3) { |
| 4559 this._rightParenthesis = rightParenthesis3; | 4714 this._rightParenthesis = rightParenthesis3; |
| 4560 } | 4715 } |
| 4561 void visitChildren(ASTVisitor<Object> visitor) { | 4716 void visitChildren(ASTVisitor<Object> visitor) { |
| 4562 safelyVisitChild(_loopParameter, visitor); | 4717 safelyVisitChild(_loopVariable, visitor); |
| 4563 safelyVisitChild(_iterator, visitor); | 4718 safelyVisitChild(_iterator, visitor); |
| 4564 safelyVisitChild(_body, visitor); | 4719 safelyVisitChild(_body, visitor); |
| 4565 } | 4720 } |
| 4566 } | 4721 } |
| 4567 /** | 4722 /** |
| 4568 * Instances of the class {@code ForStatement} represent a for statement. | 4723 * Instances of the class {@code ForStatement} represent a for statement. |
| 4569 * <pre> | 4724 * <pre> |
| 4570 * forStatement ::= | 4725 * forStatement ::= |
| 4571 * 'for' '(' forLoopParts ')' {@link Statement statement}forLoopParts ::= | 4726 * 'for' '(' forLoopParts ')' {@link Statement statement}forLoopParts ::= |
| 4572 * forInitializerStatement ';' {@link Expression expression}? ';' {@link Express
ion expressionList}? | 4727 * forInitializerStatement ';' {@link Expression expression}? ';' {@link Express
ion expressionList}? |
| 4573 * forInitializerStatement ::={@link DefaultFormalParameter initializedVariableD
eclaration}| {@link Expression expression}? | 4728 * forInitializerStatement ::={@link DefaultFormalParameter initializedVariableD
eclaration}| {@link Expression expression}? |
| 4574 * </pre> | 4729 * </pre> |
| 4730 * @coverage dart.engine.ast |
| 4575 */ | 4731 */ |
| 4576 class ForStatement extends Statement { | 4732 class ForStatement extends Statement { |
| 4577 /** | 4733 /** |
| 4578 * The token representing the 'for' keyword. | 4734 * The token representing the 'for' keyword. |
| 4579 */ | 4735 */ |
| 4580 Token _forKeyword; | 4736 Token _forKeyword; |
| 4581 /** | 4737 /** |
| 4582 * The left parenthesis. | 4738 * The left parenthesis. |
| 4583 */ | 4739 */ |
| 4584 Token _leftParenthesis; | 4740 Token _leftParenthesis; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4780 safelyVisitChild(_condition, visitor); | 4936 safelyVisitChild(_condition, visitor); |
| 4781 _updaters.accept(visitor); | 4937 _updaters.accept(visitor); |
| 4782 safelyVisitChild(_body, visitor); | 4938 safelyVisitChild(_body, visitor); |
| 4783 } | 4939 } |
| 4784 } | 4940 } |
| 4785 /** | 4941 /** |
| 4786 * The abstract class {@code FormalParameter} defines the behavior of objects re
presenting a | 4942 * The abstract class {@code FormalParameter} defines the behavior of objects re
presenting a |
| 4787 * parameter to a function. | 4943 * parameter to a function. |
| 4788 * <pre> | 4944 * <pre> |
| 4789 * formalParameter ::={@link NormalFormalParameter normalFormalParameter}| {@lin
k DefaultFormalParameter namedFormalParameter}| {@link DefaultFormalParameter op
tionalFormalParameter}</pre> | 4945 * formalParameter ::={@link NormalFormalParameter normalFormalParameter}| {@lin
k DefaultFormalParameter namedFormalParameter}| {@link DefaultFormalParameter op
tionalFormalParameter}</pre> |
| 4946 * @coverage dart.engine.ast |
| 4790 */ | 4947 */ |
| 4791 abstract class FormalParameter extends ASTNode { | 4948 abstract class FormalParameter extends ASTNode { |
| 4792 /** | 4949 /** |
| 4793 * Return the element representing this parameter, or {@code null} if this par
ameter has not been | 4950 * Return the element representing this parameter, or {@code null} if this par
ameter has not been |
| 4794 * resolved. | 4951 * resolved. |
| 4795 * @return the element representing this parameter | 4952 * @return the element representing this parameter |
| 4796 */ | 4953 */ |
| 4797 ParameterElement get element { | 4954 ParameterElement get element { |
| 4798 SimpleIdentifier identifier11 = identifier; | 4955 SimpleIdentifier identifier12 = identifier; |
| 4799 if (identifier11 == null) { | 4956 if (identifier12 == null) { |
| 4800 return null; | 4957 return null; |
| 4801 } | 4958 } |
| 4802 return identifier11.element as ParameterElement; | 4959 return identifier12.element as ParameterElement; |
| 4803 } | 4960 } |
| 4804 /** | 4961 /** |
| 4805 * Return the name of the parameter being declared. | 4962 * Return the name of the parameter being declared. |
| 4806 * @return the name of the parameter being declared | 4963 * @return the name of the parameter being declared |
| 4807 */ | 4964 */ |
| 4808 SimpleIdentifier get identifier; | 4965 SimpleIdentifier get identifier; |
| 4809 /** | 4966 /** |
| 4810 * Return the kind of this parameter. | 4967 * Return the kind of this parameter. |
| 4811 * @return the kind of this parameter | 4968 * @return the kind of this parameter |
| 4812 */ | 4969 */ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4827 * | '(' optionalFormalParameters ')' | 4984 * | '(' optionalFormalParameters ')' |
| 4828 * normalFormalParameters ::={@link NormalFormalParameter normalFormalParameter}
(',' {@link NormalFormalParameter normalFormalParameter}) | 4985 * normalFormalParameters ::={@link NormalFormalParameter normalFormalParameter}
(',' {@link NormalFormalParameter normalFormalParameter}) |
| 4829 * optionalFormalParameters ::= | 4986 * optionalFormalParameters ::= |
| 4830 * optionalPositionalFormalParameters | 4987 * optionalPositionalFormalParameters |
| 4831 * | namedFormalParameters | 4988 * | namedFormalParameters |
| 4832 * optionalPositionalFormalParameters ::= | 4989 * optionalPositionalFormalParameters ::= |
| 4833 * '[' {@link DefaultFormalParameter positionalFormalParameter} (',' {@link Defa
ultFormalParameter positionalFormalParameter})* ']' | 4990 * '[' {@link DefaultFormalParameter positionalFormalParameter} (',' {@link Defa
ultFormalParameter positionalFormalParameter})* ']' |
| 4834 * namedFormalParameters ::= | 4991 * namedFormalParameters ::= |
| 4835 * '{' {@link DefaultFormalParameter namedFormalParameter} (',' {@link DefaultFo
rmalParameter namedFormalParameter})* '}' | 4992 * '{' {@link DefaultFormalParameter namedFormalParameter} (',' {@link DefaultFo
rmalParameter namedFormalParameter})* '}' |
| 4836 * </pre> | 4993 * </pre> |
| 4994 * @coverage dart.engine.ast |
| 4837 */ | 4995 */ |
| 4838 class FormalParameterList extends ASTNode { | 4996 class FormalParameterList extends ASTNode { |
| 4839 /** | 4997 /** |
| 4840 * The left parenthesis. | 4998 * The left parenthesis. |
| 4841 */ | 4999 */ |
| 4842 Token _leftParenthesis; | 5000 Token _leftParenthesis; |
| 4843 /** | 5001 /** |
| 4844 * The parameters associated with the method. | 5002 * The parameters associated with the method. |
| 4845 */ | 5003 */ |
| 4846 NodeList<FormalParameter> _parameters; | 5004 NodeList<FormalParameter> _parameters; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4958 } | 5116 } |
| 4959 void visitChildren(ASTVisitor<Object> visitor) { | 5117 void visitChildren(ASTVisitor<Object> visitor) { |
| 4960 _parameters.accept(visitor); | 5118 _parameters.accept(visitor); |
| 4961 } | 5119 } |
| 4962 } | 5120 } |
| 4963 /** | 5121 /** |
| 4964 * The abstract class {@code FunctionBody} defines the behavior common to object
s representing the | 5122 * The abstract class {@code FunctionBody} defines the behavior common to object
s representing the |
| 4965 * body of a function or method. | 5123 * body of a function or method. |
| 4966 * <pre> | 5124 * <pre> |
| 4967 * functionBody ::={@link BlockFunctionBody blockFunctionBody}| {@link EmptyFunc
tionBody emptyFunctionBody}| {@link ExpressionFunctionBody expressionFunctionBod
y}</pre> | 5125 * functionBody ::={@link BlockFunctionBody blockFunctionBody}| {@link EmptyFunc
tionBody emptyFunctionBody}| {@link ExpressionFunctionBody expressionFunctionBod
y}</pre> |
| 5126 * @coverage dart.engine.ast |
| 4968 */ | 5127 */ |
| 4969 abstract class FunctionBody extends ASTNode { | 5128 abstract class FunctionBody extends ASTNode { |
| 4970 } | 5129 } |
| 4971 /** | 5130 /** |
| 4972 * Instances of the class {@code FunctionDeclaration} wrap a {@link FunctionExpr
ession function | 5131 * Instances of the class {@code FunctionDeclaration} wrap a {@link FunctionExpr
ession function |
| 4973 * expression} as a top-level declaration. | 5132 * expression} as a top-level declaration. |
| 4974 * <pre> | 5133 * <pre> |
| 4975 * functionDeclaration ::= | 5134 * functionDeclaration ::= |
| 4976 * 'external' functionSignature | 5135 * 'external' functionSignature |
| 4977 * | functionSignature {@link FunctionBody functionBody}functionSignature ::={@l
ink Type returnType}? ('get' | 'set')? {@link SimpleIdentifier functionName} {@l
ink FormalParameterList formalParameterList}</pre> | 5136 * | functionSignature {@link FunctionBody functionBody}functionSignature ::={@l
ink Type returnType}? ('get' | 'set')? {@link SimpleIdentifier functionName} {@l
ink FormalParameterList formalParameterList}</pre> |
| 5137 * @coverage dart.engine.ast |
| 4978 */ | 5138 */ |
| 4979 class FunctionDeclaration extends CompilationUnitMember { | 5139 class FunctionDeclaration extends CompilationUnitMember { |
| 4980 /** | 5140 /** |
| 4981 * The token representing the 'external' keyword, or {@code null} if this is n
ot an external | 5141 * The token representing the 'external' keyword, or {@code null} if this is n
ot an external |
| 4982 * function. | 5142 * function. |
| 4983 */ | 5143 */ |
| 4984 Token _externalKeyword; | 5144 Token _externalKeyword; |
| 4985 /** | 5145 /** |
| 4986 * The return type of the function, or {@code null} if no return type was decl
ared. | 5146 * The return type of the function, or {@code null} if no return type was decl
ared. |
| 4987 */ | 5147 */ |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5107 } else if (_propertyKeyword != null) { | 5267 } else if (_propertyKeyword != null) { |
| 5108 return _propertyKeyword; | 5268 return _propertyKeyword; |
| 5109 } else if (_name != null) { | 5269 } else if (_name != null) { |
| 5110 return _name.beginToken; | 5270 return _name.beginToken; |
| 5111 } | 5271 } |
| 5112 return _functionExpression.beginToken; | 5272 return _functionExpression.beginToken; |
| 5113 } | 5273 } |
| 5114 } | 5274 } |
| 5115 /** | 5275 /** |
| 5116 * Instances of the class {@code FunctionDeclarationStatement} wrap a {@link Fun
ctionDeclarationfunction declaration} as a statement. | 5276 * Instances of the class {@code FunctionDeclarationStatement} wrap a {@link Fun
ctionDeclarationfunction declaration} as a statement. |
| 5277 * @coverage dart.engine.ast |
| 5117 */ | 5278 */ |
| 5118 class FunctionDeclarationStatement extends Statement { | 5279 class FunctionDeclarationStatement extends Statement { |
| 5119 /** | 5280 /** |
| 5120 * The function declaration being wrapped. | 5281 * The function declaration being wrapped. |
| 5121 */ | 5282 */ |
| 5122 FunctionDeclaration _functionDeclaration; | 5283 FunctionDeclaration _functionDeclaration; |
| 5123 /** | 5284 /** |
| 5124 * Initialize a newly created function declaration statement. | 5285 * Initialize a newly created function declaration statement. |
| 5125 * @param functionDeclaration the the function declaration being wrapped | 5286 * @param functionDeclaration the the function declaration being wrapped |
| 5126 */ | 5287 */ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 5148 this._functionDeclaration = becomeParentOf(functionDeclaration2); | 5309 this._functionDeclaration = becomeParentOf(functionDeclaration2); |
| 5149 } | 5310 } |
| 5150 void visitChildren(ASTVisitor<Object> visitor) { | 5311 void visitChildren(ASTVisitor<Object> visitor) { |
| 5151 safelyVisitChild(_functionDeclaration, visitor); | 5312 safelyVisitChild(_functionDeclaration, visitor); |
| 5152 } | 5313 } |
| 5153 } | 5314 } |
| 5154 /** | 5315 /** |
| 5155 * Instances of the class {@code FunctionExpression} represent a function expres
sion. | 5316 * Instances of the class {@code FunctionExpression} represent a function expres
sion. |
| 5156 * <pre> | 5317 * <pre> |
| 5157 * functionExpression ::={@link FormalParameterList formalParameterList} {@link
FunctionBody functionBody}</pre> | 5318 * functionExpression ::={@link FormalParameterList formalParameterList} {@link
FunctionBody functionBody}</pre> |
| 5319 * @coverage dart.engine.ast |
| 5158 */ | 5320 */ |
| 5159 class FunctionExpression extends Expression { | 5321 class FunctionExpression extends Expression { |
| 5160 /** | 5322 /** |
| 5161 * The parameters associated with the function. | 5323 * The parameters associated with the function. |
| 5162 */ | 5324 */ |
| 5163 FormalParameterList _parameters; | 5325 FormalParameterList _parameters; |
| 5164 /** | 5326 /** |
| 5165 * The body of the function, or {@code null} if this is an external function. | 5327 * The body of the function, or {@code null} if this is an external function. |
| 5166 */ | 5328 */ |
| 5167 FunctionBody _body; | 5329 FunctionBody _body; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5244 safelyVisitChild(_body, visitor); | 5406 safelyVisitChild(_body, visitor); |
| 5245 } | 5407 } |
| 5246 } | 5408 } |
| 5247 /** | 5409 /** |
| 5248 * Instances of the class {@code FunctionExpressionInvocation} represent the inv
ocation of a | 5410 * Instances of the class {@code FunctionExpressionInvocation} represent the inv
ocation of a |
| 5249 * function resulting from evaluating an expression. Invocations of methods and
other forms of | 5411 * function resulting from evaluating an expression. Invocations of methods and
other forms of |
| 5250 * functions are represented by {@link MethodInvocation method invocation} nodes
. Invocations of | 5412 * functions are represented by {@link MethodInvocation method invocation} nodes
. Invocations of |
| 5251 * getters and setters are represented by either {@link PrefixedIdentifier prefi
xed identifier} or{@link PropertyAccess property access} nodes. | 5413 * getters and setters are represented by either {@link PrefixedIdentifier prefi
xed identifier} or{@link PropertyAccess property access} nodes. |
| 5252 * <pre> | 5414 * <pre> |
| 5253 * functionExpressionInvoction ::={@link Expression function} {@link ArgumentLis
t argumentList}</pre> | 5415 * functionExpressionInvoction ::={@link Expression function} {@link ArgumentLis
t argumentList}</pre> |
| 5416 * @coverage dart.engine.ast |
| 5254 */ | 5417 */ |
| 5255 class FunctionExpressionInvocation extends Expression { | 5418 class FunctionExpressionInvocation extends Expression { |
| 5256 /** | 5419 /** |
| 5257 * The expression producing the function being invoked. | 5420 * The expression producing the function being invoked. |
| 5258 */ | 5421 */ |
| 5259 Expression _function; | 5422 Expression _function; |
| 5260 /** | 5423 /** |
| 5261 * The list of arguments to the function. | 5424 * The list of arguments to the function. |
| 5262 */ | 5425 */ |
| 5263 ArgumentList _argumentList; | 5426 ArgumentList _argumentList; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5326 safelyVisitChild(_function, visitor); | 5489 safelyVisitChild(_function, visitor); |
| 5327 safelyVisitChild(_argumentList, visitor); | 5490 safelyVisitChild(_argumentList, visitor); |
| 5328 } | 5491 } |
| 5329 } | 5492 } |
| 5330 /** | 5493 /** |
| 5331 * Instances of the class {@code FunctionTypeAlias} represent a function type al
ias. | 5494 * Instances of the class {@code FunctionTypeAlias} represent a function type al
ias. |
| 5332 * <pre> | 5495 * <pre> |
| 5333 * functionTypeAlias ::= | 5496 * functionTypeAlias ::= |
| 5334 * functionPrefix {@link TypeParameterList typeParameterList}? {@link FormalPara
meterList formalParameterList} ';' | 5497 * functionPrefix {@link TypeParameterList typeParameterList}? {@link FormalPara
meterList formalParameterList} ';' |
| 5335 * functionPrefix ::={@link TypeName returnType}? {@link SimpleIdentifier name}<
/pre> | 5498 * functionPrefix ::={@link TypeName returnType}? {@link SimpleIdentifier name}<
/pre> |
| 5499 * @coverage dart.engine.ast |
| 5336 */ | 5500 */ |
| 5337 class FunctionTypeAlias extends TypeAlias { | 5501 class FunctionTypeAlias extends TypeAlias { |
| 5338 /** | 5502 /** |
| 5339 * The name of the return type of the function type being defined, or {@code n
ull} if no return | 5503 * The name of the return type of the function type being defined, or {@code n
ull} if no return |
| 5340 * type was given. | 5504 * type was given. |
| 5341 */ | 5505 */ |
| 5342 TypeName _returnType; | 5506 TypeName _returnType; |
| 5343 /** | 5507 /** |
| 5344 * The name of the function type being declared. | 5508 * The name of the function type being declared. |
| 5345 */ | 5509 */ |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5440 safelyVisitChild(_name, visitor); | 5604 safelyVisitChild(_name, visitor); |
| 5441 safelyVisitChild(_typeParameters, visitor); | 5605 safelyVisitChild(_typeParameters, visitor); |
| 5442 safelyVisitChild(_parameters, visitor); | 5606 safelyVisitChild(_parameters, visitor); |
| 5443 } | 5607 } |
| 5444 } | 5608 } |
| 5445 /** | 5609 /** |
| 5446 * Instances of the class {@code FunctionTypedFormalParameter} represent a funct
ion-typed formal | 5610 * Instances of the class {@code FunctionTypedFormalParameter} represent a funct
ion-typed formal |
| 5447 * parameter. | 5611 * parameter. |
| 5448 * <pre> | 5612 * <pre> |
| 5449 * functionSignature ::={@link TypeName returnType}? {@link SimpleIdentifier ide
ntifier} {@link FormalParameterList formalParameterList}</pre> | 5613 * functionSignature ::={@link TypeName returnType}? {@link SimpleIdentifier ide
ntifier} {@link FormalParameterList formalParameterList}</pre> |
| 5614 * @coverage dart.engine.ast |
| 5450 */ | 5615 */ |
| 5451 class FunctionTypedFormalParameter extends NormalFormalParameter { | 5616 class FunctionTypedFormalParameter extends NormalFormalParameter { |
| 5452 /** | 5617 /** |
| 5453 * The return type of the function, or {@code null} if the function does not h
ave a return type. | 5618 * The return type of the function, or {@code null} if the function does not h
ave a return type. |
| 5454 */ | 5619 */ |
| 5455 TypeName _returnType; | 5620 TypeName _returnType; |
| 5456 /** | 5621 /** |
| 5457 * The parameters of the function-typed parameter. | 5622 * The parameters of the function-typed parameter. |
| 5458 */ | 5623 */ |
| 5459 FormalParameterList _parameters; | 5624 FormalParameterList _parameters; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5522 safelyVisitChild(_parameters, visitor); | 5687 safelyVisitChild(_parameters, visitor); |
| 5523 } | 5688 } |
| 5524 } | 5689 } |
| 5525 /** | 5690 /** |
| 5526 * Instances of the class {@code HideCombinator} represent a combinator that res
tricts the names | 5691 * Instances of the class {@code HideCombinator} represent a combinator that res
tricts the names |
| 5527 * being imported to those that are not in a given list. | 5692 * being imported to those that are not in a given list. |
| 5528 * <pre> | 5693 * <pre> |
| 5529 * hideCombinator ::= | 5694 * hideCombinator ::= |
| 5530 * 'hide' {@link SimpleIdentifier identifier} (',' {@link SimpleIdentifier ident
ifier}) | 5695 * 'hide' {@link SimpleIdentifier identifier} (',' {@link SimpleIdentifier ident
ifier}) |
| 5531 * </pre> | 5696 * </pre> |
| 5697 * @coverage dart.engine.ast |
| 5532 */ | 5698 */ |
| 5533 class HideCombinator extends Combinator { | 5699 class HideCombinator extends Combinator { |
| 5534 /** | 5700 /** |
| 5535 * The list of names from the library that are hidden by this combinator. | 5701 * The list of names from the library that are hidden by this combinator. |
| 5536 */ | 5702 */ |
| 5537 NodeList<SimpleIdentifier> _hiddenNames; | 5703 NodeList<SimpleIdentifier> _hiddenNames; |
| 5538 /** | 5704 /** |
| 5539 * Initialize a newly created import show combinator. | 5705 * Initialize a newly created import show combinator. |
| 5540 * @param keyword the comma introducing the combinator | 5706 * @param keyword the comma introducing the combinator |
| 5541 * @param hiddenNames the list of names from the library that are hidden by th
is combinator | 5707 * @param hiddenNames the list of names from the library that are hidden by th
is combinator |
| (...skipping 17 matching lines...) Expand all Loading... |
| 5559 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; | 5725 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; |
| 5560 void visitChildren(ASTVisitor<Object> visitor) { | 5726 void visitChildren(ASTVisitor<Object> visitor) { |
| 5561 _hiddenNames.accept(visitor); | 5727 _hiddenNames.accept(visitor); |
| 5562 } | 5728 } |
| 5563 } | 5729 } |
| 5564 /** | 5730 /** |
| 5565 * The abstract class {@code Identifier} defines the behavior common to nodes th
at represent an | 5731 * The abstract class {@code Identifier} defines the behavior common to nodes th
at represent an |
| 5566 * identifier. | 5732 * identifier. |
| 5567 * <pre> | 5733 * <pre> |
| 5568 * identifier ::={@link SimpleIdentifier simpleIdentifier}| {@link PrefixedIdent
ifier prefixedIdentifier}</pre> | 5734 * identifier ::={@link SimpleIdentifier simpleIdentifier}| {@link PrefixedIdent
ifier prefixedIdentifier}</pre> |
| 5735 * @coverage dart.engine.ast |
| 5569 */ | 5736 */ |
| 5570 abstract class Identifier extends Expression { | 5737 abstract class Identifier extends Expression { |
| 5571 /** | 5738 /** |
| 5572 * Return {@code true} if the given name is visible only within the library in
which it is | 5739 * Return {@code true} if the given name is visible only within the library in
which it is |
| 5573 * declared. | 5740 * declared. |
| 5574 * @param name the name being tested | 5741 * @param name the name being tested |
| 5575 * @return {@code true} if the given name is private | 5742 * @return {@code true} if the given name is private |
| 5576 */ | 5743 */ |
| 5577 static bool isPrivateName(String name) => name.startsWith("_"); | 5744 static bool isPrivateName(String name) => name.startsWith("_"); |
| 5578 /** | 5745 /** |
| 5579 * Return the element associated with this identifier, or {@code null} if the
AST structure has | 5746 * Return the element associated with this identifier, or {@code null} if the
AST structure has |
| 5580 * not been resolved or if this identifier could not be resolved. One example
of the latter case | 5747 * not been resolved or if this identifier could not be resolved. One example
of the latter case |
| 5581 * is an identifier that is not defined within the scope in which it appears. | 5748 * is an identifier that is not defined within the scope in which it appears. |
| 5582 * @return the element associated with this identifier | 5749 * @return the element associated with this identifier |
| 5583 */ | 5750 */ |
| 5584 Element get element; | 5751 Element get element; |
| 5585 /** | 5752 /** |
| 5586 * Return the lexical representation of the identifier. | 5753 * Return the lexical representation of the identifier. |
| 5587 * @return the lexical representation of the identifier | 5754 * @return the lexical representation of the identifier |
| 5588 */ | 5755 */ |
| 5589 String get name; | 5756 String get name; |
| 5590 bool isAssignable() => true; | 5757 bool isAssignable() => true; |
| 5591 } | 5758 } |
| 5592 /** | 5759 /** |
| 5593 * Instances of the class {@code IfStatement} represent an if statement. | 5760 * Instances of the class {@code IfStatement} represent an if statement. |
| 5594 * <pre> | 5761 * <pre> |
| 5595 * ifStatement ::= | 5762 * ifStatement ::= |
| 5596 * 'if' '(' {@link Expression expression} ')' {@link Statement thenStatement} ('
else' {@link Statement elseStatement})? | 5763 * 'if' '(' {@link Expression expression} ')' {@link Statement thenStatement} ('
else' {@link Statement elseStatement})? |
| 5597 * </pre> | 5764 * </pre> |
| 5765 * @coverage dart.engine.ast |
| 5598 */ | 5766 */ |
| 5599 class IfStatement extends Statement { | 5767 class IfStatement extends Statement { |
| 5600 /** | 5768 /** |
| 5601 * The token representing the 'if' keyword. | 5769 * The token representing the 'if' keyword. |
| 5602 */ | 5770 */ |
| 5603 Token _ifKeyword; | 5771 Token _ifKeyword; |
| 5604 /** | 5772 /** |
| 5605 * The left parenthesis. | 5773 * The left parenthesis. |
| 5606 */ | 5774 */ |
| 5607 Token _leftParenthesis; | 5775 Token _leftParenthesis; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5757 safelyVisitChild(_elseStatement, visitor); | 5925 safelyVisitChild(_elseStatement, visitor); |
| 5758 } | 5926 } |
| 5759 } | 5927 } |
| 5760 /** | 5928 /** |
| 5761 * Instances of the class {@code ImplementsClause} represent the "implements" cl
ause in an class | 5929 * Instances of the class {@code ImplementsClause} represent the "implements" cl
ause in an class |
| 5762 * declaration. | 5930 * declaration. |
| 5763 * <pre> | 5931 * <pre> |
| 5764 * implementsClause ::= | 5932 * implementsClause ::= |
| 5765 * 'implements' {@link TypeName superclass} (',' {@link TypeName superclass}) | 5933 * 'implements' {@link TypeName superclass} (',' {@link TypeName superclass}) |
| 5766 * </pre> | 5934 * </pre> |
| 5935 * @coverage dart.engine.ast |
| 5767 */ | 5936 */ |
| 5768 class ImplementsClause extends ASTNode { | 5937 class ImplementsClause extends ASTNode { |
| 5769 /** | 5938 /** |
| 5770 * The token representing the 'implements' keyword. | 5939 * The token representing the 'implements' keyword. |
| 5771 */ | 5940 */ |
| 5772 Token _keyword; | 5941 Token _keyword; |
| 5773 /** | 5942 /** |
| 5774 * The interfaces that are being implemented. | 5943 * The interfaces that are being implemented. |
| 5775 */ | 5944 */ |
| 5776 NodeList<TypeName> _interfaces; | 5945 NodeList<TypeName> _interfaces; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 5800 NodeList<TypeName> get interfaces => _interfaces; | 5969 NodeList<TypeName> get interfaces => _interfaces; |
| 5801 /** | 5970 /** |
| 5802 * Return the token representing the 'implements' keyword. | 5971 * Return the token representing the 'implements' keyword. |
| 5803 * @return the token representing the 'implements' keyword | 5972 * @return the token representing the 'implements' keyword |
| 5804 */ | 5973 */ |
| 5805 Token get keyword => _keyword; | 5974 Token get keyword => _keyword; |
| 5806 /** | 5975 /** |
| 5807 * Set the token representing the 'implements' keyword to the given token. | 5976 * Set the token representing the 'implements' keyword to the given token. |
| 5808 * @param keyword the token representing the 'implements' keyword | 5977 * @param keyword the token representing the 'implements' keyword |
| 5809 */ | 5978 */ |
| 5810 void set keyword(Token keyword11) { | 5979 void set keyword(Token keyword12) { |
| 5811 this._keyword = keyword11; | 5980 this._keyword = keyword12; |
| 5812 } | 5981 } |
| 5813 void visitChildren(ASTVisitor<Object> visitor) { | 5982 void visitChildren(ASTVisitor<Object> visitor) { |
| 5814 _interfaces.accept(visitor); | 5983 _interfaces.accept(visitor); |
| 5815 } | 5984 } |
| 5816 } | 5985 } |
| 5817 /** | 5986 /** |
| 5818 * Instances of the class {@code ImportDirective} represent an import directive. | 5987 * Instances of the class {@code ImportDirective} represent an import directive. |
| 5819 * <pre> | 5988 * <pre> |
| 5820 * importDirective ::={@link Annotation metadata} 'import' {@link StringLiteral
libraryUri} ('as' identifier)? {@link Combinator combinator}* ';' | 5989 * importDirective ::={@link Annotation metadata} 'import' {@link StringLiteral
libraryUri} ('as' identifier)? {@link Combinator combinator}* ';' |
| 5821 * </pre> | 5990 * </pre> |
| 5991 * @coverage dart.engine.ast |
| 5822 */ | 5992 */ |
| 5823 class ImportDirective extends NamespaceDirective { | 5993 class ImportDirective extends NamespaceDirective { |
| 5824 /** | 5994 /** |
| 5825 * The token representing the 'as' token, or {@code null} if the imported name
s are not prefixed. | 5995 * The token representing the 'as' token, or {@code null} if the imported name
s are not prefixed. |
| 5826 */ | 5996 */ |
| 5827 Token _asToken; | 5997 Token _asToken; |
| 5828 /** | 5998 /** |
| 5829 * The prefix to be used with the imported names, or {@code null} if the impor
ted names are not | 5999 * The prefix to be used with the imported names, or {@code null} if the impor
ted names are not |
| 5830 * prefixed. | 6000 * prefixed. |
| 5831 */ | 6001 */ |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5888 super.visitChildren(visitor); | 6058 super.visitChildren(visitor); |
| 5889 safelyVisitChild(_prefix, visitor); | 6059 safelyVisitChild(_prefix, visitor); |
| 5890 combinators.accept(visitor); | 6060 combinators.accept(visitor); |
| 5891 } | 6061 } |
| 5892 } | 6062 } |
| 5893 /** | 6063 /** |
| 5894 * Instances of the class {@code IndexExpression} represent an index expression. | 6064 * Instances of the class {@code IndexExpression} represent an index expression. |
| 5895 * <pre> | 6065 * <pre> |
| 5896 * indexExpression ::={@link Expression target} '[' {@link Expression index} ']' | 6066 * indexExpression ::={@link Expression target} '[' {@link Expression index} ']' |
| 5897 * </pre> | 6067 * </pre> |
| 6068 * @coverage dart.engine.ast |
| 5898 */ | 6069 */ |
| 5899 class IndexExpression extends Expression { | 6070 class IndexExpression extends Expression { |
| 5900 /** | 6071 /** |
| 5901 * The expression used to compute the object being indexed, or {@code null} if
this index | 6072 * The expression used to compute the object being indexed, or {@code null} if
this index |
| 5902 * expression is part of a cascade expression. | 6073 * expression is part of a cascade expression. |
| 5903 */ | 6074 */ |
| 5904 Expression _target; | 6075 Expression _target; |
| 5905 /** | 6076 /** |
| 5906 * The period ("..") before a cascaded index expression, or {@code null} if th
is index expression | 6077 * The period ("..") before a cascaded index expression, or {@code null} if th
is index expression |
| 5907 * is not part of a cascade expression. | 6078 * is not part of a cascade expression. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 5925 */ | 6096 */ |
| 5926 MethodElement _element; | 6097 MethodElement _element; |
| 5927 /** | 6098 /** |
| 5928 * Initialize a newly created index expression. | 6099 * Initialize a newly created index expression. |
| 5929 * @param target the expression used to compute the object being indexed | 6100 * @param target the expression used to compute the object being indexed |
| 5930 * @param leftBracket the left square bracket | 6101 * @param leftBracket the left square bracket |
| 5931 * @param index the expression used to compute the index | 6102 * @param index the expression used to compute the index |
| 5932 * @param rightBracket the right square bracket | 6103 * @param rightBracket the right square bracket |
| 5933 */ | 6104 */ |
| 5934 IndexExpression.forTarget_full(Expression target3, Token leftBracket4, Express
ion index2, Token rightBracket4) { | 6105 IndexExpression.forTarget_full(Expression target3, Token leftBracket4, Express
ion index2, Token rightBracket4) { |
| 5935 _jtd_constructor_57_impl(target3, leftBracket4, index2, rightBracket4); | 6106 _jtd_constructor_58_impl(target3, leftBracket4, index2, rightBracket4); |
| 5936 } | 6107 } |
| 5937 /** | 6108 /** |
| 5938 * Initialize a newly created index expression. | 6109 * Initialize a newly created index expression. |
| 5939 * @param target the expression used to compute the object being indexed | 6110 * @param target the expression used to compute the object being indexed |
| 5940 * @param leftBracket the left square bracket | 6111 * @param leftBracket the left square bracket |
| 5941 * @param index the expression used to compute the index | 6112 * @param index the expression used to compute the index |
| 5942 * @param rightBracket the right square bracket | 6113 * @param rightBracket the right square bracket |
| 5943 */ | 6114 */ |
| 5944 IndexExpression.forTarget({Expression target3, Token leftBracket4, Expression
index2, Token rightBracket4}) : this.forTarget_full(target3, leftBracket4, index
2, rightBracket4); | 6115 IndexExpression.forTarget({Expression target3, Token leftBracket4, Expression
index2, Token rightBracket4}) : this.forTarget_full(target3, leftBracket4, index
2, rightBracket4); |
| 5945 _jtd_constructor_57_impl(Expression target3, Token leftBracket4, Expression in
dex2, Token rightBracket4) { | 6116 _jtd_constructor_58_impl(Expression target3, Token leftBracket4, Expression in
dex2, Token rightBracket4) { |
| 5946 this._target = becomeParentOf(target3); | 6117 this._target = becomeParentOf(target3); |
| 5947 this._leftBracket = leftBracket4; | 6118 this._leftBracket = leftBracket4; |
| 5948 this._index = becomeParentOf(index2); | 6119 this._index = becomeParentOf(index2); |
| 5949 this._rightBracket = rightBracket4; | 6120 this._rightBracket = rightBracket4; |
| 5950 } | 6121 } |
| 5951 /** | 6122 /** |
| 5952 * Initialize a newly created index expression. | 6123 * Initialize a newly created index expression. |
| 5953 * @param period the period ("..") before a cascaded index expression | 6124 * @param period the period ("..") before a cascaded index expression |
| 5954 * @param leftBracket the left square bracket | 6125 * @param leftBracket the left square bracket |
| 5955 * @param index the expression used to compute the index | 6126 * @param index the expression used to compute the index |
| 5956 * @param rightBracket the right square bracket | 6127 * @param rightBracket the right square bracket |
| 5957 */ | 6128 */ |
| 5958 IndexExpression.forCascade_full(Token period7, Token leftBracket5, Expression
index3, Token rightBracket5) { | 6129 IndexExpression.forCascade_full(Token period7, Token leftBracket5, Expression
index3, Token rightBracket5) { |
| 5959 _jtd_constructor_58_impl(period7, leftBracket5, index3, rightBracket5); | 6130 _jtd_constructor_59_impl(period7, leftBracket5, index3, rightBracket5); |
| 5960 } | 6131 } |
| 5961 /** | 6132 /** |
| 5962 * Initialize a newly created index expression. | 6133 * Initialize a newly created index expression. |
| 5963 * @param period the period ("..") before a cascaded index expression | 6134 * @param period the period ("..") before a cascaded index expression |
| 5964 * @param leftBracket the left square bracket | 6135 * @param leftBracket the left square bracket |
| 5965 * @param index the expression used to compute the index | 6136 * @param index the expression used to compute the index |
| 5966 * @param rightBracket the right square bracket | 6137 * @param rightBracket the right square bracket |
| 5967 */ | 6138 */ |
| 5968 IndexExpression.forCascade({Token period7, Token leftBracket5, Expression inde
x3, Token rightBracket5}) : this.forCascade_full(period7, leftBracket5, index3,
rightBracket5); | 6139 IndexExpression.forCascade({Token period7, Token leftBracket5, Expression inde
x3, Token rightBracket5}) : this.forCascade_full(period7, leftBracket5, index3,
rightBracket5); |
| 5969 _jtd_constructor_58_impl(Token period7, Token leftBracket5, Expression index3,
Token rightBracket5) { | 6140 _jtd_constructor_59_impl(Token period7, Token leftBracket5, Expression index3,
Token rightBracket5) { |
| 5970 this._period = period7; | 6141 this._period = period7; |
| 5971 this._leftBracket = leftBracket5; | 6142 this._leftBracket = leftBracket5; |
| 5972 this._index = becomeParentOf(index3); | 6143 this._index = becomeParentOf(index3); |
| 5973 this._rightBracket = rightBracket5; | 6144 this._rightBracket = rightBracket5; |
| 5974 } | 6145 } |
| 5975 accept(ASTVisitor visitor) => visitor.visitIndexExpression(this); | 6146 accept(ASTVisitor visitor) => visitor.visitIndexExpression(this); |
| 5976 /** | 6147 /** |
| 5977 * Return the expression used to compute the object being indexed, or {@code n
ull} if this index | 6148 * Return the expression used to compute the object being indexed, or {@code n
ull} if this index |
| 5978 * expression is part of a cascade expression. | 6149 * expression is part of a cascade expression. |
| 5979 * @return the expression used to compute the object being indexed | 6150 * @return the expression used to compute the object being indexed |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6125 safelyVisitChild(_target, visitor); | 6296 safelyVisitChild(_target, visitor); |
| 6126 safelyVisitChild(_index, visitor); | 6297 safelyVisitChild(_index, visitor); |
| 6127 } | 6298 } |
| 6128 } | 6299 } |
| 6129 /** | 6300 /** |
| 6130 * Instances of the class {@code InstanceCreationExpression} represent an instan
ce creation | 6301 * Instances of the class {@code InstanceCreationExpression} represent an instan
ce creation |
| 6131 * expression. | 6302 * expression. |
| 6132 * <pre> | 6303 * <pre> |
| 6133 * newExpression ::= | 6304 * newExpression ::= |
| 6134 * ('new' | 'const') {@link TypeName type} ('.' {@link SimpleIdentifier identifi
er})? {@link ArgumentList argumentList}</pre> | 6305 * ('new' | 'const') {@link TypeName type} ('.' {@link SimpleIdentifier identifi
er})? {@link ArgumentList argumentList}</pre> |
| 6306 * @coverage dart.engine.ast |
| 6135 */ | 6307 */ |
| 6136 class InstanceCreationExpression extends Expression { | 6308 class InstanceCreationExpression extends Expression { |
| 6137 /** | 6309 /** |
| 6138 * The keyword used to indicate how an object should be created. | 6310 * The keyword used to indicate how an object should be created. |
| 6139 */ | 6311 */ |
| 6140 Token _keyword; | 6312 Token _keyword; |
| 6141 /** | 6313 /** |
| 6142 * The name of the constructor to be invoked. | 6314 * The name of the constructor to be invoked. |
| 6143 */ | 6315 */ |
| 6144 ConstructorName _constructorName; | 6316 ConstructorName _constructorName; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6216 * Set the element associated with the constructor to the given element. | 6388 * Set the element associated with the constructor to the given element. |
| 6217 * @param element the element associated with the constructor | 6389 * @param element the element associated with the constructor |
| 6218 */ | 6390 */ |
| 6219 void set element(ConstructorElement element12) { | 6391 void set element(ConstructorElement element12) { |
| 6220 this._element = element12; | 6392 this._element = element12; |
| 6221 } | 6393 } |
| 6222 /** | 6394 /** |
| 6223 * Set the keyword used to indicate how an object should be created to the giv
en keyword. | 6395 * Set the keyword used to indicate how an object should be created to the giv
en keyword. |
| 6224 * @param keyword the keyword used to indicate how an object should be created | 6396 * @param keyword the keyword used to indicate how an object should be created |
| 6225 */ | 6397 */ |
| 6226 void set keyword(Token keyword12) { | 6398 void set keyword(Token keyword13) { |
| 6227 this._keyword = keyword12; | 6399 this._keyword = keyword13; |
| 6228 } | 6400 } |
| 6229 void visitChildren(ASTVisitor<Object> visitor) { | 6401 void visitChildren(ASTVisitor<Object> visitor) { |
| 6230 safelyVisitChild(_constructorName, visitor); | 6402 safelyVisitChild(_constructorName, visitor); |
| 6231 safelyVisitChild(_argumentList, visitor); | 6403 safelyVisitChild(_argumentList, visitor); |
| 6232 } | 6404 } |
| 6233 } | 6405 } |
| 6234 /** | 6406 /** |
| 6235 * Instances of the class {@code IntegerLiteral} represent an integer literal ex
pression. | 6407 * Instances of the class {@code IntegerLiteral} represent an integer literal ex
pression. |
| 6236 * <pre> | 6408 * <pre> |
| 6237 * integerLiteral ::= | 6409 * integerLiteral ::= |
| 6238 * decimalIntegerLiteral | 6410 * decimalIntegerLiteral |
| 6239 * | hexidecimalIntegerLiteral | 6411 * | hexidecimalIntegerLiteral |
| 6240 * decimalIntegerLiteral ::= | 6412 * decimalIntegerLiteral ::= |
| 6241 * decimalDigit+ | 6413 * decimalDigit+ |
| 6242 * hexidecimalIntegerLiteral ::= | 6414 * hexidecimalIntegerLiteral ::= |
| 6243 * '0x' hexidecimalDigit+ | 6415 * '0x' hexidecimalDigit+ |
| 6244 * | '0X' hexidecimalDigit+ | 6416 * | '0X' hexidecimalDigit+ |
| 6245 * </pre> | 6417 * </pre> |
| 6418 * @coverage dart.engine.ast |
| 6246 */ | 6419 */ |
| 6247 class IntegerLiteral extends Literal { | 6420 class IntegerLiteral extends Literal { |
| 6248 /** | 6421 /** |
| 6249 * The token representing the literal. | 6422 * The token representing the literal. |
| 6250 */ | 6423 */ |
| 6251 Token _literal; | 6424 Token _literal; |
| 6252 /** | 6425 /** |
| 6253 * The value of the literal. | 6426 * The value of the literal. |
| 6254 */ | 6427 */ |
| 6255 int _value = 0; | 6428 int _value = 0; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6295 void set value(int value6) { | 6468 void set value(int value6) { |
| 6296 this._value = value6; | 6469 this._value = value6; |
| 6297 } | 6470 } |
| 6298 void visitChildren(ASTVisitor<Object> visitor) { | 6471 void visitChildren(ASTVisitor<Object> visitor) { |
| 6299 } | 6472 } |
| 6300 } | 6473 } |
| 6301 /** | 6474 /** |
| 6302 * The abstract class {@code InterpolationElement} defines the behavior common t
o elements within a{@link StringInterpolation string interpolation}. | 6475 * The abstract class {@code InterpolationElement} defines the behavior common t
o elements within a{@link StringInterpolation string interpolation}. |
| 6303 * <pre> | 6476 * <pre> |
| 6304 * interpolationElement ::={@link InterpolationExpression interpolationExpressio
n}| {@link InterpolationString interpolationString}</pre> | 6477 * interpolationElement ::={@link InterpolationExpression interpolationExpressio
n}| {@link InterpolationString interpolationString}</pre> |
| 6478 * @coverage dart.engine.ast |
| 6305 */ | 6479 */ |
| 6306 abstract class InterpolationElement extends ASTNode { | 6480 abstract class InterpolationElement extends ASTNode { |
| 6307 } | 6481 } |
| 6308 /** | 6482 /** |
| 6309 * Instances of the class {@code InterpolationExpression} represent an expressio
n embedded in a | 6483 * Instances of the class {@code InterpolationExpression} represent an expressio
n embedded in a |
| 6310 * string interpolation. | 6484 * string interpolation. |
| 6311 * <pre> | 6485 * <pre> |
| 6312 * interpolationExpression ::= | 6486 * interpolationExpression ::= |
| 6313 * '$' {@link SimpleIdentifier identifier}| '$' '{' {@link Expression expression
} '}' | 6487 * '$' {@link SimpleIdentifier identifier}| '$' '{' {@link Expression expression
} '}' |
| 6314 * </pre> | 6488 * </pre> |
| 6489 * @coverage dart.engine.ast |
| 6315 */ | 6490 */ |
| 6316 class InterpolationExpression extends InterpolationElement { | 6491 class InterpolationExpression extends InterpolationElement { |
| 6317 /** | 6492 /** |
| 6318 * The token used to introduce the interpolation expression; either '$' if the
expression is a | 6493 * The token used to introduce the interpolation expression; either '$' if the
expression is a |
| 6319 * simple identifier or '${' if the expression is a full expression. | 6494 * simple identifier or '${' if the expression is a full expression. |
| 6320 */ | 6495 */ |
| 6321 Token _leftBracket; | 6496 Token _leftBracket; |
| 6322 /** | 6497 /** |
| 6323 * The expression to be evaluated for the value to be converted into a string. | 6498 * The expression to be evaluated for the value to be converted into a string. |
| 6324 */ | 6499 */ |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6394 safelyVisitChild(_expression, visitor); | 6569 safelyVisitChild(_expression, visitor); |
| 6395 } | 6570 } |
| 6396 } | 6571 } |
| 6397 /** | 6572 /** |
| 6398 * Instances of the class {@code InterpolationString} represent a non-empty subs
tring of an | 6573 * Instances of the class {@code InterpolationString} represent a non-empty subs
tring of an |
| 6399 * interpolated string. | 6574 * interpolated string. |
| 6400 * <pre> | 6575 * <pre> |
| 6401 * interpolationString ::= | 6576 * interpolationString ::= |
| 6402 * characters | 6577 * characters |
| 6403 * </pre> | 6578 * </pre> |
| 6579 * @coverage dart.engine.ast |
| 6404 */ | 6580 */ |
| 6405 class InterpolationString extends InterpolationElement { | 6581 class InterpolationString extends InterpolationElement { |
| 6406 /** | 6582 /** |
| 6407 * The characters that will be added to the string. | 6583 * The characters that will be added to the string. |
| 6408 */ | 6584 */ |
| 6409 Token _contents; | 6585 Token _contents; |
| 6410 /** | 6586 /** |
| 6411 * The value of the literal. | 6587 * The value of the literal. |
| 6412 */ | 6588 */ |
| 6413 String _value; | 6589 String _value; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6453 void set value(String string) { | 6629 void set value(String string) { |
| 6454 _value = string; | 6630 _value = string; |
| 6455 } | 6631 } |
| 6456 void visitChildren(ASTVisitor<Object> visitor) { | 6632 void visitChildren(ASTVisitor<Object> visitor) { |
| 6457 } | 6633 } |
| 6458 } | 6634 } |
| 6459 /** | 6635 /** |
| 6460 * Instances of the class {@code IsExpression} represent an is expression. | 6636 * Instances of the class {@code IsExpression} represent an is expression. |
| 6461 * <pre> | 6637 * <pre> |
| 6462 * isExpression ::={@link Expression expression} 'is' '!'? {@link TypeName type}
</pre> | 6638 * isExpression ::={@link Expression expression} 'is' '!'? {@link TypeName type}
</pre> |
| 6639 * @coverage dart.engine.ast |
| 6463 */ | 6640 */ |
| 6464 class IsExpression extends Expression { | 6641 class IsExpression extends Expression { |
| 6465 /** | 6642 /** |
| 6466 * The expression used to compute the value whose type is being tested. | 6643 * The expression used to compute the value whose type is being tested. |
| 6467 */ | 6644 */ |
| 6468 Expression _expression; | 6645 Expression _expression; |
| 6469 /** | 6646 /** |
| 6470 * The is operator. | 6647 * The is operator. |
| 6471 */ | 6648 */ |
| 6472 Token _isOperator; | 6649 Token _isOperator; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6554 void visitChildren(ASTVisitor<Object> visitor) { | 6731 void visitChildren(ASTVisitor<Object> visitor) { |
| 6555 safelyVisitChild(_expression, visitor); | 6732 safelyVisitChild(_expression, visitor); |
| 6556 safelyVisitChild(_type, visitor); | 6733 safelyVisitChild(_type, visitor); |
| 6557 } | 6734 } |
| 6558 } | 6735 } |
| 6559 /** | 6736 /** |
| 6560 * Instances of the class {@code Label} represent a label. | 6737 * Instances of the class {@code Label} represent a label. |
| 6561 * <pre> | 6738 * <pre> |
| 6562 * label ::={@link SimpleIdentifier label} ':' | 6739 * label ::={@link SimpleIdentifier label} ':' |
| 6563 * </pre> | 6740 * </pre> |
| 6741 * @coverage dart.engine.ast |
| 6564 */ | 6742 */ |
| 6565 class Label extends ASTNode { | 6743 class Label extends ASTNode { |
| 6566 /** | 6744 /** |
| 6567 * The label being associated with the statement. | 6745 * The label being associated with the statement. |
| 6568 */ | 6746 */ |
| 6569 SimpleIdentifier _label; | 6747 SimpleIdentifier _label; |
| 6570 /** | 6748 /** |
| 6571 * The colon that separates the label from the statement. | 6749 * The colon that separates the label from the statement. |
| 6572 */ | 6750 */ |
| 6573 Token _colon; | 6751 Token _colon; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6615 } | 6793 } |
| 6616 void visitChildren(ASTVisitor<Object> visitor) { | 6794 void visitChildren(ASTVisitor<Object> visitor) { |
| 6617 safelyVisitChild(_label, visitor); | 6795 safelyVisitChild(_label, visitor); |
| 6618 } | 6796 } |
| 6619 } | 6797 } |
| 6620 /** | 6798 /** |
| 6621 * Instances of the class {@code LabeledStatement} represent a statement that ha
s a label associated | 6799 * Instances of the class {@code LabeledStatement} represent a statement that ha
s a label associated |
| 6622 * with them. | 6800 * with them. |
| 6623 * <pre> | 6801 * <pre> |
| 6624 * labeledStatement ::={@link Label label}+ {@link Statement statement}</pre> | 6802 * labeledStatement ::={@link Label label}+ {@link Statement statement}</pre> |
| 6803 * @coverage dart.engine.ast |
| 6625 */ | 6804 */ |
| 6626 class LabeledStatement extends Statement { | 6805 class LabeledStatement extends Statement { |
| 6627 /** | 6806 /** |
| 6628 * The labels being associated with the statement. | 6807 * The labels being associated with the statement. |
| 6629 */ | 6808 */ |
| 6630 NodeList<Label> _labels; | 6809 NodeList<Label> _labels; |
| 6631 /** | 6810 /** |
| 6632 * The statement with which the labels are being associated. | 6811 * The statement with which the labels are being associated. |
| 6633 */ | 6812 */ |
| 6634 Statement _statement; | 6813 Statement _statement; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6676 void visitChildren(ASTVisitor<Object> visitor) { | 6855 void visitChildren(ASTVisitor<Object> visitor) { |
| 6677 _labels.accept(visitor); | 6856 _labels.accept(visitor); |
| 6678 safelyVisitChild(_statement, visitor); | 6857 safelyVisitChild(_statement, visitor); |
| 6679 } | 6858 } |
| 6680 } | 6859 } |
| 6681 /** | 6860 /** |
| 6682 * Instances of the class {@code LibraryDirective} represent a library directive
. | 6861 * Instances of the class {@code LibraryDirective} represent a library directive
. |
| 6683 * <pre> | 6862 * <pre> |
| 6684 * libraryDirective ::={@link Annotation metadata} 'library' {@link Identifier n
ame} ';' | 6863 * libraryDirective ::={@link Annotation metadata} 'library' {@link Identifier n
ame} ';' |
| 6685 * </pre> | 6864 * </pre> |
| 6865 * @coverage dart.engine.ast |
| 6686 */ | 6866 */ |
| 6687 class LibraryDirective extends Directive { | 6867 class LibraryDirective extends Directive { |
| 6688 /** | 6868 /** |
| 6689 * The token representing the 'library' token. | 6869 * The token representing the 'library' token. |
| 6690 */ | 6870 */ |
| 6691 Token _libraryToken; | 6871 Token _libraryToken; |
| 6692 /** | 6872 /** |
| 6693 * The name of the library being defined. | 6873 * The name of the library being defined. |
| 6694 */ | 6874 */ |
| 6695 LibraryIdentifier _name; | 6875 LibraryIdentifier _name; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6762 super.visitChildren(visitor); | 6942 super.visitChildren(visitor); |
| 6763 safelyVisitChild(_name, visitor); | 6943 safelyVisitChild(_name, visitor); |
| 6764 } | 6944 } |
| 6765 Token get firstTokenAfterCommentAndMetadata => _libraryToken; | 6945 Token get firstTokenAfterCommentAndMetadata => _libraryToken; |
| 6766 } | 6946 } |
| 6767 /** | 6947 /** |
| 6768 * Instances of the class {@code LibraryIdentifier} represent the identifier for
a library. | 6948 * Instances of the class {@code LibraryIdentifier} represent the identifier for
a library. |
| 6769 * <pre> | 6949 * <pre> |
| 6770 * libraryIdentifier ::={@link SimpleIdentifier component} ('.' {@link SimpleIde
ntifier component}) | 6950 * libraryIdentifier ::={@link SimpleIdentifier component} ('.' {@link SimpleIde
ntifier component}) |
| 6771 * </pre> | 6951 * </pre> |
| 6952 * @coverage dart.engine.ast |
| 6772 */ | 6953 */ |
| 6773 class LibraryIdentifier extends Identifier { | 6954 class LibraryIdentifier extends Identifier { |
| 6774 /** | 6955 /** |
| 6775 * The components of the identifier. | 6956 * The components of the identifier. |
| 6776 */ | 6957 */ |
| 6777 NodeList<SimpleIdentifier> _components; | 6958 NodeList<SimpleIdentifier> _components; |
| 6778 /** | 6959 /** |
| 6779 * Initialize a newly created prefixed identifier. | 6960 * Initialize a newly created prefixed identifier. |
| 6780 * @param components the components of the identifier | 6961 * @param components the components of the identifier |
| 6781 */ | 6962 */ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6813 void visitChildren(ASTVisitor<Object> visitor) { | 6994 void visitChildren(ASTVisitor<Object> visitor) { |
| 6814 _components.accept(visitor); | 6995 _components.accept(visitor); |
| 6815 } | 6996 } |
| 6816 } | 6997 } |
| 6817 /** | 6998 /** |
| 6818 * Instances of the class {@code ListLiteral} represent a list literal. | 6999 * Instances of the class {@code ListLiteral} represent a list literal. |
| 6819 * <pre> | 7000 * <pre> |
| 6820 * listLiteral ::= | 7001 * listLiteral ::= |
| 6821 * 'const'? ('<' {@link TypeName type} '>')? '[' ({@link Expression expressionLi
st} ','?)? ']' | 7002 * 'const'? ('<' {@link TypeName type} '>')? '[' ({@link Expression expressionLi
st} ','?)? ']' |
| 6822 * </pre> | 7003 * </pre> |
| 7004 * @coverage dart.engine.ast |
| 6823 */ | 7005 */ |
| 6824 class ListLiteral extends TypedLiteral { | 7006 class ListLiteral extends TypedLiteral { |
| 6825 /** | 7007 /** |
| 6826 * The left square bracket. | 7008 * The left square bracket. |
| 6827 */ | 7009 */ |
| 6828 Token _leftBracket; | 7010 Token _leftBracket; |
| 6829 /** | 7011 /** |
| 6830 * The expressions used to compute the elements of the list. | 7012 * The expressions used to compute the elements of the list. |
| 6831 */ | 7013 */ |
| 6832 NodeList<Expression> _elements; | 7014 NodeList<Expression> _elements; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6904 void visitChildren(ASTVisitor<Object> visitor) { | 7086 void visitChildren(ASTVisitor<Object> visitor) { |
| 6905 super.visitChildren(visitor); | 7087 super.visitChildren(visitor); |
| 6906 _elements.accept(visitor); | 7088 _elements.accept(visitor); |
| 6907 } | 7089 } |
| 6908 } | 7090 } |
| 6909 /** | 7091 /** |
| 6910 * The abstract class {@code Literal} defines the behavior common to nodes that
represent a literal | 7092 * The abstract class {@code Literal} defines the behavior common to nodes that
represent a literal |
| 6911 * expression. | 7093 * expression. |
| 6912 * <pre> | 7094 * <pre> |
| 6913 * literal ::={@link BooleanLiteral booleanLiteral}| {@link DoubleLiteral double
Literal}| {@link IntegerLiteral integerLiteral}| {@link ListLiteral listLiteral}
| {@link MapLiteral mapLiteral}| {@link NullLiteral nullLiteral}| {@link StringL
iteral stringLiteral}</pre> | 7095 * literal ::={@link BooleanLiteral booleanLiteral}| {@link DoubleLiteral double
Literal}| {@link IntegerLiteral integerLiteral}| {@link ListLiteral listLiteral}
| {@link MapLiteral mapLiteral}| {@link NullLiteral nullLiteral}| {@link StringL
iteral stringLiteral}</pre> |
| 7096 * @coverage dart.engine.ast |
| 6914 */ | 7097 */ |
| 6915 abstract class Literal extends Expression { | 7098 abstract class Literal extends Expression { |
| 6916 } | 7099 } |
| 6917 /** | 7100 /** |
| 6918 * Instances of the class {@code MapLiteral} represent a literal map. | 7101 * Instances of the class {@code MapLiteral} represent a literal map. |
| 6919 * <pre> | 7102 * <pre> |
| 6920 * mapLiteral ::= | 7103 * mapLiteral ::= |
| 6921 * 'const'? ('<' {@link TypeName type} '>')? '{' ({@link MapLiteralEntry entry}
(',' {@link MapLiteralEntry entry})* ','?)? '}' | 7104 * 'const'? ('<' {@link TypeName type} '>')? '{' ({@link MapLiteralEntry entry}
(',' {@link MapLiteralEntry entry})* ','?)? '}' |
| 6922 * </pre> | 7105 * </pre> |
| 7106 * @coverage dart.engine.ast |
| 6923 */ | 7107 */ |
| 6924 class MapLiteral extends TypedLiteral { | 7108 class MapLiteral extends TypedLiteral { |
| 6925 /** | 7109 /** |
| 6926 * The left curly bracket. | 7110 * The left curly bracket. |
| 6927 */ | 7111 */ |
| 6928 Token _leftBracket; | 7112 Token _leftBracket; |
| 6929 /** | 7113 /** |
| 6930 * The entries in the map. | 7114 * The entries in the map. |
| 6931 */ | 7115 */ |
| 6932 NodeList<MapLiteralEntry> _entries; | 7116 NodeList<MapLiteralEntry> _entries; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7004 void visitChildren(ASTVisitor<Object> visitor) { | 7188 void visitChildren(ASTVisitor<Object> visitor) { |
| 7005 super.visitChildren(visitor); | 7189 super.visitChildren(visitor); |
| 7006 _entries.accept(visitor); | 7190 _entries.accept(visitor); |
| 7007 } | 7191 } |
| 7008 } | 7192 } |
| 7009 /** | 7193 /** |
| 7010 * Instances of the class {@code MapLiteralEntry} represent a single key/value p
air in a map | 7194 * Instances of the class {@code MapLiteralEntry} represent a single key/value p
air in a map |
| 7011 * literal. | 7195 * literal. |
| 7012 * <pre> | 7196 * <pre> |
| 7013 * mapLiteralEntry ::={@link StringLiteral key} ':' {@link Expression value}</pr
e> | 7197 * mapLiteralEntry ::={@link StringLiteral key} ':' {@link Expression value}</pr
e> |
| 7198 * @coverage dart.engine.ast |
| 7014 */ | 7199 */ |
| 7015 class MapLiteralEntry extends ASTNode { | 7200 class MapLiteralEntry extends ASTNode { |
| 7016 /** | 7201 /** |
| 7017 * The key with which the value will be associated. | 7202 * The key with which the value will be associated. |
| 7018 */ | 7203 */ |
| 7019 StringLiteral _key; | 7204 StringLiteral _key; |
| 7020 /** | 7205 /** |
| 7021 * The colon that separates the key from the value. | 7206 * The colon that separates the key from the value. |
| 7022 */ | 7207 */ |
| 7023 Token _separator; | 7208 Token _separator; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7087 safelyVisitChild(_key, visitor); | 7272 safelyVisitChild(_key, visitor); |
| 7088 safelyVisitChild(_value, visitor); | 7273 safelyVisitChild(_value, visitor); |
| 7089 } | 7274 } |
| 7090 } | 7275 } |
| 7091 /** | 7276 /** |
| 7092 * Instances of the class {@code MethodDeclaration} represent a method declarati
on. | 7277 * Instances of the class {@code MethodDeclaration} represent a method declarati
on. |
| 7093 * <pre> | 7278 * <pre> |
| 7094 * methodDeclaration ::= | 7279 * methodDeclaration ::= |
| 7095 * methodSignature {@link FunctionBody body}methodSignature ::= | 7280 * methodSignature {@link FunctionBody body}methodSignature ::= |
| 7096 * 'external'? ('abstract' | 'static')? {@link Type returnType}? ('get' | 'set')
? methodName{@link FormalParameterList formalParameterList}methodName ::={@link
SimpleIdentifier name}| 'operator' {@link SimpleIdentifier operator}</pre> | 7281 * 'external'? ('abstract' | 'static')? {@link Type returnType}? ('get' | 'set')
? methodName{@link FormalParameterList formalParameterList}methodName ::={@link
SimpleIdentifier name}| 'operator' {@link SimpleIdentifier operator}</pre> |
| 7282 * @coverage dart.engine.ast |
| 7097 */ | 7283 */ |
| 7098 class MethodDeclaration extends ClassMember { | 7284 class MethodDeclaration extends ClassMember { |
| 7099 /** | 7285 /** |
| 7100 * The token for the 'external' keyword, or {@code null} if the constructor is
not external. | 7286 * The token for the 'external' keyword, or {@code null} if the constructor is
not external. |
| 7101 */ | 7287 */ |
| 7102 Token _externalKeyword; | 7288 Token _externalKeyword; |
| 7103 /** | 7289 /** |
| 7104 * The token representing the 'abstract' or 'static' keyword, or {@code null}
if neither modifier | 7290 * The token representing the 'abstract' or 'static' keyword, or {@code null}
if neither modifier |
| 7105 * was specified. | 7291 * was specified. |
| 7106 */ | 7292 */ |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7326 return _name.beginToken; | 7512 return _name.beginToken; |
| 7327 } | 7513 } |
| 7328 } | 7514 } |
| 7329 /** | 7515 /** |
| 7330 * Instances of the class {@code MethodInvocation} represent the invocation of e
ither a function or | 7516 * Instances of the class {@code MethodInvocation} represent the invocation of e
ither a function or |
| 7331 * a method. Invocations of functions resulting from evaluating an expression ar
e represented by{@link FunctionExpressionInvocation function expression invocati
on} nodes. Invocations of getters | 7517 * a method. Invocations of functions resulting from evaluating an expression ar
e represented by{@link FunctionExpressionInvocation function expression invocati
on} nodes. Invocations of getters |
| 7332 * and setters are represented by either {@link PrefixedIdentifier prefixed iden
tifier} or{@link PropertyAccess property access} nodes. | 7518 * and setters are represented by either {@link PrefixedIdentifier prefixed iden
tifier} or{@link PropertyAccess property access} nodes. |
| 7333 * <pre> | 7519 * <pre> |
| 7334 * methodInvoction ::= | 7520 * methodInvoction ::= |
| 7335 * ({@link Expression target} '.')? {@link SimpleIdentifier methodName} {@link A
rgumentList argumentList}</pre> | 7521 * ({@link Expression target} '.')? {@link SimpleIdentifier methodName} {@link A
rgumentList argumentList}</pre> |
| 7522 * @coverage dart.engine.ast |
| 7336 */ | 7523 */ |
| 7337 class MethodInvocation extends Expression { | 7524 class MethodInvocation extends Expression { |
| 7338 /** | 7525 /** |
| 7339 * The expression producing the object on which the method is defined, or {@co
de null} if there is | 7526 * The expression producing the object on which the method is defined, or {@co
de null} if there is |
| 7340 * no target (that is, the target is implicitly {@code this}). | 7527 * no target (that is, the target is implicitly {@code this}). |
| 7341 */ | 7528 */ |
| 7342 Expression _target; | 7529 Expression _target; |
| 7343 /** | 7530 /** |
| 7344 * The period that separates the target from the method name, or {@code null}
if there is no | 7531 * The period that separates the target from the method name, or {@code null}
if there is no |
| 7345 * target. | 7532 * target. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7465 safelyVisitChild(_target, visitor); | 7652 safelyVisitChild(_target, visitor); |
| 7466 safelyVisitChild(_methodName, visitor); | 7653 safelyVisitChild(_methodName, visitor); |
| 7467 safelyVisitChild(_argumentList, visitor); | 7654 safelyVisitChild(_argumentList, visitor); |
| 7468 } | 7655 } |
| 7469 } | 7656 } |
| 7470 /** | 7657 /** |
| 7471 * Instances of the class {@code NamedExpression} represent an expression that h
as a name associated | 7658 * Instances of the class {@code NamedExpression} represent an expression that h
as a name associated |
| 7472 * with it. They are used in method invocations when there are named parameters. | 7659 * with it. They are used in method invocations when there are named parameters. |
| 7473 * <pre> | 7660 * <pre> |
| 7474 * namedExpression ::={@link Label name} {@link Expression expression}</pre> | 7661 * namedExpression ::={@link Label name} {@link Expression expression}</pre> |
| 7662 * @coverage dart.engine.ast |
| 7475 */ | 7663 */ |
| 7476 class NamedExpression extends Expression { | 7664 class NamedExpression extends Expression { |
| 7477 /** | 7665 /** |
| 7478 * The name associated with the expression. | 7666 * The name associated with the expression. |
| 7479 */ | 7667 */ |
| 7480 Label _name; | 7668 Label _name; |
| 7481 /** | 7669 /** |
| 7482 * The expression with which the name is associated. | 7670 * The expression with which the name is associated. |
| 7483 */ | 7671 */ |
| 7484 Expression _expression; | 7672 Expression _expression; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 7498 */ | 7686 */ |
| 7499 NamedExpression({Label name, Expression expression}) : this.full(name, express
ion); | 7687 NamedExpression({Label name, Expression expression}) : this.full(name, express
ion); |
| 7500 accept(ASTVisitor visitor) => visitor.visitNamedExpression(this); | 7688 accept(ASTVisitor visitor) => visitor.visitNamedExpression(this); |
| 7501 Token get beginToken => _name.beginToken; | 7689 Token get beginToken => _name.beginToken; |
| 7502 /** | 7690 /** |
| 7503 * Return the element representing the parameter being named by this expressio
n, or {@code null}if the AST structure has not been resolved or if there is no p
arameter with the same name as | 7691 * Return the element representing the parameter being named by this expressio
n, or {@code null}if the AST structure has not been resolved or if there is no p
arameter with the same name as |
| 7504 * this expression. | 7692 * this expression. |
| 7505 * @return the element representing the parameter being named by this expressi
on | 7693 * @return the element representing the parameter being named by this expressi
on |
| 7506 */ | 7694 */ |
| 7507 ParameterElement get element { | 7695 ParameterElement get element { |
| 7508 Element element19 = _name.label.element; | 7696 Element element20 = _name.label.element; |
| 7509 if (element19 is ParameterElement) { | 7697 if (element20 is ParameterElement) { |
| 7510 return element19 as ParameterElement; | 7698 return element20 as ParameterElement; |
| 7511 } | 7699 } |
| 7512 return null; | 7700 return null; |
| 7513 } | 7701 } |
| 7514 Token get endToken => _expression.endToken; | 7702 Token get endToken => _expression.endToken; |
| 7515 /** | 7703 /** |
| 7516 * Return the expression with which the name is associated. | 7704 * Return the expression with which the name is associated. |
| 7517 * @return the expression with which the name is associated | 7705 * @return the expression with which the name is associated |
| 7518 */ | 7706 */ |
| 7519 Expression get expression => _expression; | 7707 Expression get expression => _expression; |
| 7520 /** | 7708 /** |
| (...skipping 18 matching lines...) Expand all Loading... |
| 7539 void visitChildren(ASTVisitor<Object> visitor) { | 7727 void visitChildren(ASTVisitor<Object> visitor) { |
| 7540 safelyVisitChild(_name, visitor); | 7728 safelyVisitChild(_name, visitor); |
| 7541 safelyVisitChild(_expression, visitor); | 7729 safelyVisitChild(_expression, visitor); |
| 7542 } | 7730 } |
| 7543 } | 7731 } |
| 7544 /** | 7732 /** |
| 7545 * The abstract class {@code NamespaceDirective} defines the behavior common to
nodes that represent | 7733 * The abstract class {@code NamespaceDirective} defines the behavior common to
nodes that represent |
| 7546 * a directive that impacts the namespace of a library. | 7734 * a directive that impacts the namespace of a library. |
| 7547 * <pre> | 7735 * <pre> |
| 7548 * directive ::={@link ExportDirective exportDirective}| {@link ImportDirective
importDirective}</pre> | 7736 * directive ::={@link ExportDirective exportDirective}| {@link ImportDirective
importDirective}</pre> |
| 7737 * @coverage dart.engine.ast |
| 7549 */ | 7738 */ |
| 7550 abstract class NamespaceDirective extends UriBasedDirective { | 7739 abstract class NamespaceDirective extends UriBasedDirective { |
| 7551 /** | 7740 /** |
| 7552 * The token representing the 'import' or 'export' keyword. | 7741 * The token representing the 'import' or 'export' keyword. |
| 7553 */ | 7742 */ |
| 7554 Token _keyword; | 7743 Token _keyword; |
| 7555 /** | 7744 /** |
| 7556 * The combinators used to control which names are imported or exported. | 7745 * The combinators used to control which names are imported or exported. |
| 7557 */ | 7746 */ |
| 7558 NodeList<Combinator> _combinators; | 7747 NodeList<Combinator> _combinators; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7611 void set semicolon(Token semicolon12) { | 7800 void set semicolon(Token semicolon12) { |
| 7612 this._semicolon = semicolon12; | 7801 this._semicolon = semicolon12; |
| 7613 } | 7802 } |
| 7614 Token get firstTokenAfterCommentAndMetadata => _keyword; | 7803 Token get firstTokenAfterCommentAndMetadata => _keyword; |
| 7615 } | 7804 } |
| 7616 /** | 7805 /** |
| 7617 * The abstract class {@code NormalFormalParameter} defines the behavior common
to formal parameters | 7806 * The abstract class {@code NormalFormalParameter} defines the behavior common
to formal parameters |
| 7618 * that are required (are not optional). | 7807 * that are required (are not optional). |
| 7619 * <pre> | 7808 * <pre> |
| 7620 * normalFormalParameter ::={@link FunctionTypedFormalParameter functionSignatur
e}| {@link FieldFormalParameter fieldFormalParameter}| {@link SimpleFormalParame
ter simpleFormalParameter}</pre> | 7809 * normalFormalParameter ::={@link FunctionTypedFormalParameter functionSignatur
e}| {@link FieldFormalParameter fieldFormalParameter}| {@link SimpleFormalParame
ter simpleFormalParameter}</pre> |
| 7810 * @coverage dart.engine.ast |
| 7621 */ | 7811 */ |
| 7622 abstract class NormalFormalParameter extends FormalParameter { | 7812 abstract class NormalFormalParameter extends FormalParameter { |
| 7623 /** | 7813 /** |
| 7624 * The documentation comment associated with this parameter, or {@code null} i
f this parameter | 7814 * The documentation comment associated with this parameter, or {@code null} i
f this parameter |
| 7625 * does not have a documentation comment associated with it. | 7815 * does not have a documentation comment associated with it. |
| 7626 */ | 7816 */ |
| 7627 Comment _comment; | 7817 Comment _comment; |
| 7628 /** | 7818 /** |
| 7629 * The annotations associated with this parameter. | 7819 * The annotations associated with this parameter. |
| 7630 */ | 7820 */ |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7665 return ((parent6 as DefaultFormalParameter)).kind; | 7855 return ((parent6 as DefaultFormalParameter)).kind; |
| 7666 } | 7856 } |
| 7667 return ParameterKind.REQUIRED; | 7857 return ParameterKind.REQUIRED; |
| 7668 } | 7858 } |
| 7669 /** | 7859 /** |
| 7670 * Return the annotations associated with this parameter. | 7860 * Return the annotations associated with this parameter. |
| 7671 * @return the annotations associated with this parameter | 7861 * @return the annotations associated with this parameter |
| 7672 */ | 7862 */ |
| 7673 NodeList<Annotation> get metadata => _metadata; | 7863 NodeList<Annotation> get metadata => _metadata; |
| 7674 /** | 7864 /** |
| 7675 * Return {@code true} if this parameter is a const parameter. | 7865 * Return {@code true} if this parameter was declared with the 'const' modifie
r. |
| 7676 * @return {@code true} if this parameter is a const parameter | 7866 * @return {@code true} if this parameter was declared with the 'const' modifi
er |
| 7677 */ | 7867 */ |
| 7678 bool isConst(); | 7868 bool isConst(); |
| 7679 /** | 7869 /** |
| 7680 * Return {@code true} if this parameter is a final parameter. | 7870 * Return {@code true} if this parameter was declared with the 'final' modifie
r. Parameters that |
| 7681 * @return {@code true} if this parameter is a final parameter | 7871 * are declared with the 'const' modifier will return {@code false} even thoug
h they are |
| 7872 * implicitly final. |
| 7873 * @return {@code true} if this parameter was declared with the 'final' modifi
er |
| 7682 */ | 7874 */ |
| 7683 bool isFinal(); | 7875 bool isFinal(); |
| 7684 /** | 7876 /** |
| 7685 * Set the documentation comment associated with this parameter to the given c
omment | 7877 * Set the documentation comment associated with this parameter to the given c
omment |
| 7686 * @param comment the documentation comment to be associated with this paramet
er | 7878 * @param comment the documentation comment to be associated with this paramet
er |
| 7687 */ | 7879 */ |
| 7688 void set documentationComment(Comment comment3) { | 7880 void set documentationComment(Comment comment3) { |
| 7689 this._comment = becomeParentOf(comment3); | 7881 this._comment = becomeParentOf(comment3); |
| 7690 } | 7882 } |
| 7691 /** | 7883 /** |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7730 children.sort(); | 7922 children.sort(); |
| 7731 return children; | 7923 return children; |
| 7732 } | 7924 } |
| 7733 } | 7925 } |
| 7734 /** | 7926 /** |
| 7735 * Instances of the class {@code NullLiteral} represent a null literal expressio
n. | 7927 * Instances of the class {@code NullLiteral} represent a null literal expressio
n. |
| 7736 * <pre> | 7928 * <pre> |
| 7737 * nullLiteral ::= | 7929 * nullLiteral ::= |
| 7738 * 'null' | 7930 * 'null' |
| 7739 * </pre> | 7931 * </pre> |
| 7932 * @coverage dart.engine.ast |
| 7740 */ | 7933 */ |
| 7741 class NullLiteral extends Literal { | 7934 class NullLiteral extends Literal { |
| 7742 /** | 7935 /** |
| 7743 * The token representing the literal. | 7936 * The token representing the literal. |
| 7744 */ | 7937 */ |
| 7745 Token _literal; | 7938 Token _literal; |
| 7746 /** | 7939 /** |
| 7747 * Initialize a newly created null literal. | 7940 * Initialize a newly created null literal. |
| 7748 * @param token the token representing the literal | 7941 * @param token the token representing the literal |
| 7749 */ | 7942 */ |
| (...skipping 22 matching lines...) Expand all Loading... |
| 7772 } | 7965 } |
| 7773 void visitChildren(ASTVisitor<Object> visitor) { | 7966 void visitChildren(ASTVisitor<Object> visitor) { |
| 7774 } | 7967 } |
| 7775 } | 7968 } |
| 7776 /** | 7969 /** |
| 7777 * Instances of the class {@code ParenthesizedExpression} represent a parenthesi
zed expression. | 7970 * Instances of the class {@code ParenthesizedExpression} represent a parenthesi
zed expression. |
| 7778 * <pre> | 7971 * <pre> |
| 7779 * parenthesizedExpression ::= | 7972 * parenthesizedExpression ::= |
| 7780 * '(' {@link Expression expression} ')' | 7973 * '(' {@link Expression expression} ')' |
| 7781 * </pre> | 7974 * </pre> |
| 7975 * @coverage dart.engine.ast |
| 7782 */ | 7976 */ |
| 7783 class ParenthesizedExpression extends Expression { | 7977 class ParenthesizedExpression extends Expression { |
| 7784 /** | 7978 /** |
| 7785 * The left parenthesis. | 7979 * The left parenthesis. |
| 7786 */ | 7980 */ |
| 7787 Token _leftParenthesis; | 7981 Token _leftParenthesis; |
| 7788 /** | 7982 /** |
| 7789 * The expression within the parentheses. | 7983 * The expression within the parentheses. |
| 7790 */ | 7984 */ |
| 7791 Expression _expression; | 7985 Expression _expression; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7852 } | 8046 } |
| 7853 void visitChildren(ASTVisitor<Object> visitor) { | 8047 void visitChildren(ASTVisitor<Object> visitor) { |
| 7854 safelyVisitChild(_expression, visitor); | 8048 safelyVisitChild(_expression, visitor); |
| 7855 } | 8049 } |
| 7856 } | 8050 } |
| 7857 /** | 8051 /** |
| 7858 * Instances of the class {@code PartDirective} represent a part directive. | 8052 * Instances of the class {@code PartDirective} represent a part directive. |
| 7859 * <pre> | 8053 * <pre> |
| 7860 * partDirective ::={@link Annotation metadata} 'part' {@link StringLiteral part
Uri} ';' | 8054 * partDirective ::={@link Annotation metadata} 'part' {@link StringLiteral part
Uri} ';' |
| 7861 * </pre> | 8055 * </pre> |
| 8056 * @coverage dart.engine.ast |
| 7862 */ | 8057 */ |
| 7863 class PartDirective extends UriBasedDirective { | 8058 class PartDirective extends UriBasedDirective { |
| 7864 /** | 8059 /** |
| 7865 * The token representing the 'part' token. | 8060 * The token representing the 'part' token. |
| 7866 */ | 8061 */ |
| 7867 Token _partToken; | 8062 Token _partToken; |
| 7868 /** | 8063 /** |
| 7869 * The semicolon terminating the directive. | 8064 * The semicolon terminating the directive. |
| 7870 */ | 8065 */ |
| 7871 Token _semicolon; | 8066 Token _semicolon; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7917 void set semicolon(Token semicolon13) { | 8112 void set semicolon(Token semicolon13) { |
| 7918 this._semicolon = semicolon13; | 8113 this._semicolon = semicolon13; |
| 7919 } | 8114 } |
| 7920 Token get firstTokenAfterCommentAndMetadata => _partToken; | 8115 Token get firstTokenAfterCommentAndMetadata => _partToken; |
| 7921 } | 8116 } |
| 7922 /** | 8117 /** |
| 7923 * Instances of the class {@code PartOfDirective} represent a part-of directive. | 8118 * Instances of the class {@code PartOfDirective} represent a part-of directive. |
| 7924 * <pre> | 8119 * <pre> |
| 7925 * partOfDirective ::={@link Annotation metadata} 'part' 'of' {@link Identifier
libraryName} ';' | 8120 * partOfDirective ::={@link Annotation metadata} 'part' 'of' {@link Identifier
libraryName} ';' |
| 7926 * </pre> | 8121 * </pre> |
| 8122 * @coverage dart.engine.ast |
| 7927 */ | 8123 */ |
| 7928 class PartOfDirective extends Directive { | 8124 class PartOfDirective extends Directive { |
| 7929 /** | 8125 /** |
| 7930 * The token representing the 'part' token. | 8126 * The token representing the 'part' token. |
| 7931 */ | 8127 */ |
| 7932 Token _partToken; | 8128 Token _partToken; |
| 7933 /** | 8129 /** |
| 7934 * The token representing the 'of' token. | 8130 * The token representing the 'of' token. |
| 7935 */ | 8131 */ |
| 7936 Token _ofToken; | 8132 Token _ofToken; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8021 void visitChildren(ASTVisitor<Object> visitor) { | 8217 void visitChildren(ASTVisitor<Object> visitor) { |
| 8022 super.visitChildren(visitor); | 8218 super.visitChildren(visitor); |
| 8023 safelyVisitChild(_libraryName, visitor); | 8219 safelyVisitChild(_libraryName, visitor); |
| 8024 } | 8220 } |
| 8025 Token get firstTokenAfterCommentAndMetadata => _partToken; | 8221 Token get firstTokenAfterCommentAndMetadata => _partToken; |
| 8026 } | 8222 } |
| 8027 /** | 8223 /** |
| 8028 * Instances of the class {@code PostfixExpression} represent a postfix unary ex
pression. | 8224 * Instances of the class {@code PostfixExpression} represent a postfix unary ex
pression. |
| 8029 * <pre> | 8225 * <pre> |
| 8030 * postfixExpression ::={@link Expression operand} {@link Token operator}</pre> | 8226 * postfixExpression ::={@link Expression operand} {@link Token operator}</pre> |
| 8227 * @coverage dart.engine.ast |
| 8031 */ | 8228 */ |
| 8032 class PostfixExpression extends Expression { | 8229 class PostfixExpression extends Expression { |
| 8033 /** | 8230 /** |
| 8034 * The expression computing the operand for the operator. | 8231 * The expression computing the operand for the operator. |
| 8035 */ | 8232 */ |
| 8036 Expression _operand; | 8233 Expression _operand; |
| 8037 /** | 8234 /** |
| 8038 * The postfix operator being applied to the operand. | 8235 * The postfix operator being applied to the operand. |
| 8039 */ | 8236 */ |
| 8040 Token _operator; | 8237 Token _operator; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8100 this._operator = operator4; | 8297 this._operator = operator4; |
| 8101 } | 8298 } |
| 8102 void visitChildren(ASTVisitor<Object> visitor) { | 8299 void visitChildren(ASTVisitor<Object> visitor) { |
| 8103 safelyVisitChild(_operand, visitor); | 8300 safelyVisitChild(_operand, visitor); |
| 8104 } | 8301 } |
| 8105 } | 8302 } |
| 8106 /** | 8303 /** |
| 8107 * Instances of the class {@code PrefixExpression} represent a prefix unary expr
ession. | 8304 * Instances of the class {@code PrefixExpression} represent a prefix unary expr
ession. |
| 8108 * <pre> | 8305 * <pre> |
| 8109 * prefixExpression ::={@link Token operator} {@link Expression operand}</pre> | 8306 * prefixExpression ::={@link Token operator} {@link Expression operand}</pre> |
| 8307 * @coverage dart.engine.ast |
| 8110 */ | 8308 */ |
| 8111 class PrefixExpression extends Expression { | 8309 class PrefixExpression extends Expression { |
| 8112 /** | 8310 /** |
| 8113 * The prefix operator being applied to the operand. | 8311 * The prefix operator being applied to the operand. |
| 8114 */ | 8312 */ |
| 8115 Token _operator; | 8313 Token _operator; |
| 8116 /** | 8314 /** |
| 8117 * The expression computing the operand for the operator. | 8315 * The expression computing the operand for the operator. |
| 8118 */ | 8316 */ |
| 8119 Expression _operand; | 8317 Expression _operand; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8181 void visitChildren(ASTVisitor<Object> visitor) { | 8379 void visitChildren(ASTVisitor<Object> visitor) { |
| 8182 safelyVisitChild(_operand, visitor); | 8380 safelyVisitChild(_operand, visitor); |
| 8183 } | 8381 } |
| 8184 } | 8382 } |
| 8185 /** | 8383 /** |
| 8186 * Instances of the class {@code PrefixedIdentifier} represent either an identif
ier that is prefixed | 8384 * Instances of the class {@code PrefixedIdentifier} represent either an identif
ier that is prefixed |
| 8187 * or an access to an object property where the target of the property access is
a simple | 8385 * or an access to an object property where the target of the property access is
a simple |
| 8188 * identifier. | 8386 * identifier. |
| 8189 * <pre> | 8387 * <pre> |
| 8190 * prefixedIdentifier ::={@link SimpleIdentifier prefix} '.' {@link SimpleIdenti
fier identifier}</pre> | 8388 * prefixedIdentifier ::={@link SimpleIdentifier prefix} '.' {@link SimpleIdenti
fier identifier}</pre> |
| 8389 * @coverage dart.engine.ast |
| 8191 */ | 8390 */ |
| 8192 class PrefixedIdentifier extends Identifier { | 8391 class PrefixedIdentifier extends Identifier { |
| 8193 /** | 8392 /** |
| 8194 * The prefix associated with the library in which the identifier is defined. | 8393 * The prefix associated with the library in which the identifier is defined. |
| 8195 */ | 8394 */ |
| 8196 SimpleIdentifier _prefix; | 8395 SimpleIdentifier _prefix; |
| 8197 /** | 8396 /** |
| 8198 * The period used to separate the prefix from the identifier. | 8397 * The period used to separate the prefix from the identifier. |
| 8199 */ | 8398 */ |
| 8200 Token _period; | 8399 Token _period; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8272 safelyVisitChild(_identifier, visitor); | 8471 safelyVisitChild(_identifier, visitor); |
| 8273 } | 8472 } |
| 8274 } | 8473 } |
| 8275 /** | 8474 /** |
| 8276 * Instances of the class {@code PropertyAccess} represent the access of a prope
rty of an object. | 8475 * Instances of the class {@code PropertyAccess} represent the access of a prope
rty of an object. |
| 8277 * <p> | 8476 * <p> |
| 8278 * Note, however, that accesses to properties of objects can also be represented
as{@link PrefixedIdentifier prefixed identifier} nodes in cases where the targe
t is also a simple | 8477 * Note, however, that accesses to properties of objects can also be represented
as{@link PrefixedIdentifier prefixed identifier} nodes in cases where the targe
t is also a simple |
| 8279 * identifier. | 8478 * identifier. |
| 8280 * <pre> | 8479 * <pre> |
| 8281 * propertyAccess ::={@link Expression target} '.' {@link SimpleIdentifier prope
rtyName}</pre> | 8480 * propertyAccess ::={@link Expression target} '.' {@link SimpleIdentifier prope
rtyName}</pre> |
| 8481 * @coverage dart.engine.ast |
| 8282 */ | 8482 */ |
| 8283 class PropertyAccess extends Expression { | 8483 class PropertyAccess extends Expression { |
| 8284 /** | 8484 /** |
| 8285 * The expression computing the object defining the property being accessed. | 8485 * The expression computing the object defining the property being accessed. |
| 8286 */ | 8486 */ |
| 8287 Expression _target; | 8487 Expression _target; |
| 8288 /** | 8488 /** |
| 8289 * The property access operator. | 8489 * The property access operator. |
| 8290 */ | 8490 */ |
| 8291 Token _operator; | 8491 Token _operator; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8390 safelyVisitChild(_propertyName, visitor); | 8590 safelyVisitChild(_propertyName, visitor); |
| 8391 } | 8591 } |
| 8392 } | 8592 } |
| 8393 /** | 8593 /** |
| 8394 * Instances of the class {@code RedirectingConstructorInvocation} represent the
invocation of a | 8594 * Instances of the class {@code RedirectingConstructorInvocation} represent the
invocation of a |
| 8395 * another constructor in the same class from within a constructor's initializat
ion list. | 8595 * another constructor in the same class from within a constructor's initializat
ion list. |
| 8396 * <pre> | 8596 * <pre> |
| 8397 * redirectingConstructorInvocation ::= | 8597 * redirectingConstructorInvocation ::= |
| 8398 * 'this' ('.' identifier)? arguments | 8598 * 'this' ('.' identifier)? arguments |
| 8399 * </pre> | 8599 * </pre> |
| 8600 * @coverage dart.engine.ast |
| 8400 */ | 8601 */ |
| 8401 class RedirectingConstructorInvocation extends ConstructorInitializer { | 8602 class RedirectingConstructorInvocation extends ConstructorInitializer { |
| 8402 /** | 8603 /** |
| 8403 * The token for the 'this' keyword. | 8604 * The token for the 'this' keyword. |
| 8404 */ | 8605 */ |
| 8405 Token _keyword; | 8606 Token _keyword; |
| 8406 /** | 8607 /** |
| 8407 * The token for the period before the name of the constructor that is being i
nvoked, or{@code null} if the unnamed constructor is being invoked. | 8608 * The token for the period before the name of the constructor that is being i
nvoked, or{@code null} if the unnamed constructor is being invoked. |
| 8408 */ | 8609 */ |
| 8409 Token _period; | 8610 Token _period; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8492 * Set the element associated with the constructor to the given element. | 8693 * Set the element associated with the constructor to the given element. |
| 8493 * @param element the element associated with the constructor | 8694 * @param element the element associated with the constructor |
| 8494 */ | 8695 */ |
| 8495 void set element(ConstructorElement element15) { | 8696 void set element(ConstructorElement element15) { |
| 8496 this._element = element15; | 8697 this._element = element15; |
| 8497 } | 8698 } |
| 8498 /** | 8699 /** |
| 8499 * Set the token for the 'this' keyword to the given token. | 8700 * Set the token for the 'this' keyword to the given token. |
| 8500 * @param keyword the token for the 'this' keyword | 8701 * @param keyword the token for the 'this' keyword |
| 8501 */ | 8702 */ |
| 8502 void set keyword(Token keyword13) { | 8703 void set keyword(Token keyword14) { |
| 8503 this._keyword = keyword13; | 8704 this._keyword = keyword14; |
| 8504 } | 8705 } |
| 8505 /** | 8706 /** |
| 8506 * Set the token for the period before the name of the constructor that is bei
ng invoked to the | 8707 * Set the token for the period before the name of the constructor that is bei
ng invoked to the |
| 8507 * given token. | 8708 * given token. |
| 8508 * @param period the token for the period before the name of the constructor t
hat is being invoked | 8709 * @param period the token for the period before the name of the constructor t
hat is being invoked |
| 8509 */ | 8710 */ |
| 8510 void set period(Token period11) { | 8711 void set period(Token period11) { |
| 8511 this._period = period11; | 8712 this._period = period11; |
| 8512 } | 8713 } |
| 8513 void visitChildren(ASTVisitor<Object> visitor) { | 8714 void visitChildren(ASTVisitor<Object> visitor) { |
| 8514 safelyVisitChild(_constructorName, visitor); | 8715 safelyVisitChild(_constructorName, visitor); |
| 8515 safelyVisitChild(_argumentList, visitor); | 8716 safelyVisitChild(_argumentList, visitor); |
| 8516 } | 8717 } |
| 8517 } | 8718 } |
| 8518 /** | 8719 /** |
| 8519 * Instances of the class {@code ReturnStatement} represent a return statement. | 8720 * Instances of the class {@code ReturnStatement} represent a return statement. |
| 8520 * <pre> | 8721 * <pre> |
| 8521 * returnStatement ::= | 8722 * returnStatement ::= |
| 8522 * 'return' {@link Expression expression}? ';' | 8723 * 'return' {@link Expression expression}? ';' |
| 8523 * </pre> | 8724 * </pre> |
| 8725 * @coverage dart.engine.ast |
| 8524 */ | 8726 */ |
| 8525 class ReturnStatement extends Statement { | 8727 class ReturnStatement extends Statement { |
| 8526 /** | 8728 /** |
| 8527 * The token representing the 'return' keyword. | 8729 * The token representing the 'return' keyword. |
| 8528 */ | 8730 */ |
| 8529 Token _keyword; | 8731 Token _keyword; |
| 8530 /** | 8732 /** |
| 8531 * The expression computing the value to be returned, or {@code null} if no ex
plicit value was | 8733 * The expression computing the value to be returned, or {@code null} if no ex
plicit value was |
| 8532 * provided. | 8734 * provided. |
| 8533 */ | 8735 */ |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8577 * Set the expression computing the value to be returned to the given expressi
on. | 8779 * Set the expression computing the value to be returned to the given expressi
on. |
| 8578 * @param expression the expression computing the value to be returned | 8780 * @param expression the expression computing the value to be returned |
| 8579 */ | 8781 */ |
| 8580 void set expression(Expression expression10) { | 8782 void set expression(Expression expression10) { |
| 8581 this._expression = becomeParentOf(expression10); | 8783 this._expression = becomeParentOf(expression10); |
| 8582 } | 8784 } |
| 8583 /** | 8785 /** |
| 8584 * Set the token representing the 'return' keyword to the given token. | 8786 * Set the token representing the 'return' keyword to the given token. |
| 8585 * @param keyword the token representing the 'return' keyword | 8787 * @param keyword the token representing the 'return' keyword |
| 8586 */ | 8788 */ |
| 8587 void set keyword(Token keyword14) { | 8789 void set keyword(Token keyword15) { |
| 8588 this._keyword = keyword14; | 8790 this._keyword = keyword15; |
| 8589 } | 8791 } |
| 8590 /** | 8792 /** |
| 8591 * Set the semicolon terminating the statement to the given token. | 8793 * Set the semicolon terminating the statement to the given token. |
| 8592 * @param semicolon the semicolon terminating the statement | 8794 * @param semicolon the semicolon terminating the statement |
| 8593 */ | 8795 */ |
| 8594 void set semicolon(Token semicolon15) { | 8796 void set semicolon(Token semicolon15) { |
| 8595 this._semicolon = semicolon15; | 8797 this._semicolon = semicolon15; |
| 8596 } | 8798 } |
| 8597 void visitChildren(ASTVisitor<Object> visitor) { | 8799 void visitChildren(ASTVisitor<Object> visitor) { |
| 8598 safelyVisitChild(_expression, visitor); | 8800 safelyVisitChild(_expression, visitor); |
| 8599 } | 8801 } |
| 8600 } | 8802 } |
| 8601 /** | 8803 /** |
| 8602 * Instances of the class {@code ScriptTag} represent the script tag that can op
tionally occur at | 8804 * Instances of the class {@code ScriptTag} represent the script tag that can op
tionally occur at |
| 8603 * the beginning of a compilation unit. | 8805 * the beginning of a compilation unit. |
| 8604 * <pre> | 8806 * <pre> |
| 8605 * scriptTag ::= | 8807 * scriptTag ::= |
| 8606 * '#!' (~NEWLINE)* NEWLINE | 8808 * '#!' (~NEWLINE)* NEWLINE |
| 8607 * </pre> | 8809 * </pre> |
| 8810 * @coverage dart.engine.ast |
| 8608 */ | 8811 */ |
| 8609 class ScriptTag extends ASTNode { | 8812 class ScriptTag extends ASTNode { |
| 8610 /** | 8813 /** |
| 8611 * The token representing this script tag. | 8814 * The token representing this script tag. |
| 8612 */ | 8815 */ |
| 8613 Token _scriptTag; | 8816 Token _scriptTag; |
| 8614 /** | 8817 /** |
| 8615 * Initialize a newly created script tag. | 8818 * Initialize a newly created script tag. |
| 8616 * @param scriptTag the token representing this script tag | 8819 * @param scriptTag the token representing this script tag |
| 8617 */ | 8820 */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 8641 void visitChildren(ASTVisitor<Object> visitor) { | 8844 void visitChildren(ASTVisitor<Object> visitor) { |
| 8642 } | 8845 } |
| 8643 } | 8846 } |
| 8644 /** | 8847 /** |
| 8645 * Instances of the class {@code ShowCombinator} represent a combinator that res
tricts the names | 8848 * Instances of the class {@code ShowCombinator} represent a combinator that res
tricts the names |
| 8646 * being imported to those in a given list. | 8849 * being imported to those in a given list. |
| 8647 * <pre> | 8850 * <pre> |
| 8648 * showCombinator ::= | 8851 * showCombinator ::= |
| 8649 * 'show' {@link SimpleIdentifier identifier} (',' {@link SimpleIdentifier ident
ifier}) | 8852 * 'show' {@link SimpleIdentifier identifier} (',' {@link SimpleIdentifier ident
ifier}) |
| 8650 * </pre> | 8853 * </pre> |
| 8854 * @coverage dart.engine.ast |
| 8651 */ | 8855 */ |
| 8652 class ShowCombinator extends Combinator { | 8856 class ShowCombinator extends Combinator { |
| 8653 /** | 8857 /** |
| 8654 * The list of names from the library that are made visible by this combinator
. | 8858 * The list of names from the library that are made visible by this combinator
. |
| 8655 */ | 8859 */ |
| 8656 NodeList<SimpleIdentifier> _shownNames; | 8860 NodeList<SimpleIdentifier> _shownNames; |
| 8657 /** | 8861 /** |
| 8658 * Initialize a newly created import show combinator. | 8862 * Initialize a newly created import show combinator. |
| 8659 * @param keyword the comma introducing the combinator | 8863 * @param keyword the comma introducing the combinator |
| 8660 * @param shownNames the list of names from the library that are made visible
by this combinator | 8864 * @param shownNames the list of names from the library that are made visible
by this combinator |
| (...skipping 17 matching lines...) Expand all Loading... |
| 8678 NodeList<SimpleIdentifier> get shownNames => _shownNames; | 8882 NodeList<SimpleIdentifier> get shownNames => _shownNames; |
| 8679 void visitChildren(ASTVisitor<Object> visitor) { | 8883 void visitChildren(ASTVisitor<Object> visitor) { |
| 8680 _shownNames.accept(visitor); | 8884 _shownNames.accept(visitor); |
| 8681 } | 8885 } |
| 8682 } | 8886 } |
| 8683 /** | 8887 /** |
| 8684 * Instances of the class {@code SimpleFormalParameter} represent a simple forma
l parameter. | 8888 * Instances of the class {@code SimpleFormalParameter} represent a simple forma
l parameter. |
| 8685 * <pre> | 8889 * <pre> |
| 8686 * simpleFormalParameter ::= | 8890 * simpleFormalParameter ::= |
| 8687 * ('final' {@link TypeName type} | 'var' | {@link TypeName type})? {@link Simpl
eIdentifier identifier}</pre> | 8891 * ('final' {@link TypeName type} | 'var' | {@link TypeName type})? {@link Simpl
eIdentifier identifier}</pre> |
| 8892 * @coverage dart.engine.ast |
| 8688 */ | 8893 */ |
| 8689 class SimpleFormalParameter extends NormalFormalParameter { | 8894 class SimpleFormalParameter extends NormalFormalParameter { |
| 8690 /** | 8895 /** |
| 8691 * The token representing either the 'final', 'const' or 'var' keyword, or {@c
ode null} if no | 8896 * The token representing either the 'final', 'const' or 'var' keyword, or {@c
ode null} if no |
| 8692 * keyword was used. | 8897 * keyword was used. |
| 8693 */ | 8898 */ |
| 8694 Token _keyword; | 8899 Token _keyword; |
| 8695 /** | 8900 /** |
| 8696 * The name of the declared type of the parameter, or {@code null} if the para
meter does not have | 8901 * The name of the declared type of the parameter, or {@code null} if the para
meter does not have |
| 8697 * a declared type. | 8902 * a declared type. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8738 * not have a declared type. | 8943 * not have a declared type. |
| 8739 * @return the name of the declared type of the parameter | 8944 * @return the name of the declared type of the parameter |
| 8740 */ | 8945 */ |
| 8741 TypeName get type => _type; | 8946 TypeName get type => _type; |
| 8742 bool isConst() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.CONST); | 8947 bool isConst() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.CONST); |
| 8743 bool isFinal() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.FINAL); | 8948 bool isFinal() => (_keyword is KeywordToken) && identical(((_keyword as Keywor
dToken)).keyword, Keyword.FINAL); |
| 8744 /** | 8949 /** |
| 8745 * Set the token representing either the 'final', 'const' or 'var' keyword to
the given token. | 8950 * Set the token representing either the 'final', 'const' or 'var' keyword to
the given token. |
| 8746 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 8951 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 8747 */ | 8952 */ |
| 8748 void set keyword(Token keyword15) { | 8953 void set keyword(Token keyword16) { |
| 8749 this._keyword = keyword15; | 8954 this._keyword = keyword16; |
| 8750 } | 8955 } |
| 8751 /** | 8956 /** |
| 8752 * Set the name of the declared type of the parameter to the given type name. | 8957 * Set the name of the declared type of the parameter to the given type name. |
| 8753 * @param typeName the name of the declared type of the parameter | 8958 * @param typeName the name of the declared type of the parameter |
| 8754 */ | 8959 */ |
| 8755 void set type(TypeName typeName) { | 8960 void set type(TypeName typeName) { |
| 8756 _type = becomeParentOf(typeName); | 8961 _type = becomeParentOf(typeName); |
| 8757 } | 8962 } |
| 8758 void visitChildren(ASTVisitor<Object> visitor) { | 8963 void visitChildren(ASTVisitor<Object> visitor) { |
| 8759 super.visitChildren(visitor); | 8964 super.visitChildren(visitor); |
| 8760 safelyVisitChild(_type, visitor); | 8965 safelyVisitChild(_type, visitor); |
| 8761 safelyVisitChild(identifier, visitor); | 8966 safelyVisitChild(identifier, visitor); |
| 8762 } | 8967 } |
| 8763 } | 8968 } |
| 8764 /** | 8969 /** |
| 8765 * Instances of the class {@code SimpleIdentifier} represent a simple identifier
. | 8970 * Instances of the class {@code SimpleIdentifier} represent a simple identifier
. |
| 8766 * <pre> | 8971 * <pre> |
| 8767 * simpleIdentifier ::= | 8972 * simpleIdentifier ::= |
| 8768 * initialCharacter internalCharacter | 8973 * initialCharacter internalCharacter |
| 8769 * initialCharacter ::= '_' | '$' | letter | 8974 * initialCharacter ::= '_' | '$' | letter |
| 8770 * internalCharacter ::= '_' | '$' | letter | digit | 8975 * internalCharacter ::= '_' | '$' | letter | digit |
| 8771 * </pre> | 8976 * </pre> |
| 8977 * @coverage dart.engine.ast |
| 8772 */ | 8978 */ |
| 8773 class SimpleIdentifier extends Identifier { | 8979 class SimpleIdentifier extends Identifier { |
| 8774 /** | 8980 /** |
| 8775 * The token representing the identifier. | 8981 * The token representing the identifier. |
| 8776 */ | 8982 */ |
| 8777 Token _token; | 8983 Token _token; |
| 8778 /** | 8984 /** |
| 8779 * The element associated with this identifier, or {@code null} if the AST str
ucture has not been | 8985 * The element associated with this identifier, or {@code null} if the AST str
ucture has not been |
| 8780 * resolved or if this identifier could not be resolved. | 8986 * resolved or if this identifier could not be resolved. |
| 8781 */ | 8987 */ |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8931 * simpleStringLiteral ::= | 9137 * simpleStringLiteral ::= |
| 8932 * multiLineStringLiteral | 9138 * multiLineStringLiteral |
| 8933 * | singleLineStringLiteral | 9139 * | singleLineStringLiteral |
| 8934 * multiLineStringLiteral ::= | 9140 * multiLineStringLiteral ::= |
| 8935 * "'''" characters "'''" | 9141 * "'''" characters "'''" |
| 8936 * | '"""' characters '"""' | 9142 * | '"""' characters '"""' |
| 8937 * singleLineStringLiteral ::= | 9143 * singleLineStringLiteral ::= |
| 8938 * "'" characters "'" | 9144 * "'" characters "'" |
| 8939 * '"' characters '"' | 9145 * '"' characters '"' |
| 8940 * </pre> | 9146 * </pre> |
| 9147 * @coverage dart.engine.ast |
| 8941 */ | 9148 */ |
| 8942 class SimpleStringLiteral extends StringLiteral { | 9149 class SimpleStringLiteral extends StringLiteral { |
| 8943 /** | 9150 /** |
| 8944 * The token representing the literal. | 9151 * The token representing the literal. |
| 8945 */ | 9152 */ |
| 8946 Token _literal; | 9153 Token _literal; |
| 8947 /** | 9154 /** |
| 8948 * The value of the literal. | 9155 * The value of the literal. |
| 8949 */ | 9156 */ |
| 8950 String _value; | 9157 String _value; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9007 _value = string; | 9214 _value = string; |
| 9008 } | 9215 } |
| 9009 void visitChildren(ASTVisitor<Object> visitor) { | 9216 void visitChildren(ASTVisitor<Object> visitor) { |
| 9010 } | 9217 } |
| 9011 } | 9218 } |
| 9012 /** | 9219 /** |
| 9013 * Instances of the class {@code Statement} defines the behavior common to nodes
that represent a | 9220 * Instances of the class {@code Statement} defines the behavior common to nodes
that represent a |
| 9014 * statement. | 9221 * statement. |
| 9015 * <pre> | 9222 * <pre> |
| 9016 * statement ::={@link Block block}| {@link VariableDeclarationStatement initial
izedVariableDeclaration ';'}| {@link ForStatement forStatement}| {@link ForEachS
tatement forEachStatement}| {@link WhileStatement whileStatement}| {@link DoStat
ement doStatement}| {@link SwitchStatement switchStatement}| {@link IfStatement
ifStatement}| {@link TryStatement tryStatement}| {@link BreakStatement breakStat
ement}| {@link ContinueStatement continueStatement}| {@link ReturnStatement retu
rnStatement}| {@link ExpressionStatement expressionStatement}| {@link FunctionDe
clarationStatement functionSignature functionBody}</pre> | 9223 * statement ::={@link Block block}| {@link VariableDeclarationStatement initial
izedVariableDeclaration ';'}| {@link ForStatement forStatement}| {@link ForEachS
tatement forEachStatement}| {@link WhileStatement whileStatement}| {@link DoStat
ement doStatement}| {@link SwitchStatement switchStatement}| {@link IfStatement
ifStatement}| {@link TryStatement tryStatement}| {@link BreakStatement breakStat
ement}| {@link ContinueStatement continueStatement}| {@link ReturnStatement retu
rnStatement}| {@link ExpressionStatement expressionStatement}| {@link FunctionDe
clarationStatement functionSignature functionBody}</pre> |
| 9224 * @coverage dart.engine.ast |
| 9017 */ | 9225 */ |
| 9018 abstract class Statement extends ASTNode { | 9226 abstract class Statement extends ASTNode { |
| 9019 } | 9227 } |
| 9020 /** | 9228 /** |
| 9021 * Instances of the class {@code StringInterpolation} represent a string interpo
lation literal. | 9229 * Instances of the class {@code StringInterpolation} represent a string interpo
lation literal. |
| 9022 * <pre> | 9230 * <pre> |
| 9023 * stringInterpolation ::= | 9231 * stringInterpolation ::= |
| 9024 * ''' {@link InterpolationElement interpolationElement}* ''' | 9232 * ''' {@link InterpolationElement interpolationElement}* ''' |
| 9025 * | '"' {@link InterpolationElement interpolationElement}* '"' | 9233 * | '"' {@link InterpolationElement interpolationElement}* '"' |
| 9026 * </pre> | 9234 * </pre> |
| 9235 * @coverage dart.engine.ast |
| 9027 */ | 9236 */ |
| 9028 class StringInterpolation extends StringLiteral { | 9237 class StringInterpolation extends StringLiteral { |
| 9029 /** | 9238 /** |
| 9030 * The elements that will be composed to produce the resulting string. | 9239 * The elements that will be composed to produce the resulting string. |
| 9031 */ | 9240 */ |
| 9032 NodeList<InterpolationElement> _elements; | 9241 NodeList<InterpolationElement> _elements; |
| 9033 /** | 9242 /** |
| 9034 * Initialize a newly created string interpolation expression. | 9243 * Initialize a newly created string interpolation expression. |
| 9035 * @param elements the elements that will be composed to produce the resulting
string | 9244 * @param elements the elements that will be composed to produce the resulting
string |
| 9036 */ | 9245 */ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 9052 NodeList<InterpolationElement> get elements => _elements; | 9261 NodeList<InterpolationElement> get elements => _elements; |
| 9053 Token get endToken => _elements.endToken; | 9262 Token get endToken => _elements.endToken; |
| 9054 void visitChildren(ASTVisitor<Object> visitor) { | 9263 void visitChildren(ASTVisitor<Object> visitor) { |
| 9055 _elements.accept(visitor); | 9264 _elements.accept(visitor); |
| 9056 } | 9265 } |
| 9057 } | 9266 } |
| 9058 /** | 9267 /** |
| 9059 * Instances of the class {@code StringLiteral} represent a string literal expre
ssion. | 9268 * Instances of the class {@code StringLiteral} represent a string literal expre
ssion. |
| 9060 * <pre> | 9269 * <pre> |
| 9061 * stringLiteral ::={@link SimpleStringLiteral simpleStringLiteral}| {@link Adja
centStrings adjacentStrings}| {@link StringInterpolation stringInterpolation}</p
re> | 9270 * stringLiteral ::={@link SimpleStringLiteral simpleStringLiteral}| {@link Adja
centStrings adjacentStrings}| {@link StringInterpolation stringInterpolation}</p
re> |
| 9271 * @coverage dart.engine.ast |
| 9062 */ | 9272 */ |
| 9063 abstract class StringLiteral extends Literal { | 9273 abstract class StringLiteral extends Literal { |
| 9064 } | 9274 } |
| 9065 /** | 9275 /** |
| 9066 * Instances of the class {@code SuperConstructorInvocation} represent the invoc
ation of a | 9276 * Instances of the class {@code SuperConstructorInvocation} represent the invoc
ation of a |
| 9067 * superclass' constructor from within a constructor's initialization list. | 9277 * superclass' constructor from within a constructor's initialization list. |
| 9068 * <pre> | 9278 * <pre> |
| 9069 * superInvocation ::= | 9279 * superInvocation ::= |
| 9070 * 'super' ('.' {@link SimpleIdentifier name})? {@link ArgumentList argumentList
}</pre> | 9280 * 'super' ('.' {@link SimpleIdentifier name})? {@link ArgumentList argumentList
}</pre> |
| 9281 * @coverage dart.engine.ast |
| 9071 */ | 9282 */ |
| 9072 class SuperConstructorInvocation extends ConstructorInitializer { | 9283 class SuperConstructorInvocation extends ConstructorInitializer { |
| 9073 /** | 9284 /** |
| 9074 * The token for the 'super' keyword. | 9285 * The token for the 'super' keyword. |
| 9075 */ | 9286 */ |
| 9076 Token _keyword; | 9287 Token _keyword; |
| 9077 /** | 9288 /** |
| 9078 * The token for the period before the name of the constructor that is being i
nvoked, or{@code null} if the unnamed constructor is being invoked. | 9289 * The token for the period before the name of the constructor that is being i
nvoked, or{@code null} if the unnamed constructor is being invoked. |
| 9079 */ | 9290 */ |
| 9080 Token _period; | 9291 Token _period; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9163 * Set the element associated with the constructor to the given element. | 9374 * Set the element associated with the constructor to the given element. |
| 9164 * @param element the element associated with the constructor | 9375 * @param element the element associated with the constructor |
| 9165 */ | 9376 */ |
| 9166 void set element(ConstructorElement element17) { | 9377 void set element(ConstructorElement element17) { |
| 9167 this._element = element17; | 9378 this._element = element17; |
| 9168 } | 9379 } |
| 9169 /** | 9380 /** |
| 9170 * Set the token for the 'super' keyword to the given token. | 9381 * Set the token for the 'super' keyword to the given token. |
| 9171 * @param keyword the token for the 'super' keyword | 9382 * @param keyword the token for the 'super' keyword |
| 9172 */ | 9383 */ |
| 9173 void set keyword(Token keyword16) { | 9384 void set keyword(Token keyword17) { |
| 9174 this._keyword = keyword16; | 9385 this._keyword = keyword17; |
| 9175 } | 9386 } |
| 9176 /** | 9387 /** |
| 9177 * Set the token for the period before the name of the constructor that is bei
ng invoked to the | 9388 * Set the token for the period before the name of the constructor that is bei
ng invoked to the |
| 9178 * given token. | 9389 * given token. |
| 9179 * @param period the token for the period before the name of the constructor t
hat is being invoked | 9390 * @param period the token for the period before the name of the constructor t
hat is being invoked |
| 9180 */ | 9391 */ |
| 9181 void set period(Token period12) { | 9392 void set period(Token period12) { |
| 9182 this._period = period12; | 9393 this._period = period12; |
| 9183 } | 9394 } |
| 9184 void visitChildren(ASTVisitor<Object> visitor) { | 9395 void visitChildren(ASTVisitor<Object> visitor) { |
| 9185 safelyVisitChild(_constructorName, visitor); | 9396 safelyVisitChild(_constructorName, visitor); |
| 9186 safelyVisitChild(_argumentList, visitor); | 9397 safelyVisitChild(_argumentList, visitor); |
| 9187 } | 9398 } |
| 9188 } | 9399 } |
| 9189 /** | 9400 /** |
| 9190 * Instances of the class {@code SuperExpression} represent a super expression. | 9401 * Instances of the class {@code SuperExpression} represent a super expression. |
| 9191 * <pre> | 9402 * <pre> |
| 9192 * superExpression ::= | 9403 * superExpression ::= |
| 9193 * 'super' | 9404 * 'super' |
| 9194 * </pre> | 9405 * </pre> |
| 9406 * @coverage dart.engine.ast |
| 9195 */ | 9407 */ |
| 9196 class SuperExpression extends Expression { | 9408 class SuperExpression extends Expression { |
| 9197 /** | 9409 /** |
| 9198 * The token representing the keyword. | 9410 * The token representing the keyword. |
| 9199 */ | 9411 */ |
| 9200 Token _keyword; | 9412 Token _keyword; |
| 9201 /** | 9413 /** |
| 9202 * Initialize a newly created super expression. | 9414 * Initialize a newly created super expression. |
| 9203 * @param keyword the token representing the keyword | 9415 * @param keyword the token representing the keyword |
| 9204 */ | 9416 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 9215 Token get endToken => _keyword; | 9427 Token get endToken => _keyword; |
| 9216 /** | 9428 /** |
| 9217 * Return the token representing the keyword. | 9429 * Return the token representing the keyword. |
| 9218 * @return the token representing the keyword | 9430 * @return the token representing the keyword |
| 9219 */ | 9431 */ |
| 9220 Token get keyword => _keyword; | 9432 Token get keyword => _keyword; |
| 9221 /** | 9433 /** |
| 9222 * Set the token representing the keyword to the given token. | 9434 * Set the token representing the keyword to the given token. |
| 9223 * @param keyword the token representing the keyword | 9435 * @param keyword the token representing the keyword |
| 9224 */ | 9436 */ |
| 9225 void set keyword(Token keyword17) { | 9437 void set keyword(Token keyword18) { |
| 9226 this._keyword = keyword17; | 9438 this._keyword = keyword18; |
| 9227 } | 9439 } |
| 9228 void visitChildren(ASTVisitor<Object> visitor) { | 9440 void visitChildren(ASTVisitor<Object> visitor) { |
| 9229 } | 9441 } |
| 9230 } | 9442 } |
| 9231 /** | 9443 /** |
| 9232 * Instances of the class {@code SwitchCase} represent the case in a switch stat
ement. | 9444 * Instances of the class {@code SwitchCase} represent the case in a switch stat
ement. |
| 9233 * <pre> | 9445 * <pre> |
| 9234 * switchCase ::={@link SimpleIdentifier label}* 'case' {@link Expression expres
sion} ':' {@link Statement statement}</pre> | 9446 * switchCase ::={@link SimpleIdentifier label}* 'case' {@link Expression expres
sion} ':' {@link Statement statement}</pre> |
| 9447 * @coverage dart.engine.ast |
| 9235 */ | 9448 */ |
| 9236 class SwitchCase extends SwitchMember { | 9449 class SwitchCase extends SwitchMember { |
| 9237 /** | 9450 /** |
| 9238 * The expression controlling whether the statements will be executed. | 9451 * The expression controlling whether the statements will be executed. |
| 9239 */ | 9452 */ |
| 9240 Expression _expression; | 9453 Expression _expression; |
| 9241 /** | 9454 /** |
| 9242 * Initialize a newly created switch case. | 9455 * Initialize a newly created switch case. |
| 9243 * @param labels the labels associated with the switch member | 9456 * @param labels the labels associated with the switch member |
| 9244 * @param keyword the token representing the 'case' or 'default' keyword | 9457 * @param keyword the token representing the 'case' or 'default' keyword |
| (...skipping 29 matching lines...) Expand all Loading... |
| 9274 void visitChildren(ASTVisitor<Object> visitor) { | 9487 void visitChildren(ASTVisitor<Object> visitor) { |
| 9275 labels.accept(visitor); | 9488 labels.accept(visitor); |
| 9276 safelyVisitChild(_expression, visitor); | 9489 safelyVisitChild(_expression, visitor); |
| 9277 statements.accept(visitor); | 9490 statements.accept(visitor); |
| 9278 } | 9491 } |
| 9279 } | 9492 } |
| 9280 /** | 9493 /** |
| 9281 * Instances of the class {@code SwitchDefault} represent the default case in a
switch statement. | 9494 * Instances of the class {@code SwitchDefault} represent the default case in a
switch statement. |
| 9282 * <pre> | 9495 * <pre> |
| 9283 * switchDefault ::={@link SimpleIdentifier label}* 'default' ':' {@link Stateme
nt statement}</pre> | 9496 * switchDefault ::={@link SimpleIdentifier label}* 'default' ':' {@link Stateme
nt statement}</pre> |
| 9497 * @coverage dart.engine.ast |
| 9284 */ | 9498 */ |
| 9285 class SwitchDefault extends SwitchMember { | 9499 class SwitchDefault extends SwitchMember { |
| 9286 /** | 9500 /** |
| 9287 * Initialize a newly created switch default. | 9501 * Initialize a newly created switch default. |
| 9288 * @param labels the labels associated with the switch member | 9502 * @param labels the labels associated with the switch member |
| 9289 * @param keyword the token representing the 'case' or 'default' keyword | 9503 * @param keyword the token representing the 'case' or 'default' keyword |
| 9290 * @param colon the colon separating the keyword or the expression from the st
atements | 9504 * @param colon the colon separating the keyword or the expression from the st
atements |
| 9291 * @param statements the statements that will be executed if this switch membe
r is selected | 9505 * @param statements the statements that will be executed if this switch membe
r is selected |
| 9292 */ | 9506 */ |
| 9293 SwitchDefault.full(List<Label> labels, Token keyword, Token colon, List<Statem
ent> statements) : super.full(labels, keyword, colon, statements) { | 9507 SwitchDefault.full(List<Label> labels, Token keyword, Token colon, List<Statem
ent> statements) : super.full(labels, keyword, colon, statements) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 9307 } | 9521 } |
| 9308 } | 9522 } |
| 9309 /** | 9523 /** |
| 9310 * The abstract class {@code SwitchMember} defines the behavior common to object
s representing | 9524 * The abstract class {@code SwitchMember} defines the behavior common to object
s representing |
| 9311 * elements within a switch statement. | 9525 * elements within a switch statement. |
| 9312 * <pre> | 9526 * <pre> |
| 9313 * switchMember ::= | 9527 * switchMember ::= |
| 9314 * switchCase | 9528 * switchCase |
| 9315 * | switchDefault | 9529 * | switchDefault |
| 9316 * </pre> | 9530 * </pre> |
| 9531 * @coverage dart.engine.ast |
| 9317 */ | 9532 */ |
| 9318 abstract class SwitchMember extends ASTNode { | 9533 abstract class SwitchMember extends ASTNode { |
| 9319 /** | 9534 /** |
| 9320 * The labels associated with the switch member. | 9535 * The labels associated with the switch member. |
| 9321 */ | 9536 */ |
| 9322 NodeList<Label> _labels; | 9537 NodeList<Label> _labels; |
| 9323 /** | 9538 /** |
| 9324 * The token representing the 'case' or 'default' keyword. | 9539 * The token representing the 'case' or 'default' keyword. |
| 9325 */ | 9540 */ |
| 9326 Token _keyword; | 9541 Token _keyword; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9391 * Set the colon separating the keyword or the expression from the statements
to the given token. | 9606 * Set the colon separating the keyword or the expression from the statements
to the given token. |
| 9392 * @param colon the colon separating the keyword or the expression from the st
atements | 9607 * @param colon the colon separating the keyword or the expression from the st
atements |
| 9393 */ | 9608 */ |
| 9394 void set colon(Token colon4) { | 9609 void set colon(Token colon4) { |
| 9395 this._colon = colon4; | 9610 this._colon = colon4; |
| 9396 } | 9611 } |
| 9397 /** | 9612 /** |
| 9398 * Set the token representing the 'case' or 'default' keyword to the given tok
en. | 9613 * Set the token representing the 'case' or 'default' keyword to the given tok
en. |
| 9399 * @param keyword the token representing the 'case' or 'default' keyword | 9614 * @param keyword the token representing the 'case' or 'default' keyword |
| 9400 */ | 9615 */ |
| 9401 void set keyword(Token keyword18) { | 9616 void set keyword(Token keyword19) { |
| 9402 this._keyword = keyword18; | 9617 this._keyword = keyword19; |
| 9403 } | 9618 } |
| 9404 } | 9619 } |
| 9405 /** | 9620 /** |
| 9406 * Instances of the class {@code SwitchStatement} represent a switch statement. | 9621 * Instances of the class {@code SwitchStatement} represent a switch statement. |
| 9407 * <pre> | 9622 * <pre> |
| 9408 * switchStatement ::= | 9623 * switchStatement ::= |
| 9409 * 'switch' '(' {@link Expression expression} ')' '{' {@link SwitchCase switchCa
se}* {@link SwitchDefault defaultCase}? '}' | 9624 * 'switch' '(' {@link Expression expression} ')' '{' {@link SwitchCase switchCa
se}* {@link SwitchDefault defaultCase}? '}' |
| 9410 * </pre> | 9625 * </pre> |
| 9626 * @coverage dart.engine.ast |
| 9411 */ | 9627 */ |
| 9412 class SwitchStatement extends Statement { | 9628 class SwitchStatement extends Statement { |
| 9413 /** | 9629 /** |
| 9414 * The token representing the 'switch' keyword. | 9630 * The token representing the 'switch' keyword. |
| 9415 */ | 9631 */ |
| 9416 Token _keyword; | 9632 Token _keyword; |
| 9417 /** | 9633 /** |
| 9418 * The left parenthesis. | 9634 * The left parenthesis. |
| 9419 */ | 9635 */ |
| 9420 Token _leftParenthesis; | 9636 Token _leftParenthesis; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9512 * expression. | 9728 * expression. |
| 9513 * @param expression the expression used to determine which of the switch memb
ers will be selected | 9729 * @param expression the expression used to determine which of the switch memb
ers will be selected |
| 9514 */ | 9730 */ |
| 9515 void set expression(Expression expression12) { | 9731 void set expression(Expression expression12) { |
| 9516 this._expression = becomeParentOf(expression12); | 9732 this._expression = becomeParentOf(expression12); |
| 9517 } | 9733 } |
| 9518 /** | 9734 /** |
| 9519 * Set the token representing the 'switch' keyword to the given token. | 9735 * Set the token representing the 'switch' keyword to the given token. |
| 9520 * @param keyword the token representing the 'switch' keyword | 9736 * @param keyword the token representing the 'switch' keyword |
| 9521 */ | 9737 */ |
| 9522 void set keyword(Token keyword19) { | 9738 void set keyword(Token keyword20) { |
| 9523 this._keyword = keyword19; | 9739 this._keyword = keyword20; |
| 9524 } | 9740 } |
| 9525 /** | 9741 /** |
| 9526 * Set the left curly bracket to the given token. | 9742 * Set the left curly bracket to the given token. |
| 9527 * @param leftBracket the left curly bracket | 9743 * @param leftBracket the left curly bracket |
| 9528 */ | 9744 */ |
| 9529 void set leftBracket(Token leftBracket7) { | 9745 void set leftBracket(Token leftBracket7) { |
| 9530 this._leftBracket = leftBracket7; | 9746 this._leftBracket = leftBracket7; |
| 9531 } | 9747 } |
| 9532 /** | 9748 /** |
| 9533 * Set the left parenthesis to the given token. | 9749 * Set the left parenthesis to the given token. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 9554 safelyVisitChild(_expression, visitor); | 9770 safelyVisitChild(_expression, visitor); |
| 9555 _members.accept(visitor); | 9771 _members.accept(visitor); |
| 9556 } | 9772 } |
| 9557 } | 9773 } |
| 9558 /** | 9774 /** |
| 9559 * Instances of the class {@code ThisExpression} represent a this expression. | 9775 * Instances of the class {@code ThisExpression} represent a this expression. |
| 9560 * <pre> | 9776 * <pre> |
| 9561 * thisExpression ::= | 9777 * thisExpression ::= |
| 9562 * 'this' | 9778 * 'this' |
| 9563 * </pre> | 9779 * </pre> |
| 9780 * @coverage dart.engine.ast |
| 9564 */ | 9781 */ |
| 9565 class ThisExpression extends Expression { | 9782 class ThisExpression extends Expression { |
| 9566 /** | 9783 /** |
| 9567 * The token representing the keyword. | 9784 * The token representing the keyword. |
| 9568 */ | 9785 */ |
| 9569 Token _keyword; | 9786 Token _keyword; |
| 9570 /** | 9787 /** |
| 9571 * Initialize a newly created this expression. | 9788 * Initialize a newly created this expression. |
| 9572 * @param keyword the token representing the keyword | 9789 * @param keyword the token representing the keyword |
| 9573 */ | 9790 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 9584 Token get endToken => _keyword; | 9801 Token get endToken => _keyword; |
| 9585 /** | 9802 /** |
| 9586 * Return the token representing the keyword. | 9803 * Return the token representing the keyword. |
| 9587 * @return the token representing the keyword | 9804 * @return the token representing the keyword |
| 9588 */ | 9805 */ |
| 9589 Token get keyword => _keyword; | 9806 Token get keyword => _keyword; |
| 9590 /** | 9807 /** |
| 9591 * Set the token representing the keyword to the given token. | 9808 * Set the token representing the keyword to the given token. |
| 9592 * @param keyword the token representing the keyword | 9809 * @param keyword the token representing the keyword |
| 9593 */ | 9810 */ |
| 9594 void set keyword(Token keyword20) { | 9811 void set keyword(Token keyword21) { |
| 9595 this._keyword = keyword20; | 9812 this._keyword = keyword21; |
| 9596 } | 9813 } |
| 9597 void visitChildren(ASTVisitor<Object> visitor) { | 9814 void visitChildren(ASTVisitor<Object> visitor) { |
| 9598 } | 9815 } |
| 9599 } | 9816 } |
| 9600 /** | 9817 /** |
| 9601 * Instances of the class {@code ThrowExpression} represent a throw expression. | 9818 * Instances of the class {@code ThrowExpression} represent a throw expression. |
| 9602 * <pre> | 9819 * <pre> |
| 9603 * throwExpression ::= | 9820 * throwExpression ::= |
| 9604 * 'throw' {@link Expression expression}? ';' | 9821 * 'throw' {@link Expression expression}? ';' |
| 9605 * </pre> | 9822 * </pre> |
| 9823 * @coverage dart.engine.ast |
| 9606 */ | 9824 */ |
| 9607 class ThrowExpression extends Expression { | 9825 class ThrowExpression extends Expression { |
| 9608 /** | 9826 /** |
| 9609 * The token representing the 'throw' keyword. | 9827 * The token representing the 'throw' keyword. |
| 9610 */ | 9828 */ |
| 9611 Token _keyword; | 9829 Token _keyword; |
| 9612 /** | 9830 /** |
| 9613 * The expression computing the exception to be thrown, or {@code null} if the
current exception | 9831 * The expression computing the exception to be thrown, or {@code null} if the
current exception |
| 9614 * is to be re-thrown. (The latter case can only occur if the throw statement
is inside a catch | 9832 * is to be re-thrown. (The latter case can only occur if the throw statement
is inside a catch |
| 9615 * clause.) | 9833 * clause.) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9654 * Set the expression computing the exception to be thrown to the given expres
sion. | 9872 * Set the expression computing the exception to be thrown to the given expres
sion. |
| 9655 * @param expression the expression computing the exception to be thrown | 9873 * @param expression the expression computing the exception to be thrown |
| 9656 */ | 9874 */ |
| 9657 void set expression(Expression expression13) { | 9875 void set expression(Expression expression13) { |
| 9658 this._expression = becomeParentOf(expression13); | 9876 this._expression = becomeParentOf(expression13); |
| 9659 } | 9877 } |
| 9660 /** | 9878 /** |
| 9661 * Set the token representing the 'throw' keyword to the given token. | 9879 * Set the token representing the 'throw' keyword to the given token. |
| 9662 * @param keyword the token representing the 'throw' keyword | 9880 * @param keyword the token representing the 'throw' keyword |
| 9663 */ | 9881 */ |
| 9664 void set keyword(Token keyword21) { | 9882 void set keyword(Token keyword22) { |
| 9665 this._keyword = keyword21; | 9883 this._keyword = keyword22; |
| 9666 } | 9884 } |
| 9667 void visitChildren(ASTVisitor<Object> visitor) { | 9885 void visitChildren(ASTVisitor<Object> visitor) { |
| 9668 safelyVisitChild(_expression, visitor); | 9886 safelyVisitChild(_expression, visitor); |
| 9669 } | 9887 } |
| 9670 } | 9888 } |
| 9671 /** | 9889 /** |
| 9672 * Instances of the class {@code TopLevelVariableDeclaration} represent the decl
aration of one or | 9890 * Instances of the class {@code TopLevelVariableDeclaration} represent the decl
aration of one or |
| 9673 * more top-level variables of the same type. | 9891 * more top-level variables of the same type. |
| 9674 * <pre> | 9892 * <pre> |
| 9675 * topLevelVariableDeclaration ::= | 9893 * topLevelVariableDeclaration ::= |
| 9676 * ('final' | 'const') type? staticFinalDeclarationList ';' | 9894 * ('final' | 'const') type? staticFinalDeclarationList ';' |
| 9677 * | variableDeclaration ';' | 9895 * | variableDeclaration ';' |
| 9678 * </pre> | 9896 * </pre> |
| 9897 * @coverage dart.engine.ast |
| 9679 */ | 9898 */ |
| 9680 class TopLevelVariableDeclaration extends CompilationUnitMember { | 9899 class TopLevelVariableDeclaration extends CompilationUnitMember { |
| 9681 /** | 9900 /** |
| 9682 * The top-level variables being declared. | 9901 * The top-level variables being declared. |
| 9683 */ | 9902 */ |
| 9684 VariableDeclarationList _variableList; | 9903 VariableDeclarationList _variableList; |
| 9685 /** | 9904 /** |
| 9686 * The semicolon terminating the declaration. | 9905 * The semicolon terminating the declaration. |
| 9687 */ | 9906 */ |
| 9688 Token _semicolon; | 9907 Token _semicolon; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9738 } | 9957 } |
| 9739 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; | 9958 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; |
| 9740 } | 9959 } |
| 9741 /** | 9960 /** |
| 9742 * Instances of the class {@code TryStatement} represent a try statement. | 9961 * Instances of the class {@code TryStatement} represent a try statement. |
| 9743 * <pre> | 9962 * <pre> |
| 9744 * tryStatement ::= | 9963 * tryStatement ::= |
| 9745 * 'try' {@link Block block} ({@link CatchClause catchClause}+ finallyClause? |
finallyClause) | 9964 * 'try' {@link Block block} ({@link CatchClause catchClause}+ finallyClause? |
finallyClause) |
| 9746 * finallyClause ::= | 9965 * finallyClause ::= |
| 9747 * 'finally' {@link Block block}</pre> | 9966 * 'finally' {@link Block block}</pre> |
| 9967 * @coverage dart.engine.ast |
| 9748 */ | 9968 */ |
| 9749 class TryStatement extends Statement { | 9969 class TryStatement extends Statement { |
| 9750 /** | 9970 /** |
| 9751 * The token representing the 'try' keyword. | 9971 * The token representing the 'try' keyword. |
| 9752 */ | 9972 */ |
| 9753 Token _tryKeyword; | 9973 Token _tryKeyword; |
| 9754 /** | 9974 /** |
| 9755 * The body of the statement. | 9975 * The body of the statement. |
| 9756 */ | 9976 */ |
| 9757 Block _body; | 9977 Block _body; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9869 } | 10089 } |
| 9870 /** | 10090 /** |
| 9871 * The abstract class {@code TypeAlias} defines the behavior common to declarati
ons of type aliases. | 10091 * The abstract class {@code TypeAlias} defines the behavior common to declarati
ons of type aliases. |
| 9872 * <pre> | 10092 * <pre> |
| 9873 * typeAlias ::= | 10093 * typeAlias ::= |
| 9874 * 'typedef' typeAliasBody | 10094 * 'typedef' typeAliasBody |
| 9875 * typeAliasBody ::= | 10095 * typeAliasBody ::= |
| 9876 * classTypeAlias | 10096 * classTypeAlias |
| 9877 * | functionTypeAlias | 10097 * | functionTypeAlias |
| 9878 * </pre> | 10098 * </pre> |
| 10099 * @coverage dart.engine.ast |
| 9879 */ | 10100 */ |
| 9880 abstract class TypeAlias extends CompilationUnitMember { | 10101 abstract class TypeAlias extends CompilationUnitMember { |
| 9881 /** | 10102 /** |
| 9882 * The token representing the 'typedef' keyword. | 10103 * The token representing the 'typedef' keyword. |
| 9883 */ | 10104 */ |
| 9884 Token _keyword; | 10105 Token _keyword; |
| 9885 /** | 10106 /** |
| 9886 * The semicolon terminating the declaration. | 10107 * The semicolon terminating the declaration. |
| 9887 */ | 10108 */ |
| 9888 Token _semicolon; | 10109 Token _semicolon; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 9913 Token get keyword => _keyword; | 10134 Token get keyword => _keyword; |
| 9914 /** | 10135 /** |
| 9915 * Return the semicolon terminating the declaration. | 10136 * Return the semicolon terminating the declaration. |
| 9916 * @return the semicolon terminating the declaration | 10137 * @return the semicolon terminating the declaration |
| 9917 */ | 10138 */ |
| 9918 Token get semicolon => _semicolon; | 10139 Token get semicolon => _semicolon; |
| 9919 /** | 10140 /** |
| 9920 * Set the token representing the 'typedef' keyword to the given token. | 10141 * Set the token representing the 'typedef' keyword to the given token. |
| 9921 * @param keyword the token representing the 'typedef' keyword | 10142 * @param keyword the token representing the 'typedef' keyword |
| 9922 */ | 10143 */ |
| 9923 void set keyword(Token keyword22) { | 10144 void set keyword(Token keyword23) { |
| 9924 this._keyword = keyword22; | 10145 this._keyword = keyword23; |
| 9925 } | 10146 } |
| 9926 /** | 10147 /** |
| 9927 * Set the semicolon terminating the declaration to the given token. | 10148 * Set the semicolon terminating the declaration to the given token. |
| 9928 * @param semicolon the semicolon terminating the declaration | 10149 * @param semicolon the semicolon terminating the declaration |
| 9929 */ | 10150 */ |
| 9930 void set semicolon(Token semicolon17) { | 10151 void set semicolon(Token semicolon17) { |
| 9931 this._semicolon = semicolon17; | 10152 this._semicolon = semicolon17; |
| 9932 } | 10153 } |
| 9933 Token get firstTokenAfterCommentAndMetadata => _keyword; | 10154 Token get firstTokenAfterCommentAndMetadata => _keyword; |
| 9934 } | 10155 } |
| 9935 /** | 10156 /** |
| 9936 * Instances of the class {@code TypeArgumentList} represent a list of type argu
ments. | 10157 * Instances of the class {@code TypeArgumentList} represent a list of type argu
ments. |
| 9937 * <pre> | 10158 * <pre> |
| 9938 * typeArguments ::= | 10159 * typeArguments ::= |
| 9939 * '<' typeName (',' typeName)* '>' | 10160 * '<' typeName (',' typeName)* '>' |
| 9940 * </pre> | 10161 * </pre> |
| 10162 * @coverage dart.engine.ast |
| 9941 */ | 10163 */ |
| 9942 class TypeArgumentList extends ASTNode { | 10164 class TypeArgumentList extends ASTNode { |
| 9943 /** | 10165 /** |
| 9944 * The left bracket. | 10166 * The left bracket. |
| 9945 */ | 10167 */ |
| 9946 Token _leftBracket; | 10168 Token _leftBracket; |
| 9947 /** | 10169 /** |
| 9948 * The type arguments associated with the type. | 10170 * The type arguments associated with the type. |
| 9949 */ | 10171 */ |
| 9950 NodeList<TypeName> _arguments; | 10172 NodeList<TypeName> _arguments; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10006 void visitChildren(ASTVisitor<Object> visitor) { | 10228 void visitChildren(ASTVisitor<Object> visitor) { |
| 10007 _arguments.accept(visitor); | 10229 _arguments.accept(visitor); |
| 10008 } | 10230 } |
| 10009 } | 10231 } |
| 10010 /** | 10232 /** |
| 10011 * Instances of the class {@code TypeName} represent the name of a type, which c
an optionally | 10233 * Instances of the class {@code TypeName} represent the name of a type, which c
an optionally |
| 10012 * include type arguments. | 10234 * include type arguments. |
| 10013 * <pre> | 10235 * <pre> |
| 10014 * typeName ::={@link Identifier identifier} typeArguments? | 10236 * typeName ::={@link Identifier identifier} typeArguments? |
| 10015 * </pre> | 10237 * </pre> |
| 10238 * @coverage dart.engine.ast |
| 10016 */ | 10239 */ |
| 10017 class TypeName extends ASTNode { | 10240 class TypeName extends ASTNode { |
| 10018 /** | 10241 /** |
| 10019 * The name of the type. | 10242 * The name of the type. |
| 10020 */ | 10243 */ |
| 10021 Identifier _name; | 10244 Identifier _name; |
| 10022 /** | 10245 /** |
| 10023 * The type arguments associated with the type, or {@code null} if there are n
o type arguments. | 10246 * The type arguments associated with the type, or {@code null} if there are n
o type arguments. |
| 10024 */ | 10247 */ |
| 10025 TypeArgumentList _typeArguments; | 10248 TypeArgumentList _typeArguments; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10093 void visitChildren(ASTVisitor<Object> visitor) { | 10316 void visitChildren(ASTVisitor<Object> visitor) { |
| 10094 safelyVisitChild(_name, visitor); | 10317 safelyVisitChild(_name, visitor); |
| 10095 safelyVisitChild(_typeArguments, visitor); | 10318 safelyVisitChild(_typeArguments, visitor); |
| 10096 } | 10319 } |
| 10097 } | 10320 } |
| 10098 /** | 10321 /** |
| 10099 * Instances of the class {@code TypeParameter} represent a type parameter. | 10322 * Instances of the class {@code TypeParameter} represent a type parameter. |
| 10100 * <pre> | 10323 * <pre> |
| 10101 * typeParameter ::={@link SimpleIdentifier name} ('extends' {@link TypeName bou
nd})? | 10324 * typeParameter ::={@link SimpleIdentifier name} ('extends' {@link TypeName bou
nd})? |
| 10102 * </pre> | 10325 * </pre> |
| 10326 * @coverage dart.engine.ast |
| 10103 */ | 10327 */ |
| 10104 class TypeParameter extends Declaration { | 10328 class TypeParameter extends Declaration { |
| 10105 /** | 10329 /** |
| 10106 * The name of the type parameter. | 10330 * The name of the type parameter. |
| 10107 */ | 10331 */ |
| 10108 SimpleIdentifier _name; | 10332 SimpleIdentifier _name; |
| 10109 /** | 10333 /** |
| 10110 * The token representing the 'extends' keyword, or {@code null} if there was
no explicit upper | 10334 * The token representing the 'extends' keyword, or {@code null} if there was
no explicit upper |
| 10111 * bound. | 10335 * bound. |
| 10112 */ | 10336 */ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10166 * Set the name of the upper bound for legal arguments to the given type name. | 10390 * Set the name of the upper bound for legal arguments to the given type name. |
| 10167 * @param typeName the name of the upper bound for legal arguments | 10391 * @param typeName the name of the upper bound for legal arguments |
| 10168 */ | 10392 */ |
| 10169 void set bound(TypeName typeName) { | 10393 void set bound(TypeName typeName) { |
| 10170 _bound = becomeParentOf(typeName); | 10394 _bound = becomeParentOf(typeName); |
| 10171 } | 10395 } |
| 10172 /** | 10396 /** |
| 10173 * Set the token representing the 'assert' keyword to the given token. | 10397 * Set the token representing the 'assert' keyword to the given token. |
| 10174 * @param keyword the token representing the 'assert' keyword | 10398 * @param keyword the token representing the 'assert' keyword |
| 10175 */ | 10399 */ |
| 10176 void set keyword(Token keyword23) { | 10400 void set keyword(Token keyword24) { |
| 10177 this._keyword = keyword23; | 10401 this._keyword = keyword24; |
| 10178 } | 10402 } |
| 10179 /** | 10403 /** |
| 10180 * Set the name of the type parameter to the given identifier. | 10404 * Set the name of the type parameter to the given identifier. |
| 10181 * @param identifier the name of the type parameter | 10405 * @param identifier the name of the type parameter |
| 10182 */ | 10406 */ |
| 10183 void set name(SimpleIdentifier identifier) { | 10407 void set name(SimpleIdentifier identifier) { |
| 10184 _name = becomeParentOf(identifier); | 10408 _name = becomeParentOf(identifier); |
| 10185 } | 10409 } |
| 10186 void visitChildren(ASTVisitor<Object> visitor) { | 10410 void visitChildren(ASTVisitor<Object> visitor) { |
| 10187 super.visitChildren(visitor); | 10411 super.visitChildren(visitor); |
| 10188 safelyVisitChild(_name, visitor); | 10412 safelyVisitChild(_name, visitor); |
| 10189 safelyVisitChild(_bound, visitor); | 10413 safelyVisitChild(_bound, visitor); |
| 10190 } | 10414 } |
| 10191 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; | 10415 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; |
| 10192 } | 10416 } |
| 10193 /** | 10417 /** |
| 10194 * Instances of the class {@code TypeParameterList} represent type parameters wi
thin a declaration. | 10418 * Instances of the class {@code TypeParameterList} represent type parameters wi
thin a declaration. |
| 10195 * <pre> | 10419 * <pre> |
| 10196 * typeParameterList ::= | 10420 * typeParameterList ::= |
| 10197 * '<' {@link TypeParameter typeParameter} (',' {@link TypeParameter typeParamet
er})* '>' | 10421 * '<' {@link TypeParameter typeParameter} (',' {@link TypeParameter typeParamet
er})* '>' |
| 10198 * </pre> | 10422 * </pre> |
| 10423 * @coverage dart.engine.ast |
| 10199 */ | 10424 */ |
| 10200 class TypeParameterList extends ASTNode { | 10425 class TypeParameterList extends ASTNode { |
| 10201 /** | 10426 /** |
| 10202 * The left angle bracket. | 10427 * The left angle bracket. |
| 10203 */ | 10428 */ |
| 10204 Token _leftBracket; | 10429 Token _leftBracket; |
| 10205 /** | 10430 /** |
| 10206 * The type parameters in the list. | 10431 * The type parameters in the list. |
| 10207 */ | 10432 */ |
| 10208 NodeList<TypeParameter> _typeParameters; | 10433 NodeList<TypeParameter> _typeParameters; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10249 NodeList<TypeParameter> get typeParameters => _typeParameters; | 10474 NodeList<TypeParameter> get typeParameters => _typeParameters; |
| 10250 void visitChildren(ASTVisitor<Object> visitor) { | 10475 void visitChildren(ASTVisitor<Object> visitor) { |
| 10251 _typeParameters.accept(visitor); | 10476 _typeParameters.accept(visitor); |
| 10252 } | 10477 } |
| 10253 } | 10478 } |
| 10254 /** | 10479 /** |
| 10255 * The abstract class {@code TypedLiteral} defines the behavior common to litera
ls that have a type | 10480 * The abstract class {@code TypedLiteral} defines the behavior common to litera
ls that have a type |
| 10256 * associated with them. | 10481 * associated with them. |
| 10257 * <pre> | 10482 * <pre> |
| 10258 * listLiteral ::={@link ListLiteral listLiteral}| {@link MapLiteral mapLiteral}
</pre> | 10483 * listLiteral ::={@link ListLiteral listLiteral}| {@link MapLiteral mapLiteral}
</pre> |
| 10484 * @coverage dart.engine.ast |
| 10259 */ | 10485 */ |
| 10260 abstract class TypedLiteral extends Literal { | 10486 abstract class TypedLiteral extends Literal { |
| 10261 /** | 10487 /** |
| 10262 * The const modifier associated with this literal, or {@code null} if the lit
eral is not a | 10488 * The const modifier associated with this literal, or {@code null} if the lit
eral is not a |
| 10263 * constant. | 10489 * constant. |
| 10264 */ | 10490 */ |
| 10265 Token _modifier; | 10491 Token _modifier; |
| 10266 /** | 10492 /** |
| 10267 * The type argument associated with this literal, or {@code null} if no type
arguments were | 10493 * The type argument associated with this literal, or {@code null} if no type
arguments were |
| 10268 * declared. | 10494 * declared. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10312 } | 10538 } |
| 10313 void visitChildren(ASTVisitor<Object> visitor) { | 10539 void visitChildren(ASTVisitor<Object> visitor) { |
| 10314 safelyVisitChild(_typeArguments, visitor); | 10540 safelyVisitChild(_typeArguments, visitor); |
| 10315 } | 10541 } |
| 10316 } | 10542 } |
| 10317 /** | 10543 /** |
| 10318 * The abstract class {@code UriBasedDirective} defines the behavior common to n
odes that represent | 10544 * The abstract class {@code UriBasedDirective} defines the behavior common to n
odes that represent |
| 10319 * a directive that references a URI. | 10545 * a directive that references a URI. |
| 10320 * <pre> | 10546 * <pre> |
| 10321 * uriBasedDirective ::={@link ExportDirective exportDirective}| {@link ImportDi
rective importDirective}| {@link PartDirective partDirective}</pre> | 10547 * uriBasedDirective ::={@link ExportDirective exportDirective}| {@link ImportDi
rective importDirective}| {@link PartDirective partDirective}</pre> |
| 10548 * @coverage dart.engine.ast |
| 10322 */ | 10549 */ |
| 10323 abstract class UriBasedDirective extends Directive { | 10550 abstract class UriBasedDirective extends Directive { |
| 10324 /** | 10551 /** |
| 10325 * The URI referenced by this directive. | 10552 * The URI referenced by this directive. |
| 10326 */ | 10553 */ |
| 10327 StringLiteral _uri; | 10554 StringLiteral _uri; |
| 10328 /** | 10555 /** |
| 10329 * Initialize a newly create URI-based directive. | 10556 * Initialize a newly create URI-based directive. |
| 10330 * @param comment the documentation comment associated with this directive | 10557 * @param comment the documentation comment associated with this directive |
| 10331 * @param metadata the annotations associated with the directive | 10558 * @param metadata the annotations associated with the directive |
| (...skipping 25 matching lines...) Expand all Loading... |
| 10357 super.visitChildren(visitor); | 10584 super.visitChildren(visitor); |
| 10358 safelyVisitChild(_uri, visitor); | 10585 safelyVisitChild(_uri, visitor); |
| 10359 } | 10586 } |
| 10360 } | 10587 } |
| 10361 /** | 10588 /** |
| 10362 * Instances of the class {@code VariableDeclaration} represent an identifier th
at has an initial | 10589 * Instances of the class {@code VariableDeclaration} represent an identifier th
at has an initial |
| 10363 * value associated with it. Instances of this class are always children of the
class{@link VariableDeclarationList}. | 10590 * value associated with it. Instances of this class are always children of the
class{@link VariableDeclarationList}. |
| 10364 * <pre> | 10591 * <pre> |
| 10365 * variableDeclaration ::={@link SimpleIdentifier identifier} ('=' {@link Expres
sion initialValue})? | 10592 * variableDeclaration ::={@link SimpleIdentifier identifier} ('=' {@link Expres
sion initialValue})? |
| 10366 * </pre> | 10593 * </pre> |
| 10594 * @coverage dart.engine.ast |
| 10367 */ | 10595 */ |
| 10368 class VariableDeclaration extends Declaration { | 10596 class VariableDeclaration extends Declaration { |
| 10369 /** | 10597 /** |
| 10370 * The name of the variable being declared. | 10598 * The name of the variable being declared. |
| 10371 */ | 10599 */ |
| 10372 SimpleIdentifier _name; | 10600 SimpleIdentifier _name; |
| 10373 /** | 10601 /** |
| 10374 * The equal sign separating the variable name from the initial value, or {@co
de null} if the | 10602 * The equal sign separating the variable name from the initial value, or {@co
de null} if the |
| 10375 * initial value was not specified. | 10603 * initial value was not specified. |
| 10376 */ | 10604 */ |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10421 * the initial value was not specified. | 10649 * the initial value was not specified. |
| 10422 * @return the expression used to compute the initial value for the variable | 10650 * @return the expression used to compute the initial value for the variable |
| 10423 */ | 10651 */ |
| 10424 Expression get initializer => _initializer; | 10652 Expression get initializer => _initializer; |
| 10425 /** | 10653 /** |
| 10426 * Return the name of the variable being declared. | 10654 * Return the name of the variable being declared. |
| 10427 * @return the name of the variable being declared | 10655 * @return the name of the variable being declared |
| 10428 */ | 10656 */ |
| 10429 SimpleIdentifier get name => _name; | 10657 SimpleIdentifier get name => _name; |
| 10430 /** | 10658 /** |
| 10431 * Return {@code true} if this variable declaration is declared to be a const
variable. | 10659 * Return {@code true} if this variable was declared with the 'const' modifier
. |
| 10432 * @return {@code true} if this variable is declared to be a const variable | 10660 * @return {@code true} if this variable was declared with the 'const' modifie
r |
| 10433 */ | 10661 */ |
| 10434 bool isConst() { | 10662 bool isConst() { |
| 10435 ASTNode parent10 = parent; | 10663 ASTNode parent10 = parent; |
| 10436 return parent10 is VariableDeclarationList && ((parent10 as VariableDeclarat
ionList)).isConst(); | 10664 return parent10 is VariableDeclarationList && ((parent10 as VariableDeclarat
ionList)).isConst(); |
| 10437 } | 10665 } |
| 10438 /** | 10666 /** |
| 10439 * Return {@code true} if this variable declaration is declared to be a final
variable. | 10667 * Return {@code true} if this variable was declared with the 'final' modifier
. Variables that are |
| 10440 * @return {@code true} if this variable is declared to be a final variable | 10668 * declared with the 'const' modifier will return {@code false} even though th
ey are implicitly |
| 10669 * final. |
| 10670 * @return {@code true} if this variable was declared with the 'final' modifie
r |
| 10441 */ | 10671 */ |
| 10442 bool isFinal() { | 10672 bool isFinal() { |
| 10443 ASTNode parent11 = parent; | 10673 ASTNode parent11 = parent; |
| 10444 return parent11 is VariableDeclarationList && ((parent11 as VariableDeclarat
ionList)).isFinal(); | 10674 return parent11 is VariableDeclarationList && ((parent11 as VariableDeclarat
ionList)).isFinal(); |
| 10445 } | 10675 } |
| 10446 /** | 10676 /** |
| 10447 * Set the equal sign separating the variable name from the initial value to t
he given token. | 10677 * Set the equal sign separating the variable name from the initial value to t
he given token. |
| 10448 * @param equals the equal sign separating the variable name from the initial
value | 10678 * @param equals the equal sign separating the variable name from the initial
value |
| 10449 */ | 10679 */ |
| 10450 void set equals(Token equals6) { | 10680 void set equals(Token equals6) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 10475 * Instances of the class {@code VariableDeclarationList} represent the declarat
ion of one or more | 10705 * Instances of the class {@code VariableDeclarationList} represent the declarat
ion of one or more |
| 10476 * variables of the same type. | 10706 * variables of the same type. |
| 10477 * <pre> | 10707 * <pre> |
| 10478 * variableDeclarationList ::= | 10708 * variableDeclarationList ::= |
| 10479 * finalConstVarOrType {@link VariableDeclaration variableDeclaration} (',' {@li
nk VariableDeclaration variableDeclaration}) | 10709 * finalConstVarOrType {@link VariableDeclaration variableDeclaration} (',' {@li
nk VariableDeclaration variableDeclaration}) |
| 10480 * finalConstVarOrType ::= | 10710 * finalConstVarOrType ::= |
| 10481 * | 'final' {@link TypeName type}? | 10711 * | 'final' {@link TypeName type}? |
| 10482 * | 'const' {@link TypeName type}? | 10712 * | 'const' {@link TypeName type}? |
| 10483 * | 'var' | 10713 * | 'var' |
| 10484 * | {@link TypeName type}</pre> | 10714 * | {@link TypeName type}</pre> |
| 10715 * @coverage dart.engine.ast |
| 10485 */ | 10716 */ |
| 10486 class VariableDeclarationList extends ASTNode { | 10717 class VariableDeclarationList extends ASTNode { |
| 10487 /** | 10718 /** |
| 10488 * The token representing the 'final', 'const' or 'var' keyword, or {@code nul
l} if no keyword was | 10719 * The token representing the 'final', 'const' or 'var' keyword, or {@code nul
l} if no keyword was |
| 10489 * included. | 10720 * included. |
| 10490 */ | 10721 */ |
| 10491 Token _keyword; | 10722 Token _keyword; |
| 10492 /** | 10723 /** |
| 10493 * The type of the variables being declared, or {@code null} if no type was pr
ovided. | 10724 * The type of the variables being declared, or {@code null} if no type was pr
ovided. |
| 10494 */ | 10725 */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10536 * Return the type of the variables being declared, or {@code null} if no type
was provided. | 10767 * Return the type of the variables being declared, or {@code null} if no type
was provided. |
| 10537 * @return the type of the variables being declared | 10768 * @return the type of the variables being declared |
| 10538 */ | 10769 */ |
| 10539 TypeName get type => _type; | 10770 TypeName get type => _type; |
| 10540 /** | 10771 /** |
| 10541 * Return a list containing the individual variables being declared. | 10772 * Return a list containing the individual variables being declared. |
| 10542 * @return a list containing the individual variables being declared | 10773 * @return a list containing the individual variables being declared |
| 10543 */ | 10774 */ |
| 10544 NodeList<VariableDeclaration> get variables => _variables; | 10775 NodeList<VariableDeclaration> get variables => _variables; |
| 10545 /** | 10776 /** |
| 10546 * Return {@code true} if the variable declarations in this list are declared
to be const | 10777 * Return {@code true} if the variables in this list were declared with the 'c
onst' modifier. |
| 10547 * variables. | 10778 * @return {@code true} if the variables in this list were declared with the '
const' modifier |
| 10548 * @return {@code true} if the variables in this list are declared to be const
variables | |
| 10549 */ | 10779 */ |
| 10550 bool isConst() => _keyword is KeywordToken && identical(((_keyword as KeywordT
oken)).keyword, Keyword.CONST); | 10780 bool isConst() => _keyword is KeywordToken && identical(((_keyword as KeywordT
oken)).keyword, Keyword.CONST); |
| 10551 /** | 10781 /** |
| 10552 * Return {@code true} if the variable declarations in this list are declared
to be final | 10782 * Return {@code true} if the variables in this list were declared with the 'f
inal' modifier. |
| 10553 * variables. | 10783 * Variables that are declared with the 'const' modifier will return {@code fa
lse} even though |
| 10554 * @return {@code true} if the variables in this list are declared to be final
variables | 10784 * they are implicitly final. |
| 10785 * @return {@code true} if the variables in this list were declared with the '
final' modifier |
| 10555 */ | 10786 */ |
| 10556 bool isFinal() => _keyword is KeywordToken && identical(((_keyword as KeywordT
oken)).keyword, Keyword.FINAL); | 10787 bool isFinal() => _keyword is KeywordToken && identical(((_keyword as KeywordT
oken)).keyword, Keyword.FINAL); |
| 10557 /** | 10788 /** |
| 10558 * Set the token representing the 'final', 'const' or 'var' keyword to the giv
en token. | 10789 * Set the token representing the 'final', 'const' or 'var' keyword to the giv
en token. |
| 10559 * @param keyword the token representing the 'final', 'const' or 'var' keyword | 10790 * @param keyword the token representing the 'final', 'const' or 'var' keyword |
| 10560 */ | 10791 */ |
| 10561 void set keyword(Token keyword24) { | 10792 void set keyword(Token keyword25) { |
| 10562 this._keyword = keyword24; | 10793 this._keyword = keyword25; |
| 10563 } | 10794 } |
| 10564 /** | 10795 /** |
| 10565 * Set the type of the variables being declared to the given type name. | 10796 * Set the type of the variables being declared to the given type name. |
| 10566 * @param typeName the type of the variables being declared | 10797 * @param typeName the type of the variables being declared |
| 10567 */ | 10798 */ |
| 10568 void set type(TypeName typeName) { | 10799 void set type(TypeName typeName) { |
| 10569 _type = becomeParentOf(typeName); | 10800 _type = becomeParentOf(typeName); |
| 10570 } | 10801 } |
| 10571 void visitChildren(ASTVisitor<Object> visitor) { | 10802 void visitChildren(ASTVisitor<Object> visitor) { |
| 10572 safelyVisitChild(_type, visitor); | 10803 safelyVisitChild(_type, visitor); |
| 10573 _variables.accept(visitor); | 10804 _variables.accept(visitor); |
| 10574 } | 10805 } |
| 10575 } | 10806 } |
| 10576 /** | 10807 /** |
| 10577 * Instances of the class {@code VariableDeclarationStatement} represent a list
of variables that | 10808 * Instances of the class {@code VariableDeclarationStatement} represent a list
of variables that |
| 10578 * are being declared in a context where a statement is required. | 10809 * are being declared in a context where a statement is required. |
| 10579 * <pre> | 10810 * <pre> |
| 10580 * variableDeclarationStatement ::={@link VariableDeclarationList variableList}
';' | 10811 * variableDeclarationStatement ::={@link VariableDeclarationList variableList}
';' |
| 10581 * </pre> | 10812 * </pre> |
| 10813 * @coverage dart.engine.ast |
| 10582 */ | 10814 */ |
| 10583 class VariableDeclarationStatement extends Statement { | 10815 class VariableDeclarationStatement extends Statement { |
| 10584 /** | 10816 /** |
| 10585 * The variables being declared. | 10817 * The variables being declared. |
| 10586 */ | 10818 */ |
| 10587 VariableDeclarationList _variableList; | 10819 VariableDeclarationList _variableList; |
| 10588 /** | 10820 /** |
| 10589 * The semicolon terminating the statement. | 10821 * The semicolon terminating the statement. |
| 10590 */ | 10822 */ |
| 10591 Token _semicolon; | 10823 Token _semicolon; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10633 } | 10865 } |
| 10634 void visitChildren(ASTVisitor<Object> visitor) { | 10866 void visitChildren(ASTVisitor<Object> visitor) { |
| 10635 safelyVisitChild(_variableList, visitor); | 10867 safelyVisitChild(_variableList, visitor); |
| 10636 } | 10868 } |
| 10637 } | 10869 } |
| 10638 /** | 10870 /** |
| 10639 * Instances of the class {@code WhileStatement} represent a while statement. | 10871 * Instances of the class {@code WhileStatement} represent a while statement. |
| 10640 * <pre> | 10872 * <pre> |
| 10641 * whileStatement ::= | 10873 * whileStatement ::= |
| 10642 * 'while' '(' {@link Expression condition} ')' {@link Statement body}</pre> | 10874 * 'while' '(' {@link Expression condition} ')' {@link Statement body}</pre> |
| 10875 * @coverage dart.engine.ast |
| 10643 */ | 10876 */ |
| 10644 class WhileStatement extends Statement { | 10877 class WhileStatement extends Statement { |
| 10645 /** | 10878 /** |
| 10646 * The token representing the 'while' keyword. | 10879 * The token representing the 'while' keyword. |
| 10647 */ | 10880 */ |
| 10648 Token _keyword; | 10881 Token _keyword; |
| 10649 /** | 10882 /** |
| 10650 * The left parenthesis. | 10883 * The left parenthesis. |
| 10651 */ | 10884 */ |
| 10652 Token _leftParenthesis; | 10885 Token _leftParenthesis; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10726 * expression. | 10959 * expression. |
| 10727 * @param expression the expression used to determine whether to execute the b
ody of the loop | 10960 * @param expression the expression used to determine whether to execute the b
ody of the loop |
| 10728 */ | 10961 */ |
| 10729 void set condition(Expression expression) { | 10962 void set condition(Expression expression) { |
| 10730 _condition = becomeParentOf(expression); | 10963 _condition = becomeParentOf(expression); |
| 10731 } | 10964 } |
| 10732 /** | 10965 /** |
| 10733 * Set the token representing the 'while' keyword to the given token. | 10966 * Set the token representing the 'while' keyword to the given token. |
| 10734 * @param keyword the token representing the 'while' keyword | 10967 * @param keyword the token representing the 'while' keyword |
| 10735 */ | 10968 */ |
| 10736 void set keyword(Token keyword25) { | 10969 void set keyword(Token keyword26) { |
| 10737 this._keyword = keyword25; | 10970 this._keyword = keyword26; |
| 10738 } | 10971 } |
| 10739 /** | 10972 /** |
| 10740 * Set the left parenthesis to the given token. | 10973 * Set the left parenthesis to the given token. |
| 10741 * @param leftParenthesis the left parenthesis | 10974 * @param leftParenthesis the left parenthesis |
| 10742 */ | 10975 */ |
| 10743 void set leftParenthesis(Token leftParenthesis7) { | 10976 void set leftParenthesis(Token leftParenthesis7) { |
| 10744 this._leftParenthesis = leftParenthesis7; | 10977 this._leftParenthesis = leftParenthesis7; |
| 10745 } | 10978 } |
| 10746 /** | 10979 /** |
| 10747 * Set the right parenthesis to the given token. | 10980 * Set the right parenthesis to the given token. |
| 10748 * @param rightParenthesis the right parenthesis | 10981 * @param rightParenthesis the right parenthesis |
| 10749 */ | 10982 */ |
| 10750 void set rightParenthesis(Token rightParenthesis7) { | 10983 void set rightParenthesis(Token rightParenthesis7) { |
| 10751 this._rightParenthesis = rightParenthesis7; | 10984 this._rightParenthesis = rightParenthesis7; |
| 10752 } | 10985 } |
| 10753 void visitChildren(ASTVisitor<Object> visitor) { | 10986 void visitChildren(ASTVisitor<Object> visitor) { |
| 10754 safelyVisitChild(_condition, visitor); | 10987 safelyVisitChild(_condition, visitor); |
| 10755 safelyVisitChild(_body, visitor); | 10988 safelyVisitChild(_body, visitor); |
| 10756 } | 10989 } |
| 10757 } | 10990 } |
| 10758 /** | 10991 /** |
| 10759 * Instances of the class {@code WithClause} represent the with clause in a clas
s declaration. | 10992 * Instances of the class {@code WithClause} represent the with clause in a clas
s declaration. |
| 10760 * <pre> | 10993 * <pre> |
| 10761 * withClause ::= | 10994 * withClause ::= |
| 10762 * 'with' {@link TypeName mixin} (',' {@link TypeName mixin}) | 10995 * 'with' {@link TypeName mixin} (',' {@link TypeName mixin}) |
| 10763 * </pre> | 10996 * </pre> |
| 10997 * @coverage dart.engine.ast |
| 10764 */ | 10998 */ |
| 10765 class WithClause extends ASTNode { | 10999 class WithClause extends ASTNode { |
| 10766 /** | 11000 /** |
| 10767 * The token representing the 'with' keyword. | 11001 * The token representing the 'with' keyword. |
| 10768 */ | 11002 */ |
| 10769 Token _withKeyword; | 11003 Token _withKeyword; |
| 10770 /** | 11004 /** |
| 10771 * The names of the mixins that were specified. | 11005 * The names of the mixins that were specified. |
| 10772 */ | 11006 */ |
| 10773 NodeList<TypeName> _mixinTypes; | 11007 NodeList<TypeName> _mixinTypes; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10834 * to {@code null}.</li> | 11068 * to {@code null}.</li> |
| 10835 * <li>An expression of one of the forms {@code ~e}, {@code e1 ^ e2}, {@code e1
& e2},{@code e1 | e2}, {@code e1 >> e2} or {@code e1 << e2}, where {@code e}, {@
code e1} and {@code e2}are constant expressions that evaluate to an integer valu
e or to {@code null}.</li> | 11069 * <li>An expression of one of the forms {@code ~e}, {@code e1 ^ e2}, {@code e1
& e2},{@code e1 | e2}, {@code e1 >> e2} or {@code e1 << e2}, where {@code e}, {@
code e1} and {@code e2}are constant expressions that evaluate to an integer valu
e or to {@code null}.</li> |
| 10836 * <li>An expression of one of the forms {@code -e}, {@code e1 + e2}, {@code e1
- e2},{@code e1 * e2}, {@code e1 / e2}, {@code e1 ~/ e2}, {@code e1 > e2}, {@cod
e e1 < e2},{@code e1 >= e2}, {@code e1 <= e2} or {@code e1 % e2}, where {@code e
}, {@code e1} and {@code e2}are constant expressions that evaluate to a numeric
value or to {@code null}.</li> | 11070 * <li>An expression of one of the forms {@code -e}, {@code e1 + e2}, {@code e1
- e2},{@code e1 * e2}, {@code e1 / e2}, {@code e1 ~/ e2}, {@code e1 > e2}, {@cod
e e1 < e2},{@code e1 >= e2}, {@code e1 <= e2} or {@code e1 % e2}, where {@code e
}, {@code e1} and {@code e2}are constant expressions that evaluate to a numeric
value or to {@code null}.</li> |
| 10837 * </ul> | 11071 * </ul> |
| 10838 * </blockquote> The values returned by instances of this class are therefore {@
code null} and | 11072 * </blockquote> The values returned by instances of this class are therefore {@
code null} and |
| 10839 * instances of the classes {@code Boolean}, {@code BigInteger}, {@code Double},
{@code String}, and{@code DartObject}. | 11073 * instances of the classes {@code Boolean}, {@code BigInteger}, {@code Double},
{@code String}, and{@code DartObject}. |
| 10840 * <p> | 11074 * <p> |
| 10841 * In addition, this class defines several values that can be returned to indica
te various | 11075 * In addition, this class defines several values that can be returned to indica
te various |
| 10842 * conditions encountered during evaluation. These are documented with the stati
c field that define | 11076 * conditions encountered during evaluation. These are documented with the stati
c field that define |
| 10843 * those values. | 11077 * those values. |
| 11078 * @coverage dart.engine.ast |
| 10844 */ | 11079 */ |
| 10845 class ConstantEvaluator extends GeneralizingASTVisitor<Object> { | 11080 class ConstantEvaluator extends GeneralizingASTVisitor<Object> { |
| 10846 /** | 11081 /** |
| 10847 * The value returned for expressions (or non-expression nodes) that are not c
ompile-time constant | 11082 * The value returned for expressions (or non-expression nodes) that are not c
ompile-time constant |
| 10848 * expressions. | 11083 * expressions. |
| 10849 */ | 11084 */ |
| 10850 static Object NOT_A_CONSTANT = new Object(); | 11085 static Object NOT_A_CONSTANT = new Object(); |
| 11086 /** |
| 11087 * The error reporter by which errors will be reported. |
| 11088 */ |
| 11089 ErrorReporter _errorReporter; |
| 11090 /** |
| 11091 * Initialize a newly created constant evaluator. |
| 11092 * @param errorReporter the error reporter by which errors will be reported |
| 11093 */ |
| 11094 ConstantEvaluator(ErrorReporter errorReporter) { |
| 11095 this._errorReporter = errorReporter; |
| 11096 } |
| 10851 Object visitAdjacentStrings(AdjacentStrings node) { | 11097 Object visitAdjacentStrings(AdjacentStrings node) { |
| 10852 JavaStringBuilder builder = new JavaStringBuilder(); | 11098 JavaStringBuilder builder = new JavaStringBuilder(); |
| 10853 for (StringLiteral string in node.strings) { | 11099 for (StringLiteral string in node.strings) { |
| 10854 Object value = string.accept(this); | 11100 Object value = string.accept(this); |
| 10855 if (identical(value, NOT_A_CONSTANT)) { | 11101 if (identical(value, NOT_A_CONSTANT)) { |
| 10856 return value; | 11102 return value; |
| 10857 } | 11103 } |
| 10858 builder.append(value); | 11104 builder.append(value); |
| 10859 } | 11105 } |
| 10860 return builder.toString(); | 11106 return builder.toString(); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10960 return ((leftOperand2 as double)) + ((rightOperand2 as double)); | 11206 return ((leftOperand2 as double)) + ((rightOperand2 as double)); |
| 10961 } | 11207 } |
| 10962 } else if (node.operator.type == TokenType.STAR) { | 11208 } else if (node.operator.type == TokenType.STAR) { |
| 10963 if (leftOperand2 is int && rightOperand2 is int) { | 11209 if (leftOperand2 is int && rightOperand2 is int) { |
| 10964 return ((leftOperand2 as int)) * (rightOperand2 as int); | 11210 return ((leftOperand2 as int)) * (rightOperand2 as int); |
| 10965 } else if (leftOperand2 is double && rightOperand2 is double) { | 11211 } else if (leftOperand2 is double && rightOperand2 is double) { |
| 10966 return ((leftOperand2 as double)) * ((rightOperand2 as double)); | 11212 return ((leftOperand2 as double)) * ((rightOperand2 as double)); |
| 10967 } | 11213 } |
| 10968 } else if (node.operator.type == TokenType.SLASH) { | 11214 } else if (node.operator.type == TokenType.SLASH) { |
| 10969 if (leftOperand2 is int && rightOperand2 is int) { | 11215 if (leftOperand2 is int && rightOperand2 is int) { |
| 10970 return ((leftOperand2 as int)) ~/ (rightOperand2 as int); | 11216 if (rightOperand2 != 0) { |
| 11217 return ((leftOperand2 as int)) ~/ (rightOperand2 as int); |
| 11218 } else { |
| 11219 reportDivideByZeroError(node); |
| 11220 return 0; |
| 11221 } |
| 10971 } else if (leftOperand2 is double && rightOperand2 is double) { | 11222 } else if (leftOperand2 is double && rightOperand2 is double) { |
| 10972 return ((leftOperand2 as double)) / ((rightOperand2 as double)); | 11223 if (rightOperand2 != 0) { |
| 11224 return ((leftOperand2 as double)) / ((rightOperand2 as double)); |
| 11225 } else { |
| 11226 reportDivideByZeroError(node); |
| 11227 return 0; |
| 11228 } |
| 10973 } | 11229 } |
| 10974 } else if (node.operator.type == TokenType.TILDE_SLASH) { | 11230 } else if (node.operator.type == TokenType.TILDE_SLASH) { |
| 10975 if (leftOperand2 is int && rightOperand2 is int) { | 11231 if (leftOperand2 is int && rightOperand2 is int) { |
| 10976 return ((leftOperand2 as int)) ~/ (rightOperand2 as int); | 11232 if (rightOperand2 != 0) { |
| 11233 return ((leftOperand2 as int)) ~/ (rightOperand2 as int); |
| 11234 } else { |
| 11235 reportDivideByZeroError(node); |
| 11236 return 0; |
| 11237 } |
| 10977 } else if (leftOperand2 is double && rightOperand2 is double) { | 11238 } else if (leftOperand2 is double && rightOperand2 is double) { |
| 10978 return ((leftOperand2 as double)) ~/ ((rightOperand2 as double)); | 11239 if (rightOperand2 != 0) { |
| 11240 return ((leftOperand2 as double)) ~/ ((rightOperand2 as double)); |
| 11241 } else { |
| 11242 reportDivideByZeroError(node); |
| 11243 return 0; |
| 11244 } |
| 10979 } | 11245 } |
| 10980 } | 11246 } |
| 10981 break; | 11247 break; |
| 10982 } | 11248 } |
| 10983 return visitExpression(node); | 11249 return visitExpression(node); |
| 10984 } | 11250 } |
| 10985 Object visitBooleanLiteral(BooleanLiteral node) => node.value ? true : false; | 11251 Object visitBooleanLiteral(BooleanLiteral node) => node.value ? true : false; |
| 10986 Object visitDoubleLiteral(DoubleLiteral node) => node.value; | 11252 Object visitDoubleLiteral(DoubleLiteral node) => node.value; |
| 10987 Object visitIntegerLiteral(IntegerLiteral node) => node.value; | 11253 Object visitIntegerLiteral(IntegerLiteral node) => node.value; |
| 10988 Object visitInterpolationExpression(InterpolationExpression node) { | 11254 Object visitInterpolationExpression(InterpolationExpression node) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11070 * @return the constant value of the static constant | 11336 * @return the constant value of the static constant |
| 11071 */ | 11337 */ |
| 11072 Object getConstantValue(Element element) { | 11338 Object getConstantValue(Element element) { |
| 11073 if (element is FieldElement) { | 11339 if (element is FieldElement) { |
| 11074 FieldElement field = element as FieldElement; | 11340 FieldElement field = element as FieldElement; |
| 11075 if (field.isStatic() && field.isConst()) { | 11341 if (field.isStatic() && field.isConst()) { |
| 11076 } | 11342 } |
| 11077 } | 11343 } |
| 11078 return NOT_A_CONSTANT; | 11344 return NOT_A_CONSTANT; |
| 11079 } | 11345 } |
| 11346 void reportDivideByZeroError(BinaryExpression node) { |
| 11347 _errorReporter.reportError(CompileTimeErrorCode.COMPILE_TIME_CONSTANT_RAISES
_EXCEPTION_DIVIDE_BY_ZERO, node, []); |
| 11348 } |
| 11080 } | 11349 } |
| 11081 /** | 11350 /** |
| 11082 * Instances of the class {@code ElementLocator} locate the {@link Element Dart
model element}associated with a given {@link ASTNode AST node}. | 11351 * Instances of the class {@code ElementLocator} locate the {@link Element Dart
model element}associated with a given {@link ASTNode AST node}. |
| 11352 * @coverage dart.engine.ast |
| 11083 */ | 11353 */ |
| 11084 class ElementLocator { | 11354 class ElementLocator { |
| 11085 /** | 11355 /** |
| 11086 * Locate the {@link Element Dart model element} associated with the given {@l
ink ASTNode AST | 11356 * Locate the {@link Element Dart model element} associated with the given {@l
ink ASTNode AST |
| 11087 * node}. | 11357 * node}. |
| 11088 * @param node the node (not {@code null}) | 11358 * @param node the node (not {@code null}) |
| 11089 * @return the associated element, or {@code null} if none is found | 11359 * @return the associated element, or {@code null} if none is found |
| 11090 */ | 11360 */ |
| 11091 static Element locate(ASTNode node) { | 11361 static Element locate(ASTNode node) { |
| 11092 ElementLocator_ElementMapper mapper = new ElementLocator_ElementMapper(); | 11362 ElementLocator_ElementMapper mapper = new ElementLocator_ElementMapper(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11125 * superclasses of that node will also be invoked. For example, using an instanc
e of this class to | 11395 * superclasses of that node will also be invoked. For example, using an instanc
e of this class to |
| 11126 * visit a {@link Block} will cause the method {@link #visitBlock(Block)} to be
invoked but will | 11396 * visit a {@link Block} will cause the method {@link #visitBlock(Block)} to be
invoked but will |
| 11127 * also cause the methods {@link #visitStatement(Statement)} and {@link #visitNo
de(ASTNode)} to be | 11397 * also cause the methods {@link #visitStatement(Statement)} and {@link #visitNo
de(ASTNode)} to be |
| 11128 * subsequently invoked. This allows visitors to be written that visit all state
ments without | 11398 * subsequently invoked. This allows visitors to be written that visit all state
ments without |
| 11129 * needing to override the visit method for each of the specific subclasses of {
@link Statement}. | 11399 * needing to override the visit method for each of the specific subclasses of {
@link Statement}. |
| 11130 * <p> | 11400 * <p> |
| 11131 * Subclasses that override a visit method must either invoke the overridden vis
it method or | 11401 * Subclasses that override a visit method must either invoke the overridden vis
it method or |
| 11132 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods | 11402 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods |
| 11133 * for superclasses of the node to not be invoked and will cause the children of
the visited node to | 11403 * for superclasses of the node to not be invoked and will cause the children of
the visited node to |
| 11134 * not be visited. | 11404 * not be visited. |
| 11405 * @coverage dart.engine.ast |
| 11135 */ | 11406 */ |
| 11136 class GeneralizingASTVisitor<R> implements ASTVisitor<R> { | 11407 class GeneralizingASTVisitor<R> implements ASTVisitor<R> { |
| 11137 R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node); | 11408 R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node); |
| 11138 R visitAnnotatedNode(AnnotatedNode node) => visitNode(node); | 11409 R visitAnnotatedNode(AnnotatedNode node) => visitNode(node); |
| 11139 R visitAnnotation(Annotation node) => visitNode(node); | 11410 R visitAnnotation(Annotation node) => visitNode(node); |
| 11140 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitExpression(
node); | 11411 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitExpression(
node); |
| 11141 R visitArgumentList(ArgumentList node) => visitNode(node); | 11412 R visitArgumentList(ArgumentList node) => visitNode(node); |
| 11142 R visitAsExpression(AsExpression node) => visitExpression(node); | 11413 R visitAsExpression(AsExpression node) => visitExpression(node); |
| 11143 R visitAssertStatement(AssertStatement node) => visitStatement(node); | 11414 R visitAssertStatement(AssertStatement node) => visitStatement(node); |
| 11144 R visitAssignmentExpression(AssignmentExpression node) => visitExpression(node
); | 11415 R visitAssignmentExpression(AssignmentExpression node) => visitExpression(node
); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 11157 R visitCommentReference(CommentReference node) => visitNode(node); | 11428 R visitCommentReference(CommentReference node) => visitNode(node); |
| 11158 R visitCompilationUnit(CompilationUnit node) => visitNode(node); | 11429 R visitCompilationUnit(CompilationUnit node) => visitNode(node); |
| 11159 R visitCompilationUnitMember(CompilationUnitMember node) => visitDeclaration(n
ode); | 11430 R visitCompilationUnitMember(CompilationUnitMember node) => visitDeclaration(n
ode); |
| 11160 R visitConditionalExpression(ConditionalExpression node) => visitExpression(no
de); | 11431 R visitConditionalExpression(ConditionalExpression node) => visitExpression(no
de); |
| 11161 R visitConstructorDeclaration(ConstructorDeclaration node) => visitClassMember
(node); | 11432 R visitConstructorDeclaration(ConstructorDeclaration node) => visitClassMember
(node); |
| 11162 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => visitC
onstructorInitializer(node); | 11433 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => visitC
onstructorInitializer(node); |
| 11163 R visitConstructorInitializer(ConstructorInitializer node) => visitNode(node); | 11434 R visitConstructorInitializer(ConstructorInitializer node) => visitNode(node); |
| 11164 R visitConstructorName(ConstructorName node) => visitNode(node); | 11435 R visitConstructorName(ConstructorName node) => visitNode(node); |
| 11165 R visitContinueStatement(ContinueStatement node) => visitStatement(node); | 11436 R visitContinueStatement(ContinueStatement node) => visitStatement(node); |
| 11166 R visitDeclaration(Declaration node) => visitAnnotatedNode(node); | 11437 R visitDeclaration(Declaration node) => visitAnnotatedNode(node); |
| 11438 R visitDeclaredIdentifier(DeclaredIdentifier node) => visitDeclaration(node); |
| 11167 R visitDefaultFormalParameter(DefaultFormalParameter node) => visitFormalParam
eter(node); | 11439 R visitDefaultFormalParameter(DefaultFormalParameter node) => visitFormalParam
eter(node); |
| 11168 R visitDirective(Directive node) => visitAnnotatedNode(node); | 11440 R visitDirective(Directive node) => visitAnnotatedNode(node); |
| 11169 R visitDoStatement(DoStatement node) => visitStatement(node); | 11441 R visitDoStatement(DoStatement node) => visitStatement(node); |
| 11170 R visitDoubleLiteral(DoubleLiteral node) => visitLiteral(node); | 11442 R visitDoubleLiteral(DoubleLiteral node) => visitLiteral(node); |
| 11171 R visitEmptyFunctionBody(EmptyFunctionBody node) => visitFunctionBody(node); | 11443 R visitEmptyFunctionBody(EmptyFunctionBody node) => visitFunctionBody(node); |
| 11172 R visitEmptyStatement(EmptyStatement node) => visitStatement(node); | 11444 R visitEmptyStatement(EmptyStatement node) => visitStatement(node); |
| 11173 R visitExportDirective(ExportDirective node) => visitNamespaceDirective(node); | 11445 R visitExportDirective(ExportDirective node) => visitNamespaceDirective(node); |
| 11174 R visitExpression(Expression node) => visitNode(node); | 11446 R visitExpression(Expression node) => visitNode(node); |
| 11175 R visitExpressionFunctionBody(ExpressionFunctionBody node) => visitFunctionBod
y(node); | 11447 R visitExpressionFunctionBody(ExpressionFunctionBody node) => visitFunctionBod
y(node); |
| 11176 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node); | 11448 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11256 R visitVariableDeclarationList(VariableDeclarationList node) => visitNode(node
); | 11528 R visitVariableDeclarationList(VariableDeclarationList node) => visitNode(node
); |
| 11257 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => visi
tStatement(node); | 11529 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => visi
tStatement(node); |
| 11258 R visitWhileStatement(WhileStatement node) => visitStatement(node); | 11530 R visitWhileStatement(WhileStatement node) => visitStatement(node); |
| 11259 R visitWithClause(WithClause node) => visitNode(node); | 11531 R visitWithClause(WithClause node) => visitNode(node); |
| 11260 } | 11532 } |
| 11261 /** | 11533 /** |
| 11262 * Instances of the class {@code NodeLocator} locate the {@link ASTNode AST node
} associated with a | 11534 * Instances of the class {@code NodeLocator} locate the {@link ASTNode AST node
} associated with a |
| 11263 * source range, given the AST structure built from the source. More specificall
y, they will return | 11535 * source range, given the AST structure built from the source. More specificall
y, they will return |
| 11264 * the {@link ASTNode AST node} with the shortest length whose source range comp
letely encompasses | 11536 * the {@link ASTNode AST node} with the shortest length whose source range comp
letely encompasses |
| 11265 * the specified range. | 11537 * the specified range. |
| 11538 * @coverage dart.engine.ast |
| 11266 */ | 11539 */ |
| 11267 class NodeLocator extends GeneralizingASTVisitor<Object> { | 11540 class NodeLocator extends GeneralizingASTVisitor<Object> { |
| 11268 /** | 11541 /** |
| 11269 * The start offset of the range used to identify the node. | 11542 * The start offset of the range used to identify the node. |
| 11270 */ | 11543 */ |
| 11271 int _startOffset = 0; | 11544 int _startOffset = 0; |
| 11272 /** | 11545 /** |
| 11273 * The end offset of the range used to identify the node. | 11546 * The end offset of the range used to identify the node. |
| 11274 */ | 11547 */ |
| 11275 int _endOffset = 0; | 11548 int _endOffset = 0; |
| 11276 /** | 11549 /** |
| 11277 * The element that was found that corresponds to the given source range, or {
@code null} if there | 11550 * The element that was found that corresponds to the given source range, or {
@code null} if there |
| 11278 * is no such element. | 11551 * is no such element. |
| 11279 */ | 11552 */ |
| 11280 ASTNode _foundNode; | 11553 ASTNode _foundNode; |
| 11281 /** | 11554 /** |
| 11282 * Initialize a newly created locator to locate one or more {@link ASTNode AST
nodes} by locating | 11555 * Initialize a newly created locator to locate one or more {@link ASTNode AST
nodes} by locating |
| 11283 * the node within an AST structure that corresponds to the given offset in th
e source. | 11556 * the node within an AST structure that corresponds to the given offset in th
e source. |
| 11284 * @param offset the offset used to identify the node | 11557 * @param offset the offset used to identify the node |
| 11285 */ | 11558 */ |
| 11286 NodeLocator.con1(int offset) { | 11559 NodeLocator.con1(int offset) { |
| 11287 _jtd_constructor_116_impl(offset); | 11560 _jtd_constructor_118_impl(offset); |
| 11288 } | 11561 } |
| 11289 _jtd_constructor_116_impl(int offset) { | 11562 _jtd_constructor_118_impl(int offset) { |
| 11290 _jtd_constructor_117_impl(offset, offset); | 11563 _jtd_constructor_119_impl(offset, offset); |
| 11291 } | 11564 } |
| 11292 /** | 11565 /** |
| 11293 * Initialize a newly created locator to locate one or more {@link ASTNode AST
nodes} by locating | 11566 * Initialize a newly created locator to locate one or more {@link ASTNode AST
nodes} by locating |
| 11294 * the node within an AST structure that corresponds to the given range of cha
racters in the | 11567 * the node within an AST structure that corresponds to the given range of cha
racters in the |
| 11295 * source. | 11568 * source. |
| 11296 * @param start the start offset of the range used to identify the node | 11569 * @param start the start offset of the range used to identify the node |
| 11297 * @param end the end offset of the range used to identify the node | 11570 * @param end the end offset of the range used to identify the node |
| 11298 */ | 11571 */ |
| 11299 NodeLocator.con2(int start, int end) { | 11572 NodeLocator.con2(int start, int end) { |
| 11300 _jtd_constructor_117_impl(start, end); | 11573 _jtd_constructor_119_impl(start, end); |
| 11301 } | 11574 } |
| 11302 _jtd_constructor_117_impl(int start, int end) { | 11575 _jtd_constructor_119_impl(int start, int end) { |
| 11303 this._startOffset = start; | 11576 this._startOffset = start; |
| 11304 this._endOffset = end; | 11577 this._endOffset = end; |
| 11305 } | 11578 } |
| 11306 /** | 11579 /** |
| 11307 * Return the node that was found that corresponds to the given source range,
or {@code null} if | 11580 * Return the node that was found that corresponds to the given source range,
or {@code null} if |
| 11308 * there is no such node. | 11581 * there is no such node. |
| 11309 * @return the node that was found | 11582 * @return the node that was found |
| 11310 */ | 11583 */ |
| 11311 ASTNode get foundNode => _foundNode; | 11584 ASTNode get foundNode => _foundNode; |
| 11312 /** | 11585 /** |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11351 static int _serialVersionUID = 1; | 11624 static int _serialVersionUID = 1; |
| 11352 } | 11625 } |
| 11353 /** | 11626 /** |
| 11354 * Instances of the class {@code RecursiveASTVisitor} implement an AST visitor t
hat will recursively | 11627 * Instances of the class {@code RecursiveASTVisitor} implement an AST visitor t
hat will recursively |
| 11355 * visit all of the nodes in an AST structure. For example, using an instance of
this class to visit | 11628 * visit all of the nodes in an AST structure. For example, using an instance of
this class to visit |
| 11356 * a {@link Block} will also cause all of the statements in the block to be visi
ted. | 11629 * a {@link Block} will also cause all of the statements in the block to be visi
ted. |
| 11357 * <p> | 11630 * <p> |
| 11358 * Subclasses that override a visit method must either invoke the overridden vis
it method or must | 11631 * Subclasses that override a visit method must either invoke the overridden vis
it method or must |
| 11359 * explicitly ask the visited node to visit its children. Failure to do so will
cause the children | 11632 * explicitly ask the visited node to visit its children. Failure to do so will
cause the children |
| 11360 * of the visited node to not be visited. | 11633 * of the visited node to not be visited. |
| 11634 * @coverage dart.engine.ast |
| 11361 */ | 11635 */ |
| 11362 class RecursiveASTVisitor<R> implements ASTVisitor<R> { | 11636 class RecursiveASTVisitor<R> implements ASTVisitor<R> { |
| 11363 R visitAdjacentStrings(AdjacentStrings node) { | 11637 R visitAdjacentStrings(AdjacentStrings node) { |
| 11364 node.visitChildren(this); | 11638 node.visitChildren(this); |
| 11365 return null; | 11639 return null; |
| 11366 } | 11640 } |
| 11367 R visitAnnotation(Annotation node) { | 11641 R visitAnnotation(Annotation node) { |
| 11368 node.visitChildren(this); | 11642 node.visitChildren(this); |
| 11369 return null; | 11643 return null; |
| 11370 } | 11644 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11449 return null; | 11723 return null; |
| 11450 } | 11724 } |
| 11451 R visitConstructorName(ConstructorName node) { | 11725 R visitConstructorName(ConstructorName node) { |
| 11452 node.visitChildren(this); | 11726 node.visitChildren(this); |
| 11453 return null; | 11727 return null; |
| 11454 } | 11728 } |
| 11455 R visitContinueStatement(ContinueStatement node) { | 11729 R visitContinueStatement(ContinueStatement node) { |
| 11456 node.visitChildren(this); | 11730 node.visitChildren(this); |
| 11457 return null; | 11731 return null; |
| 11458 } | 11732 } |
| 11733 R visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 11734 node.visitChildren(this); |
| 11735 return null; |
| 11736 } |
| 11459 R visitDefaultFormalParameter(DefaultFormalParameter node) { | 11737 R visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 11460 node.visitChildren(this); | 11738 node.visitChildren(this); |
| 11461 return null; | 11739 return null; |
| 11462 } | 11740 } |
| 11463 R visitDoStatement(DoStatement node) { | 11741 R visitDoStatement(DoStatement node) { |
| 11464 node.visitChildren(this); | 11742 node.visitChildren(this); |
| 11465 return null; | 11743 return null; |
| 11466 } | 11744 } |
| 11467 R visitDoubleLiteral(DoubleLiteral node) { | 11745 R visitDoubleLiteral(DoubleLiteral node) { |
| 11468 node.visitChildren(this); | 11746 node.visitChildren(this); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11751 R visitWithClause(WithClause node) { | 12029 R visitWithClause(WithClause node) { |
| 11752 node.visitChildren(this); | 12030 node.visitChildren(this); |
| 11753 return null; | 12031 return null; |
| 11754 } | 12032 } |
| 11755 } | 12033 } |
| 11756 /** | 12034 /** |
| 11757 * Instances of the class {@code SimpleASTVisitor} implement an AST visitor that
will do nothing | 12035 * Instances of the class {@code SimpleASTVisitor} implement an AST visitor that
will do nothing |
| 11758 * when visiting an AST node. It is intended to be a superclass for classes that
use the visitor | 12036 * when visiting an AST node. It is intended to be a superclass for classes that
use the visitor |
| 11759 * pattern primarily as a dispatch mechanism (and hence don't need to recursivel
y visit a whole | 12037 * pattern primarily as a dispatch mechanism (and hence don't need to recursivel
y visit a whole |
| 11760 * structure) and that only need to visit a small number of node types. | 12038 * structure) and that only need to visit a small number of node types. |
| 12039 * @coverage dart.engine.ast |
| 11761 */ | 12040 */ |
| 11762 class SimpleASTVisitor<R> implements ASTVisitor<R> { | 12041 class SimpleASTVisitor<R> implements ASTVisitor<R> { |
| 11763 R visitAdjacentStrings(AdjacentStrings node) => null; | 12042 R visitAdjacentStrings(AdjacentStrings node) => null; |
| 11764 R visitAnnotation(Annotation node) => null; | 12043 R visitAnnotation(Annotation node) => null; |
| 11765 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => null; | 12044 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => null; |
| 11766 R visitArgumentList(ArgumentList node) => null; | 12045 R visitArgumentList(ArgumentList node) => null; |
| 11767 R visitAsExpression(AsExpression node) => null; | 12046 R visitAsExpression(AsExpression node) => null; |
| 11768 R visitAssertStatement(AssertStatement node) => null; | 12047 R visitAssertStatement(AssertStatement node) => null; |
| 11769 R visitAssignmentExpression(AssignmentExpression node) => null; | 12048 R visitAssignmentExpression(AssignmentExpression node) => null; |
| 11770 R visitBinaryExpression(BinaryExpression node) => null; | 12049 R visitBinaryExpression(BinaryExpression node) => null; |
| 11771 R visitBlock(Block node) => null; | 12050 R visitBlock(Block node) => null; |
| 11772 R visitBlockFunctionBody(BlockFunctionBody node) => null; | 12051 R visitBlockFunctionBody(BlockFunctionBody node) => null; |
| 11773 R visitBooleanLiteral(BooleanLiteral node) => null; | 12052 R visitBooleanLiteral(BooleanLiteral node) => null; |
| 11774 R visitBreakStatement(BreakStatement node) => null; | 12053 R visitBreakStatement(BreakStatement node) => null; |
| 11775 R visitCascadeExpression(CascadeExpression node) => null; | 12054 R visitCascadeExpression(CascadeExpression node) => null; |
| 11776 R visitCatchClause(CatchClause node) => null; | 12055 R visitCatchClause(CatchClause node) => null; |
| 11777 R visitClassDeclaration(ClassDeclaration node) => null; | 12056 R visitClassDeclaration(ClassDeclaration node) => null; |
| 11778 R visitClassTypeAlias(ClassTypeAlias node) => null; | 12057 R visitClassTypeAlias(ClassTypeAlias node) => null; |
| 11779 R visitComment(Comment node) => null; | 12058 R visitComment(Comment node) => null; |
| 11780 R visitCommentReference(CommentReference node) => null; | 12059 R visitCommentReference(CommentReference node) => null; |
| 11781 R visitCompilationUnit(CompilationUnit node) => null; | 12060 R visitCompilationUnit(CompilationUnit node) => null; |
| 11782 R visitConditionalExpression(ConditionalExpression node) => null; | 12061 R visitConditionalExpression(ConditionalExpression node) => null; |
| 11783 R visitConstructorDeclaration(ConstructorDeclaration node) => null; | 12062 R visitConstructorDeclaration(ConstructorDeclaration node) => null; |
| 11784 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => null; | 12063 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => null; |
| 11785 R visitConstructorName(ConstructorName node) => null; | 12064 R visitConstructorName(ConstructorName node) => null; |
| 11786 R visitContinueStatement(ContinueStatement node) => null; | 12065 R visitContinueStatement(ContinueStatement node) => null; |
| 12066 R visitDeclaredIdentifier(DeclaredIdentifier node) => null; |
| 11787 R visitDefaultFormalParameter(DefaultFormalParameter node) => null; | 12067 R visitDefaultFormalParameter(DefaultFormalParameter node) => null; |
| 11788 R visitDoStatement(DoStatement node) => null; | 12068 R visitDoStatement(DoStatement node) => null; |
| 11789 R visitDoubleLiteral(DoubleLiteral node) => null; | 12069 R visitDoubleLiteral(DoubleLiteral node) => null; |
| 11790 R visitEmptyFunctionBody(EmptyFunctionBody node) => null; | 12070 R visitEmptyFunctionBody(EmptyFunctionBody node) => null; |
| 11791 R visitEmptyStatement(EmptyStatement node) => null; | 12071 R visitEmptyStatement(EmptyStatement node) => null; |
| 11792 R visitExportDirective(ExportDirective node) => null; | 12072 R visitExportDirective(ExportDirective node) => null; |
| 11793 R visitExpressionFunctionBody(ExpressionFunctionBody node) => null; | 12073 R visitExpressionFunctionBody(ExpressionFunctionBody node) => null; |
| 11794 R visitExpressionStatement(ExpressionStatement node) => null; | 12074 R visitExpressionStatement(ExpressionStatement node) => null; |
| 11795 R visitExtendsClause(ExtendsClause node) => null; | 12075 R visitExtendsClause(ExtendsClause node) => null; |
| 11796 R visitFieldDeclaration(FieldDeclaration node) => null; | 12076 R visitFieldDeclaration(FieldDeclaration node) => null; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11855 R visitTypeParameterList(TypeParameterList node) => null; | 12135 R visitTypeParameterList(TypeParameterList node) => null; |
| 11856 R visitVariableDeclaration(VariableDeclaration node) => null; | 12136 R visitVariableDeclaration(VariableDeclaration node) => null; |
| 11857 R visitVariableDeclarationList(VariableDeclarationList node) => null; | 12137 R visitVariableDeclarationList(VariableDeclarationList node) => null; |
| 11858 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => null
; | 12138 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => null
; |
| 11859 R visitWhileStatement(WhileStatement node) => null; | 12139 R visitWhileStatement(WhileStatement node) => null; |
| 11860 R visitWithClause(WithClause node) => null; | 12140 R visitWithClause(WithClause node) => null; |
| 11861 } | 12141 } |
| 11862 /** | 12142 /** |
| 11863 * Instances of the class {@code ToSourceVisitor} write a source representation
of a visited AST | 12143 * Instances of the class {@code ToSourceVisitor} write a source representation
of a visited AST |
| 11864 * node (and all of it's children) to a writer. | 12144 * node (and all of it's children) to a writer. |
| 12145 * @coverage dart.engine.ast |
| 11865 */ | 12146 */ |
| 11866 class ToSourceVisitor implements ASTVisitor<Object> { | 12147 class ToSourceVisitor implements ASTVisitor<Object> { |
| 11867 /** | 12148 /** |
| 11868 * The writer to which the source is to be written. | 12149 * The writer to which the source is to be written. |
| 11869 */ | 12150 */ |
| 11870 PrintWriter _writer; | 12151 PrintWriter _writer; |
| 11871 /** | 12152 /** |
| 11872 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the | 12153 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the |
| 11873 * given writer. | 12154 * given writer. |
| 11874 * @param writer the writer to which the source is to be written | 12155 * @param writer the writer to which the source is to be written |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12037 visit(node.type); | 12318 visit(node.type); |
| 12038 visit3(".", node.name); | 12319 visit3(".", node.name); |
| 12039 return null; | 12320 return null; |
| 12040 } | 12321 } |
| 12041 Object visitContinueStatement(ContinueStatement node) { | 12322 Object visitContinueStatement(ContinueStatement node) { |
| 12042 _writer.print("continue"); | 12323 _writer.print("continue"); |
| 12043 visit3(" ", node.label); | 12324 visit3(" ", node.label); |
| 12044 _writer.print(";"); | 12325 _writer.print(";"); |
| 12045 return null; | 12326 return null; |
| 12046 } | 12327 } |
| 12328 Object visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 12329 visit5(node.keyword, " "); |
| 12330 visit2(node.type, " "); |
| 12331 visit(node.identifier); |
| 12332 return null; |
| 12333 } |
| 12047 Object visitDefaultFormalParameter(DefaultFormalParameter node) { | 12334 Object visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 12048 visit(node.parameter); | 12335 visit(node.parameter); |
| 12049 if (node.separator != null) { | 12336 if (node.separator != null) { |
| 12050 _writer.print(" "); | 12337 _writer.print(" "); |
| 12051 _writer.print(node.separator.lexeme); | 12338 _writer.print(node.separator.lexeme); |
| 12052 visit3(" ", node.defaultValue); | 12339 visit3(" ", node.defaultValue); |
| 12053 } | 12340 } |
| 12054 return null; | 12341 return null; |
| 12055 } | 12342 } |
| 12056 Object visitDoStatement(DoStatement node) { | 12343 Object visitDoStatement(DoStatement node) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12106 } | 12393 } |
| 12107 Object visitFieldFormalParameter(FieldFormalParameter node) { | 12394 Object visitFieldFormalParameter(FieldFormalParameter node) { |
| 12108 visit5(node.keyword, " "); | 12395 visit5(node.keyword, " "); |
| 12109 visit2(node.type, " "); | 12396 visit2(node.type, " "); |
| 12110 _writer.print("this."); | 12397 _writer.print("this."); |
| 12111 visit(node.identifier); | 12398 visit(node.identifier); |
| 12112 return null; | 12399 return null; |
| 12113 } | 12400 } |
| 12114 Object visitForEachStatement(ForEachStatement node) { | 12401 Object visitForEachStatement(ForEachStatement node) { |
| 12115 _writer.print("for ("); | 12402 _writer.print("for ("); |
| 12116 visit(node.loopParameter); | 12403 visit(node.loopVariable); |
| 12117 _writer.print(" in "); | 12404 _writer.print(" in "); |
| 12118 visit(node.iterator); | 12405 visit(node.iterator); |
| 12119 _writer.print(") "); | 12406 _writer.print(") "); |
| 12120 visit(node.body); | 12407 visit(node.body); |
| 12121 return null; | 12408 return null; |
| 12122 } | 12409 } |
| 12123 Object visitFormalParameterList(FormalParameterList node) { | 12410 Object visitFormalParameterList(FormalParameterList node) { |
| 12124 String groupEnd = null; | 12411 String groupEnd = null; |
| 12125 _writer.print('('); | 12412 _writer.print('('); |
| 12126 NodeList<FormalParameter> parameters9 = node.parameters; | 12413 NodeList<FormalParameter> parameters9 = node.parameters; |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12721 return elements[elements.length - 1].endToken; | 13008 return elements[elements.length - 1].endToken; |
| 12722 } | 13009 } |
| 12723 /** | 13010 /** |
| 12724 * Return the node that is the parent of each of the elements in the list. | 13011 * Return the node that is the parent of each of the elements in the list. |
| 12725 * @return the node that is the parent of each of the elements in the list | 13012 * @return the node that is the parent of each of the elements in the list |
| 12726 */ | 13013 */ |
| 12727 ASTNode getOwner() { | 13014 ASTNode getOwner() { |
| 12728 return owner; | 13015 return owner; |
| 12729 } | 13016 } |
| 12730 } | 13017 } |
| OLD | NEW |