| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast; | 8 library engine.ast; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 @override | 372 @override |
| 373 void visitChildren(AstVisitor visitor) { | 373 void visitChildren(AstVisitor visitor) { |
| 374 safelyVisitChild(_name, visitor); | 374 safelyVisitChild(_name, visitor); |
| 375 safelyVisitChild(_constructorName, visitor); | 375 safelyVisitChild(_constructorName, visitor); |
| 376 safelyVisitChild(_arguments, visitor); | 376 safelyVisitChild(_arguments, visitor); |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 | 379 |
| 380 /** | 380 /** |
| 381 * Instances of the class `ArgumentDefinitionTest` represent an argument definit
ion test. | |
| 382 * | |
| 383 * <pre> | |
| 384 * argumentDefinitionTest ::= | |
| 385 * '?' [SimpleIdentifier] | |
| 386 * </pre> | |
| 387 */ | |
| 388 class ArgumentDefinitionTest extends Expression { | |
| 389 /** | |
| 390 * The token representing the question mark. | |
| 391 */ | |
| 392 Token question; | |
| 393 | |
| 394 /** | |
| 395 * The identifier representing the argument being tested. | |
| 396 */ | |
| 397 SimpleIdentifier _identifier; | |
| 398 | |
| 399 /** | |
| 400 * Initialize a newly created argument definition test. | |
| 401 * | |
| 402 * @param question the token representing the question mark | |
| 403 * @param identifier the identifier representing the argument being tested | |
| 404 */ | |
| 405 ArgumentDefinitionTest(this.question, SimpleIdentifier identifier) { | |
| 406 this._identifier = becomeParentOf(identifier); | |
| 407 } | |
| 408 | |
| 409 @override | |
| 410 accept(AstVisitor visitor) => visitor.visitArgumentDefinitionTest(this); | |
| 411 | |
| 412 @override | |
| 413 Token get beginToken => question; | |
| 414 | |
| 415 @override | |
| 416 Token get endToken => _identifier.endToken; | |
| 417 | |
| 418 /** | |
| 419 * Return the identifier representing the argument being tested. | |
| 420 * | |
| 421 * @return the identifier representing the argument being tested | |
| 422 */ | |
| 423 SimpleIdentifier get identifier => _identifier; | |
| 424 | |
| 425 @override | |
| 426 int get precedence => 15; | |
| 427 | |
| 428 /** | |
| 429 * Set the identifier representing the argument being tested to the given iden
tifier. | |
| 430 * | |
| 431 * @param identifier the identifier representing the argument being tested | |
| 432 */ | |
| 433 void set identifier(SimpleIdentifier identifier) { | |
| 434 this._identifier = becomeParentOf(identifier); | |
| 435 } | |
| 436 | |
| 437 @override | |
| 438 void visitChildren(AstVisitor visitor) { | |
| 439 safelyVisitChild(_identifier, visitor); | |
| 440 } | |
| 441 } | |
| 442 | |
| 443 /** | |
| 444 * Instances of the class `ArgumentList` represent a list of arguments in the in
vocation of a | 381 * Instances of the class `ArgumentList` represent a list of arguments in the in
vocation of a |
| 445 * executable element: a function, method, or constructor. | 382 * executable element: a function, method, or constructor. |
| 446 * | 383 * |
| 447 * <pre> | 384 * <pre> |
| 448 * argumentList ::= | 385 * argumentList ::= |
| 449 * '(' arguments? ')' | 386 * '(' arguments? ')' |
| 450 * | 387 * |
| 451 * arguments ::= | 388 * arguments ::= |
| 452 * [NamedExpression] (',' [NamedExpression])* | 389 * [NamedExpression] (',' [NamedExpression])* |
| 453 * | [Expression] (',' [NamedExpression])* | 390 * | [Expression] (',' [NamedExpression])* |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 * results or properties associated with the nodes. | 949 * results or properties associated with the nodes. |
| 1013 */ | 950 */ |
| 1014 class AstCloner implements AstVisitor<AstNode> { | 951 class AstCloner implements AstVisitor<AstNode> { |
| 1015 @override | 952 @override |
| 1016 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); | 953 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 1017 | 954 |
| 1018 @override | 955 @override |
| 1019 Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, _cl
oneNode(node.name), node.period, _cloneNode(node.constructorName), _cloneNode(no
de.arguments)); | 956 Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, _cl
oneNode(node.name), node.period, _cloneNode(node.constructorName), _cloneNode(no
de.arguments)); |
| 1020 | 957 |
| 1021 @override | 958 @override |
| 1022 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) => new ArgumentDefinitionTest(node.question, _cloneNode(node.identifier)); | |
| 1023 | |
| 1024 @override | |
| 1025 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.lef
tParenthesis, _cloneNodeList(node.arguments), node.rightParenthesis); | 959 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.lef
tParenthesis, _cloneNodeList(node.arguments), node.rightParenthesis); |
| 1026 | 960 |
| 1027 @override | 961 @override |
| 1028 AsExpression visitAsExpression(AsExpression node) => new AsExpression(_cloneNo
de(node.expression), node.asOperator, _cloneNode(node.type)); | 962 AsExpression visitAsExpression(AsExpression node) => new AsExpression(_cloneNo
de(node.expression), node.asOperator, _cloneNode(node.type)); |
| 1029 | 963 |
| 1030 @override | 964 @override |
| 1031 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node
.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesi
s, node.semicolon); | 965 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node
.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesi
s, node.semicolon); |
| 1032 | 966 |
| 1033 @override | 967 @override |
| 1034 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n
ew AssignmentExpression(_cloneNode(node.leftHandSide), node.operator, _cloneNode
(node.rightHandSide)); | 968 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n
ew AssignmentExpression(_cloneNode(node.leftHandSide), node.operator, _cloneNode
(node.rightHandSide)); |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 return _isEqualNodeLists(node.strings, other.strings); | 1344 return _isEqualNodeLists(node.strings, other.strings); |
| 1411 } | 1345 } |
| 1412 | 1346 |
| 1413 @override | 1347 @override |
| 1414 bool visitAnnotation(Annotation node) { | 1348 bool visitAnnotation(Annotation node) { |
| 1415 Annotation other = this._other as Annotation; | 1349 Annotation other = this._other as Annotation; |
| 1416 return _isEqualTokens(node.atSign, other.atSign) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.period, other.period) && _isEqualNodes(node.
constructorName, other.constructorName) && _isEqualNodes(node.arguments, other.a
rguments); | 1350 return _isEqualTokens(node.atSign, other.atSign) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.period, other.period) && _isEqualNodes(node.
constructorName, other.constructorName) && _isEqualNodes(node.arguments, other.a
rguments); |
| 1417 } | 1351 } |
| 1418 | 1352 |
| 1419 @override | 1353 @override |
| 1420 bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | |
| 1421 ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest; | |
| 1422 return _isEqualTokens(node.question, other.question) && _isEqualNodes(node.i
dentifier, other.identifier); | |
| 1423 } | |
| 1424 | |
| 1425 @override | |
| 1426 bool visitArgumentList(ArgumentList node) { | 1354 bool visitArgumentList(ArgumentList node) { |
| 1427 ArgumentList other = this._other as ArgumentList; | 1355 ArgumentList other = this._other as ArgumentList; |
| 1428 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.arguments, other.arguments) && _isEqualTokens(node.rightParenth
esis, other.rightParenthesis); | 1356 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.arguments, other.arguments) && _isEqualTokens(node.rightParenth
esis, other.rightParenthesis); |
| 1429 } | 1357 } |
| 1430 | 1358 |
| 1431 @override | 1359 @override |
| 1432 bool visitAsExpression(AsExpression node) { | 1360 bool visitAsExpression(AsExpression node) { |
| 1433 AsExpression other = this._other as AsExpression; | 1361 AsExpression other = this._other as AsExpression; |
| 1434 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.asOperator, other.asOperator) && _isEqualNodes(node.type, other.type); | 1362 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.asOperator, other.asOperator) && _isEqualNodes(node.type, other.type); |
| 1435 } | 1363 } |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2346 | 2274 |
| 2347 /** | 2275 /** |
| 2348 * The interface `AstVisitor` defines the behavior of objects that can be used t
o visit an AST | 2276 * The interface `AstVisitor` defines the behavior of objects that can be used t
o visit an AST |
| 2349 * structure. | 2277 * structure. |
| 2350 */ | 2278 */ |
| 2351 abstract class AstVisitor<R> { | 2279 abstract class AstVisitor<R> { |
| 2352 R visitAdjacentStrings(AdjacentStrings node); | 2280 R visitAdjacentStrings(AdjacentStrings node); |
| 2353 | 2281 |
| 2354 R visitAnnotation(Annotation node); | 2282 R visitAnnotation(Annotation node); |
| 2355 | 2283 |
| 2356 R visitArgumentDefinitionTest(ArgumentDefinitionTest node); | |
| 2357 | |
| 2358 R visitArgumentList(ArgumentList node); | 2284 R visitArgumentList(ArgumentList node); |
| 2359 | 2285 |
| 2360 R visitAsExpression(AsExpression node); | 2286 R visitAsExpression(AsExpression node); |
| 2361 | 2287 |
| 2362 R visitAssertStatement(AssertStatement assertStatement); | 2288 R visitAssertStatement(AssertStatement assertStatement); |
| 2363 | 2289 |
| 2364 R visitAssignmentExpression(AssignmentExpression node); | 2290 R visitAssignmentExpression(AssignmentExpression node); |
| 2365 | 2291 |
| 2366 R visitBinaryExpression(BinaryExpression node); | 2292 R visitBinaryExpression(BinaryExpression node); |
| 2367 | 2293 |
| (...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5482 } | 5408 } |
| 5483 | 5409 |
| 5484 @override | 5410 @override |
| 5485 void visitChildren(AstVisitor visitor) { | 5411 void visitChildren(AstVisitor visitor) { |
| 5486 safelyVisitChild(_parameter, visitor); | 5412 safelyVisitChild(_parameter, visitor); |
| 5487 safelyVisitChild(_defaultValue, visitor); | 5413 safelyVisitChild(_defaultValue, visitor); |
| 5488 } | 5414 } |
| 5489 } | 5415 } |
| 5490 | 5416 |
| 5491 /** | 5417 /** |
| 5418 * This recursive Ast visitor is used to run over [Expression]s to determine if
the expression |
| 5419 * is composed by at least one deferred [PrefixedIdentifier]. |
| 5420 * |
| 5421 * @see PrefixedIdentifier#isDeferred() |
| 5422 */ |
| 5423 class DeferredLibraryReferenceDetector extends RecursiveAstVisitor<Object> { |
| 5424 bool _result = false; |
| 5425 |
| 5426 /** |
| 5427 * Return the result, `true` if the visitor found a [PrefixedIdentifier] that
returned |
| 5428 * `true` to the [PrefixedIdentifier#isDeferred] query. |
| 5429 * |
| 5430 * @return `true` if the visitor found a [PrefixedIdentifier] that returned |
| 5431 * `true` to the [PrefixedIdentifier#isDeferred] query |
| 5432 */ |
| 5433 bool get result => _result; |
| 5434 |
| 5435 @override |
| 5436 Object visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 5437 // If result is already true, skip. |
| 5438 if (!_result) { |
| 5439 // Set result to true if isDeferred() is true |
| 5440 if (node.isDeferred) { |
| 5441 _result = true; |
| 5442 } |
| 5443 } |
| 5444 return null; |
| 5445 } |
| 5446 } |
| 5447 |
| 5448 /** |
| 5492 * The abstract class `Directive` defines the behavior common to nodes that repr
esent a | 5449 * The abstract class `Directive` defines the behavior common to nodes that repr
esent a |
| 5493 * directive. | 5450 * directive. |
| 5494 * | 5451 * |
| 5495 * <pre> | 5452 * <pre> |
| 5496 * directive ::= | 5453 * directive ::= |
| 5497 * [ExportDirective] | 5454 * [ExportDirective] |
| 5498 * | [ImportDirective] | 5455 * | [ImportDirective] |
| 5499 * | [LibraryDirective] | 5456 * | [LibraryDirective] |
| 5500 * | [PartDirective] | 5457 * | [PartDirective] |
| 5501 * | [PartOfDirective] | 5458 * | [PartOfDirective] |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5747 } | 5704 } |
| 5748 | 5705 |
| 5749 /** | 5706 /** |
| 5750 * Locate the [Element] associated with the given [AstNode] and offset. | 5707 * Locate the [Element] associated with the given [AstNode] and offset. |
| 5751 * | 5708 * |
| 5752 * @param node the node (not `null`) | 5709 * @param node the node (not `null`) |
| 5753 * @param offset the offset relative to source | 5710 * @param offset the offset relative to source |
| 5754 * @return the associated element, or `null` if none is found | 5711 * @return the associated element, or `null` if none is found |
| 5755 */ | 5712 */ |
| 5756 static Element locateWithOffset(AstNode node, int offset) { | 5713 static Element locateWithOffset(AstNode node, int offset) { |
| 5714 if (node == null) { |
| 5715 return null; |
| 5716 } |
| 5757 // try to get Element from node | 5717 // try to get Element from node |
| 5758 { | 5718 { |
| 5759 Element nodeElement = locate(node); | 5719 Element nodeElement = locate(node); |
| 5760 if (nodeElement != null) { | 5720 if (nodeElement != null) { |
| 5761 return nodeElement; | 5721 return nodeElement; |
| 5762 } | 5722 } |
| 5763 } | 5723 } |
| 5764 // try to get Angular specific Element | 5724 // try to get Angular specific Element |
| 5765 { | 5725 { |
| 5766 Element element = null; | 5726 Element element = null; |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7875 class GeneralizingAstVisitor<R> implements AstVisitor<R> { | 7835 class GeneralizingAstVisitor<R> implements AstVisitor<R> { |
| 7876 @override | 7836 @override |
| 7877 R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node); | 7837 R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node); |
| 7878 | 7838 |
| 7879 R visitAnnotatedNode(AnnotatedNode node) => visitNode(node); | 7839 R visitAnnotatedNode(AnnotatedNode node) => visitNode(node); |
| 7880 | 7840 |
| 7881 @override | 7841 @override |
| 7882 R visitAnnotation(Annotation node) => visitNode(node); | 7842 R visitAnnotation(Annotation node) => visitNode(node); |
| 7883 | 7843 |
| 7884 @override | 7844 @override |
| 7885 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitExpression(
node); | |
| 7886 | |
| 7887 @override | |
| 7888 R visitArgumentList(ArgumentList node) => visitNode(node); | 7845 R visitArgumentList(ArgumentList node) => visitNode(node); |
| 7889 | 7846 |
| 7890 @override | 7847 @override |
| 7891 R visitAsExpression(AsExpression node) => visitExpression(node); | 7848 R visitAsExpression(AsExpression node) => visitExpression(node); |
| 7892 | 7849 |
| 7893 @override | 7850 @override |
| 7894 R visitAssertStatement(AssertStatement node) => visitStatement(node); | 7851 R visitAssertStatement(AssertStatement node) => visitStatement(node); |
| 7895 | 7852 |
| 7896 @override | 7853 @override |
| 7897 R visitAssignmentExpression(AssignmentExpression node) => visitExpression(node
); | 7854 R visitAssignmentExpression(AssignmentExpression node) => visitExpression(node
); |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8747 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); | 8704 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 8748 | 8705 |
| 8749 @override | 8706 @override |
| 8750 Annotation visitAnnotation(Annotation node) { | 8707 Annotation visitAnnotation(Annotation node) { |
| 8751 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); | 8708 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); |
| 8752 copy.element = node.element; | 8709 copy.element = node.element; |
| 8753 return copy; | 8710 return copy; |
| 8754 } | 8711 } |
| 8755 | 8712 |
| 8756 @override | 8713 @override |
| 8757 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) { | |
| 8758 ArgumentDefinitionTest copy = new ArgumentDefinitionTest(_mapToken(node.ques
tion), _cloneNode(node.identifier)); | |
| 8759 copy.propagatedType = node.propagatedType; | |
| 8760 copy.staticType = node.staticType; | |
| 8761 return copy; | |
| 8762 } | |
| 8763 | |
| 8764 @override | |
| 8765 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(_mapToke
n(node.leftParenthesis), _cloneNodeList(node.arguments), _mapToken(node.rightPar
enthesis)); | 8714 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(_mapToke
n(node.leftParenthesis), _cloneNodeList(node.arguments), _mapToken(node.rightPar
enthesis)); |
| 8766 | 8715 |
| 8767 @override | 8716 @override |
| 8768 AsExpression visitAsExpression(AsExpression node) { | 8717 AsExpression visitAsExpression(AsExpression node) { |
| 8769 AsExpression copy = new AsExpression(_cloneNode(node.expression), _mapToken(
node.asOperator), _cloneNode(node.type)); | 8718 AsExpression copy = new AsExpression(_cloneNode(node.expression), _mapToken(
node.asOperator), _cloneNode(node.type)); |
| 8770 copy.propagatedType = node.propagatedType; | 8719 copy.propagatedType = node.propagatedType; |
| 8771 copy.staticType = node.staticType; | 8720 copy.staticType = node.staticType; |
| 8772 return copy; | 8721 return copy; |
| 8773 } | 8722 } |
| 8774 | 8723 |
| (...skipping 3691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12466 return null; | 12415 return null; |
| 12467 } | 12416 } |
| 12468 | 12417 |
| 12469 @override | 12418 @override |
| 12470 R visitAnnotation(Annotation node) { | 12419 R visitAnnotation(Annotation node) { |
| 12471 node.visitChildren(this); | 12420 node.visitChildren(this); |
| 12472 return null; | 12421 return null; |
| 12473 } | 12422 } |
| 12474 | 12423 |
| 12475 @override | 12424 @override |
| 12476 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | |
| 12477 node.visitChildren(this); | |
| 12478 return null; | |
| 12479 } | |
| 12480 | |
| 12481 @override | |
| 12482 R visitArgumentList(ArgumentList node) { | 12425 R visitArgumentList(ArgumentList node) { |
| 12483 node.visitChildren(this); | 12426 node.visitChildren(this); |
| 12484 return null; | 12427 return null; |
| 12485 } | 12428 } |
| 12486 | 12429 |
| 12487 @override | 12430 @override |
| 12488 R visitAsExpression(AsExpression node) { | 12431 R visitAsExpression(AsExpression node) { |
| 12489 node.visitChildren(this); | 12432 node.visitChildren(this); |
| 12490 return null; | 12433 return null; |
| 12491 } | 12434 } |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13555 * structure) and that only need to visit a small number of node types. | 13498 * structure) and that only need to visit a small number of node types. |
| 13556 */ | 13499 */ |
| 13557 class SimpleAstVisitor<R> implements AstVisitor<R> { | 13500 class SimpleAstVisitor<R> implements AstVisitor<R> { |
| 13558 @override | 13501 @override |
| 13559 R visitAdjacentStrings(AdjacentStrings node) => null; | 13502 R visitAdjacentStrings(AdjacentStrings node) => null; |
| 13560 | 13503 |
| 13561 @override | 13504 @override |
| 13562 R visitAnnotation(Annotation node) => null; | 13505 R visitAnnotation(Annotation node) => null; |
| 13563 | 13506 |
| 13564 @override | 13507 @override |
| 13565 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => null; | |
| 13566 | |
| 13567 @override | |
| 13568 R visitArgumentList(ArgumentList node) => null; | 13508 R visitArgumentList(ArgumentList node) => null; |
| 13569 | 13509 |
| 13570 @override | 13510 @override |
| 13571 R visitAsExpression(AsExpression node) => null; | 13511 R visitAsExpression(AsExpression node) => null; |
| 13572 | 13512 |
| 13573 @override | 13513 @override |
| 13574 R visitAssertStatement(AssertStatement node) => null; | 13514 R visitAssertStatement(AssertStatement node) => null; |
| 13575 | 13515 |
| 13576 @override | 13516 @override |
| 13577 R visitAssignmentExpression(AssignmentExpression node) => null; | 13517 R visitAssignmentExpression(AssignmentExpression node) => null; |
| (...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15048 @override | 14988 @override |
| 15049 Object visitAnnotation(Annotation node) { | 14989 Object visitAnnotation(Annotation node) { |
| 15050 _writer.print('@'); | 14990 _writer.print('@'); |
| 15051 _visitNode(node.name); | 14991 _visitNode(node.name); |
| 15052 _visitNodeWithPrefix(".", node.constructorName); | 14992 _visitNodeWithPrefix(".", node.constructorName); |
| 15053 _visitNode(node.arguments); | 14993 _visitNode(node.arguments); |
| 15054 return null; | 14994 return null; |
| 15055 } | 14995 } |
| 15056 | 14996 |
| 15057 @override | 14997 @override |
| 15058 Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | |
| 15059 _writer.print('?'); | |
| 15060 _visitNode(node.identifier); | |
| 15061 return null; | |
| 15062 } | |
| 15063 | |
| 15064 @override | |
| 15065 Object visitArgumentList(ArgumentList node) { | 14998 Object visitArgumentList(ArgumentList node) { |
| 15066 _writer.print('('); | 14999 _writer.print('('); |
| 15067 _visitNodeListWithSeparator(node.arguments, ", "); | 15000 _visitNodeListWithSeparator(node.arguments, ", "); |
| 15068 _writer.print(')'); | 15001 _writer.print(')'); |
| 15069 return null; | 15002 return null; |
| 15070 } | 15003 } |
| 15071 | 15004 |
| 15072 @override | 15005 @override |
| 15073 Object visitAsExpression(AsExpression node) { | 15006 Object visitAsExpression(AsExpression node) { |
| 15074 _visitNode(node.expression); | 15007 _visitNode(node.expression); |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15496 _writer.print("implements "); | 15429 _writer.print("implements "); |
| 15497 _visitNodeListWithSeparator(node.interfaces, ", "); | 15430 _visitNodeListWithSeparator(node.interfaces, ", "); |
| 15498 return null; | 15431 return null; |
| 15499 } | 15432 } |
| 15500 | 15433 |
| 15501 @override | 15434 @override |
| 15502 Object visitImportDirective(ImportDirective node) { | 15435 Object visitImportDirective(ImportDirective node) { |
| 15503 _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " "); | 15436 _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " "); |
| 15504 _writer.print("import "); | 15437 _writer.print("import "); |
| 15505 _visitNode(node.uri); | 15438 _visitNode(node.uri); |
| 15439 if (node.deferredToken != null) { |
| 15440 _writer.print(" deferred"); |
| 15441 } |
| 15506 _visitNodeWithPrefix(" as ", node.prefix); | 15442 _visitNodeWithPrefix(" as ", node.prefix); |
| 15507 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); | 15443 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); |
| 15508 _writer.print(';'); | 15444 _writer.print(';'); |
| 15509 return null; | 15445 return null; |
| 15510 } | 15446 } |
| 15511 | 15447 |
| 15512 @override | 15448 @override |
| 15513 Object visitIndexExpression(IndexExpression node) { | 15449 Object visitIndexExpression(IndexExpression node) { |
| 15514 if (node.isCascaded) { | 15450 if (node.isCascaded) { |
| 15515 _writer.print(".."); | 15451 _writer.print(".."); |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16705 * cause the children of the visited node to not be visited. | 16641 * cause the children of the visited node to not be visited. |
| 16706 */ | 16642 */ |
| 16707 class UnifyingAstVisitor<R> implements AstVisitor<R> { | 16643 class UnifyingAstVisitor<R> implements AstVisitor<R> { |
| 16708 @override | 16644 @override |
| 16709 R visitAdjacentStrings(AdjacentStrings node) => visitNode(node); | 16645 R visitAdjacentStrings(AdjacentStrings node) => visitNode(node); |
| 16710 | 16646 |
| 16711 @override | 16647 @override |
| 16712 R visitAnnotation(Annotation node) => visitNode(node); | 16648 R visitAnnotation(Annotation node) => visitNode(node); |
| 16713 | 16649 |
| 16714 @override | 16650 @override |
| 16715 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitNode(node); | |
| 16716 | |
| 16717 @override | |
| 16718 R visitArgumentList(ArgumentList node) => visitNode(node); | 16651 R visitArgumentList(ArgumentList node) => visitNode(node); |
| 16719 | 16652 |
| 16720 @override | 16653 @override |
| 16721 R visitAsExpression(AsExpression node) => visitNode(node); | 16654 R visitAsExpression(AsExpression node) => visitNode(node); |
| 16722 | 16655 |
| 16723 @override | 16656 @override |
| 16724 R visitAssertStatement(AssertStatement node) => visitNode(node); | 16657 R visitAssertStatement(AssertStatement node) => visitNode(node); |
| 16725 | 16658 |
| 16726 @override | 16659 @override |
| 16727 R visitAssignmentExpression(AssignmentExpression node) => visitNode(node); | 16660 R visitAssignmentExpression(AssignmentExpression node) => visitNode(node); |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17731 _elements[index] = node; | 17664 _elements[index] = node; |
| 17732 } | 17665 } |
| 17733 void clear() { | 17666 void clear() { |
| 17734 _elements = <E> []; | 17667 _elements = <E> []; |
| 17735 } | 17668 } |
| 17736 int get length => _elements.length; | 17669 int get length => _elements.length; |
| 17737 void set length(int value) { | 17670 void set length(int value) { |
| 17738 throw new UnsupportedError("Cannot resize NodeList."); | 17671 throw new UnsupportedError("Cannot resize NodeList."); |
| 17739 } | 17672 } |
| 17740 } | 17673 } |
| OLD | NEW |