| 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 6451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6462 _interfaces.accept(visitor); | 6462 _interfaces.accept(visitor); |
| 6463 } | 6463 } |
| 6464 } | 6464 } |
| 6465 | 6465 |
| 6466 /** | 6466 /** |
| 6467 * Instances of the class `ImportDirective` represent an import directive. | 6467 * Instances of the class `ImportDirective` represent an import directive. |
| 6468 * | 6468 * |
| 6469 * <pre> | 6469 * <pre> |
| 6470 * importDirective ::= | 6470 * importDirective ::= |
| 6471 * [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';
' | 6471 * [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';
' |
| 6472 * | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combina
tor]* ';' |
| 6472 * </pre> | 6473 * </pre> |
| 6473 */ | 6474 */ |
| 6474 class ImportDirective extends NamespaceDirective { | 6475 class ImportDirective extends NamespaceDirective { |
| 6475 static Comparator<ImportDirective> COMPARATOR = (ImportDirective import1, Impo
rtDirective import2) { | 6476 static Comparator<ImportDirective> COMPARATOR = (ImportDirective import1, Impo
rtDirective import2) { |
| 6476 // | 6477 // |
| 6477 // uri | 6478 // uri |
| 6478 // | 6479 // |
| 6479 StringLiteral uri1 = import1.uri; | 6480 StringLiteral uri1 = import1.uri; |
| 6480 StringLiteral uri2 = import2.uri; | 6481 StringLiteral uri2 = import2.uri; |
| 6481 String uriStr1 = uri1.stringValue; | 6482 String uriStr1 = uri1.stringValue; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6557 if (!javaCollectionContainsAll(allHides1, allHides2)) { | 6558 if (!javaCollectionContainsAll(allHides1, allHides2)) { |
| 6558 return -1; | 6559 return -1; |
| 6559 } | 6560 } |
| 6560 if (!javaCollectionContainsAll(allShows1, allShows2)) { | 6561 if (!javaCollectionContainsAll(allShows1, allShows2)) { |
| 6561 return -1; | 6562 return -1; |
| 6562 } | 6563 } |
| 6563 return 0; | 6564 return 0; |
| 6564 }; | 6565 }; |
| 6565 | 6566 |
| 6566 /** | 6567 /** |
| 6568 * The token representing the 'deferred' token, or `null` if the imported is n
ot deferred. |
| 6569 */ |
| 6570 Token deferredToken; |
| 6571 |
| 6572 /** |
| 6567 * The token representing the 'as' token, or `null` if the imported names are
not prefixed. | 6573 * The token representing the 'as' token, or `null` if the imported names are
not prefixed. |
| 6568 */ | 6574 */ |
| 6569 Token asToken; | 6575 Token asToken; |
| 6570 | 6576 |
| 6571 /** | 6577 /** |
| 6572 * The prefix to be used with the imported names, or `null` if the imported na
mes are not | 6578 * The prefix to be used with the imported names, or `null` if the imported na
mes are not |
| 6573 * prefixed. | 6579 * prefixed. |
| 6574 */ | 6580 */ |
| 6575 SimpleIdentifier _prefix; | 6581 SimpleIdentifier _prefix; |
| 6576 | 6582 |
| 6577 /** | 6583 /** |
| 6578 * Initialize a newly created import directive. | 6584 * Initialize a newly created import directive. |
| 6579 * | 6585 * |
| 6580 * @param comment the documentation comment associated with this directive | 6586 * @param comment the documentation comment associated with this directive |
| 6581 * @param metadata the annotations associated with the directive | 6587 * @param metadata the annotations associated with the directive |
| 6582 * @param keyword the token representing the 'import' keyword | 6588 * @param keyword the token representing the 'import' keyword |
| 6583 * @param libraryUri the URI of the library being imported | 6589 * @param libraryUri the URI of the library being imported |
| 6590 * @param deferredToken the token representing the 'deferred' token |
| 6584 * @param asToken the token representing the 'as' token | 6591 * @param asToken the token representing the 'as' token |
| 6585 * @param prefix the prefix to be used with the imported names | 6592 * @param prefix the prefix to be used with the imported names |
| 6586 * @param combinators the combinators used to control how names are imported | 6593 * @param combinators the combinators used to control how names are imported |
| 6587 * @param semicolon the semicolon terminating the directive | 6594 * @param semicolon the semicolon terminating the directive |
| 6588 */ | 6595 */ |
| 6589 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, this.asToken, SimpleIdentifier prefix, List<Combinator> c
ombinators, Token semicolon) : super(comment, metadata, keyword, libraryUri, com
binators, semicolon) { | 6596 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, this.deferredToken, this.asToken, SimpleIdentifier prefix
, List<Combinator> combinators, Token semicolon) : super(comment, metadata, keyw
ord, libraryUri, combinators, semicolon) { |
| 6590 this._prefix = becomeParentOf(prefix); | 6597 this._prefix = becomeParentOf(prefix); |
| 6591 } | 6598 } |
| 6592 | 6599 |
| 6593 @override | 6600 @override |
| 6594 accept(AstVisitor visitor) => visitor.visitImportDirective(this); | 6601 accept(AstVisitor visitor) => visitor.visitImportDirective(this); |
| 6595 | 6602 |
| 6596 @override | 6603 @override |
| 6597 ImportElement get element => super.element as ImportElement; | 6604 ImportElement get element => super.element as ImportElement; |
| 6598 | 6605 |
| 6599 /** | 6606 /** |
| (...skipping 6030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12630 return nodeElement; | 12637 return nodeElement; |
| 12631 } | 12638 } |
| 12632 } | 12639 } |
| 12633 // try to get Angular specific Element | 12640 // try to get Angular specific Element |
| 12634 { | 12641 { |
| 12635 Element element = null; | 12642 Element element = null; |
| 12636 if (element != null) { | 12643 if (element != null) { |
| 12637 return element; | 12644 return element; |
| 12638 } | 12645 } |
| 12639 } | 12646 } |
| 12647 // try to get Polymer specific Element |
| 12648 { |
| 12649 Element element = null; |
| 12650 if (element != null) { |
| 12651 return element; |
| 12652 } |
| 12653 } |
| 12640 // no Element | 12654 // no Element |
| 12641 return null; | 12655 return null; |
| 12642 } | 12656 } |
| 12643 } | 12657 } |
| 12644 | 12658 |
| 12645 /** | 12659 /** |
| 12646 * Visitor that maps nodes to elements. | 12660 * Visitor that maps nodes to elements. |
| 12647 */ | 12661 */ |
| 12648 class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> { | 12662 class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> { |
| 12649 @override | 12663 @override |
| (...skipping 3112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15762 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
node.keyword, _cloneNodeList(node.hiddenNames)); | 15776 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
node.keyword, _cloneNodeList(node.hiddenNames)); |
| 15763 | 15777 |
| 15764 @override | 15778 @override |
| 15765 IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeywo
rd, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesis, _cl
oneNode(node.thenStatement), node.elseKeyword, _cloneNode(node.elseStatement)); | 15779 IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeywo
rd, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesis, _cl
oneNode(node.thenStatement), node.elseKeyword, _cloneNode(node.elseStatement)); |
| 15766 | 15780 |
| 15767 @override | 15781 @override |
| 15768 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(node.keyword, _cloneNodeList(node.interfaces)); | 15782 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(node.keyword, _cloneNodeList(node.interfaces)); |
| 15769 | 15783 |
| 15770 @override | 15784 @override |
| 15771 ImportDirective visitImportDirective(ImportDirective node) { | 15785 ImportDirective visitImportDirective(ImportDirective node) { |
| 15772 ImportDirective directive = new ImportDirective(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), node.keyword, _cloneNode(node.uri), no
de.asToken, _cloneNode(node.prefix), _cloneNodeList(node.combinators), node.semi
colon); | 15786 ImportDirective directive = new ImportDirective(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), node.keyword, _cloneNode(node.uri), no
de.deferredToken, node.asToken, _cloneNode(node.prefix), _cloneNodeList(node.com
binators), node.semicolon); |
| 15773 directive.source = node.source; | 15787 directive.source = node.source; |
| 15774 directive.uriContent = node.uriContent; | 15788 directive.uriContent = node.uriContent; |
| 15775 return directive; | 15789 return directive; |
| 15776 } | 15790 } |
| 15777 | 15791 |
| 15778 @override | 15792 @override |
| 15779 IndexExpression visitIndexExpression(IndexExpression node) { | 15793 IndexExpression visitIndexExpression(IndexExpression node) { |
| 15780 Token period = node.period; | 15794 Token period = node.period; |
| 15781 if (period == null) { | 15795 if (period == null) { |
| 15782 return new IndexExpression.forTarget(_cloneNode(node.target), node.leftBra
cket, _cloneNode(node.index), node.rightBracket); | 15796 return new IndexExpression.forTarget(_cloneNode(node.target), node.leftBra
cket, _cloneNode(node.index), node.rightBracket); |
| (...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16957 @override | 16971 @override |
| 16958 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
_mapToken(node.keyword), _cloneNodeList(node.hiddenNames)); | 16972 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
_mapToken(node.keyword), _cloneNodeList(node.hiddenNames)); |
| 16959 | 16973 |
| 16960 @override | 16974 @override |
| 16961 IfStatement visitIfStatement(IfStatement node) => new IfStatement(_mapToken(no
de.ifKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition), _map
Token(node.rightParenthesis), _cloneNode(node.thenStatement), _mapToken(node.els
eKeyword), _cloneNode(node.elseStatement)); | 16975 IfStatement visitIfStatement(IfStatement node) => new IfStatement(_mapToken(no
de.ifKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition), _map
Token(node.rightParenthesis), _cloneNode(node.thenStatement), _mapToken(node.els
eKeyword), _cloneNode(node.elseStatement)); |
| 16962 | 16976 |
| 16963 @override | 16977 @override |
| 16964 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(_mapToken(node.keyword), _cloneNodeList(node.interfaces)); | 16978 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(_mapToken(node.keyword), _cloneNodeList(node.interfaces)); |
| 16965 | 16979 |
| 16966 @override | 16980 @override |
| 16967 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapTo
ken(node.keyword), _cloneNode(node.uri), _mapToken(node.asToken), _cloneNode(nod
e.prefix), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); | 16981 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapTo
ken(node.keyword), _cloneNode(node.uri), _mapToken(node.deferredToken), _mapToke
n(node.asToken), _cloneNode(node.prefix), _cloneNodeList(node.combinators), _map
Token(node.semicolon)); |
| 16968 | 16982 |
| 16969 @override | 16983 @override |
| 16970 IndexExpression visitIndexExpression(IndexExpression node) { | 16984 IndexExpression visitIndexExpression(IndexExpression node) { |
| 16971 Token period = _mapToken(node.period); | 16985 Token period = _mapToken(node.period); |
| 16972 IndexExpression copy; | 16986 IndexExpression copy; |
| 16973 if (period == null) { | 16987 if (period == null) { |
| 16974 copy = new IndexExpression.forTarget(_cloneNode(node.target), _mapToken(no
de.leftBracket), _cloneNode(node.index), _mapToken(node.rightBracket)); | 16988 copy = new IndexExpression.forTarget(_cloneNode(node.target), _mapToken(no
de.leftBracket), _cloneNode(node.index), _mapToken(node.rightBracket)); |
| 16975 } else { | 16989 } else { |
| 16976 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
_cloneNode(node.index), _mapToken(node.rightBracket)); | 16990 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
_cloneNode(node.index), _mapToken(node.rightBracket)); |
| 16977 } | 16991 } |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17620 _elements[index] = node; | 17634 _elements[index] = node; |
| 17621 } | 17635 } |
| 17622 void clear() { | 17636 void clear() { |
| 17623 _elements = <E> []; | 17637 _elements = <E> []; |
| 17624 } | 17638 } |
| 17625 int get length => _elements.length; | 17639 int get length => _elements.length; |
| 17626 void set length(int value) { | 17640 void set length(int value) { |
| 17627 throw new UnsupportedError("Cannot resize NodeList."); | 17641 throw new UnsupportedError("Cannot resize NodeList."); |
| 17628 } | 17642 } |
| 17629 } | 17643 } |
| OLD | NEW |