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 library engine.html; | 3 library engine.html; |
4 import 'dart:collection'; | 4 import 'dart:collection'; |
5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
7 import 'source.dart'; | 7 import 'source.dart'; |
8 import 'element.dart' show HtmlElementImpl; | 8 import 'element.dart' show HtmlElementImpl; |
9 import 'engine.dart' show AnalysisEngine; | 9 import 'engine.dart' show AnalysisEngine; |
10 /** | 10 /** |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 accept(new ToSourceVisitor(writer)); | 278 accept(new ToSourceVisitor(writer)); |
279 return writer.toString(); | 279 return writer.toString(); |
280 } | 280 } |
281 | 281 |
282 /** | 282 /** |
283 * Use the given visitor to visit all of the children of this node. The childr
en will be visited | 283 * Use the given visitor to visit all of the children of this node. The childr
en will be visited |
284 * in source order. | 284 * in source order. |
285 * | 285 * |
286 * @param visitor the visitor that will be used to visit the children of this
node | 286 * @param visitor the visitor that will be used to visit the children of this
node |
287 */ | 287 */ |
288 void visitChildren(XmlVisitor<Object> visitor); | 288 void visitChildren(XmlVisitor visitor); |
289 | 289 |
290 /** | 290 /** |
291 * Make this node the parent of the given child nodes. | 291 * Make this node the parent of the given child nodes. |
292 * | 292 * |
293 * @param children the nodes that will become the children of this node | 293 * @param children the nodes that will become the children of this node |
294 * @return the nodes that were made children of this node | 294 * @return the nodes that were made children of this node |
295 */ | 295 */ |
296 List becomeParentOf(List children) { | 296 List becomeParentOf(List children) { |
297 if (children != null) { | 297 if (children != null) { |
298 for (JavaIterator iter = new JavaIterator(children); iter.hasNext;) { | 298 for (JavaIterator iter = new JavaIterator(children); iter.hasNext;) { |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 node.accept(this); | 915 node.accept(this); |
916 } | 916 } |
917 } | 917 } |
918 } | 918 } |
919 /** | 919 /** |
920 * The enumeration `TokenType` defines the types of tokens that can be returned
by the | 920 * The enumeration `TokenType` defines the types of tokens that can be returned
by the |
921 * scanner. | 921 * scanner. |
922 * | 922 * |
923 * @coverage dart.engine.html | 923 * @coverage dart.engine.html |
924 */ | 924 */ |
925 class TokenType implements Enum<TokenType> { | 925 class TokenType extends Enum<TokenType> { |
926 | 926 |
927 /** | 927 /** |
928 * The type of the token that marks the end of the input. | 928 * The type of the token that marks the end of the input. |
929 */ | 929 */ |
930 static final TokenType EOF = new TokenType_EOF('EOF', 0, ""); | 930 static final TokenType EOF = new TokenType_EOF('EOF', 0, ""); |
931 static final TokenType EQ = new TokenType('EQ', 1, "="); | 931 static final TokenType EQ = new TokenType('EQ', 1, "="); |
932 static final TokenType GT = new TokenType('GT', 2, ">"); | 932 static final TokenType GT = new TokenType('GT', 2, ">"); |
933 static final TokenType LT_SLASH = new TokenType('LT_SLASH', 3, "</"); | 933 static final TokenType LT_SLASH = new TokenType('LT_SLASH', 3, "</"); |
934 static final TokenType LT = new TokenType('LT', 4, "<"); | 934 static final TokenType LT = new TokenType('LT', 4, "<"); |
935 static final TokenType SLASH_GT = new TokenType('SLASH_GT', 5, "/>"); | 935 static final TokenType SLASH_GT = new TokenType('SLASH_GT', 5, "/>"); |
(...skipping 10 matching lines...) Expand all Loading... |
946 LT_SLASH, | 946 LT_SLASH, |
947 LT, | 947 LT, |
948 SLASH_GT, | 948 SLASH_GT, |
949 COMMENT, | 949 COMMENT, |
950 DECLARATION, | 950 DECLARATION, |
951 DIRECTIVE, | 951 DIRECTIVE, |
952 STRING, | 952 STRING, |
953 TAG, | 953 TAG, |
954 TEXT]; | 954 TEXT]; |
955 | 955 |
956 /// The name of this enum constant, as declared in the enum declaration. | |
957 final String name; | |
958 | |
959 /// The position in the enum declaration. | |
960 final int ordinal; | |
961 | |
962 /** | 956 /** |
963 * The lexeme that defines this type of token, or `null` if there is more than
one possible | 957 * The lexeme that defines this type of token, or `null` if there is more than
one possible |
964 * lexeme for this type of token. | 958 * lexeme for this type of token. |
965 */ | 959 */ |
966 String _lexeme; | 960 String _lexeme; |
967 TokenType(this.name, this.ordinal, String lexeme) { | 961 TokenType(String name, int ordinal, String lexeme) : super(name, ordinal) { |
968 this._lexeme = lexeme; | 962 this._lexeme = lexeme; |
969 } | 963 } |
970 | 964 |
971 /** | 965 /** |
972 * Return the lexeme that defines this type of token, or `null` if there is mo
re than one | 966 * Return the lexeme that defines this type of token, or `null` if there is mo
re than one |
973 * possible lexeme for this type of token. | 967 * possible lexeme for this type of token. |
974 * | 968 * |
975 * @return the lexeme that defines this type of token | 969 * @return the lexeme that defines this type of token |
976 */ | 970 */ |
977 String get lexeme => _lexeme; | 971 String get lexeme => _lexeme; |
978 int compareTo(TokenType other) => ordinal - other.ordinal; | |
979 int get hashCode => ordinal; | |
980 String toString() => name; | |
981 } | 972 } |
982 class TokenType_EOF extends TokenType { | 973 class TokenType_EOF extends TokenType { |
983 TokenType_EOF(String name, int ordinal, String arg0) : super(name, ordinal, ar
g0); | 974 TokenType_EOF(String name, int ordinal, String arg0) : super(name, ordinal, ar
g0); |
984 String toString() => "-eof-"; | 975 String toString() => "-eof-"; |
985 } | 976 } |
986 /** | 977 /** |
987 * Instances of `XmlAttributeNode` represent name/value pairs owned by an [XmlTa
gNode]. | 978 * Instances of `XmlAttributeNode` represent name/value pairs owned by an [XmlTa
gNode]. |
988 * | 979 * |
989 * @coverage dart.engine.html | 980 * @coverage dart.engine.html |
990 */ | 981 */ |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 return text; | 1045 return text; |
1055 } | 1046 } |
1056 | 1047 |
1057 /** | 1048 /** |
1058 * Answer the attribute value. A properly formed value will start and end with
matching quote | 1049 * Answer the attribute value. A properly formed value will start and end with
matching quote |
1059 * characters, but the value returned may not be properly formed. | 1050 * characters, but the value returned may not be properly formed. |
1060 * | 1051 * |
1061 * @return the value or `null` if this represents a badly formed attribute | 1052 * @return the value or `null` if this represents a badly formed attribute |
1062 */ | 1053 */ |
1063 Token get value => _value; | 1054 Token get value => _value; |
1064 void visitChildren(XmlVisitor<Object> visitor) { | 1055 void visitChildren(XmlVisitor visitor) { |
1065 } | 1056 } |
1066 } | 1057 } |
1067 /** | 1058 /** |
1068 * The interface `XmlVisitor` defines the behavior of objects that can be used t
o visit an | 1059 * The interface `XmlVisitor` defines the behavior of objects that can be used t
o visit an |
1069 * [XmlNode] structure. | 1060 * [XmlNode] structure. |
1070 * | 1061 * |
1071 * @coverage dart.engine.html | 1062 * @coverage dart.engine.html |
1072 */ | 1063 */ |
1073 abstract class XmlVisitor<R> { | 1064 abstract class XmlVisitor<R> { |
1074 R visitHtmlUnit(HtmlUnit htmlUnit); | 1065 R visitHtmlUnit(HtmlUnit htmlUnit); |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 */ | 1608 */ |
1618 Token get tag => _tag; | 1609 Token get tag => _tag; |
1619 | 1610 |
1620 /** | 1611 /** |
1621 * Answer the tag nodes contained in the receiver. Callers should not manipula
te the returned list | 1612 * Answer the tag nodes contained in the receiver. Callers should not manipula
te the returned list |
1622 * to edit the AST structure. | 1613 * to edit the AST structure. |
1623 * | 1614 * |
1624 * @return the children (not `null`, contains no `null`s) | 1615 * @return the children (not `null`, contains no `null`s) |
1625 */ | 1616 */ |
1626 List<XmlTagNode> get tagNodes => _tagNodes; | 1617 List<XmlTagNode> get tagNodes => _tagNodes; |
1627 void visitChildren(XmlVisitor<Object> visitor) { | 1618 void visitChildren(XmlVisitor visitor) { |
1628 for (XmlAttributeNode node in _attributes) { | 1619 for (XmlAttributeNode node in _attributes) { |
1629 node.accept(visitor); | 1620 node.accept(visitor); |
1630 } | 1621 } |
1631 for (XmlTagNode node in _tagNodes) { | 1622 for (XmlTagNode node in _tagNodes) { |
1632 node.accept(visitor); | 1623 node.accept(visitor); |
1633 } | 1624 } |
1634 } | 1625 } |
1635 | 1626 |
1636 /** | 1627 /** |
1637 * Same as [becomeParentOf], but returns given "ifEmpty" if "children" is empt
y | 1628 * Same as [becomeParentOf], but returns given "ifEmpty" if "children" is empt
y |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 List<XmlTagNode> get tagNodes => _tagNodes; | 1737 List<XmlTagNode> get tagNodes => _tagNodes; |
1747 | 1738 |
1748 /** | 1739 /** |
1749 * Set the element associated with this HTML unit. | 1740 * Set the element associated with this HTML unit. |
1750 * | 1741 * |
1751 * @param element the element | 1742 * @param element the element |
1752 */ | 1743 */ |
1753 void set element(HtmlElementImpl element2) { | 1744 void set element(HtmlElementImpl element2) { |
1754 this._element = element2; | 1745 this._element = element2; |
1755 } | 1746 } |
1756 void visitChildren(XmlVisitor<Object> visitor) { | 1747 void visitChildren(XmlVisitor visitor) { |
1757 for (XmlTagNode node in _tagNodes) { | 1748 for (XmlTagNode node in _tagNodes) { |
1758 node.accept(visitor); | 1749 node.accept(visitor); |
1759 } | 1750 } |
1760 } | 1751 } |
1761 } | 1752 } |
OLD | NEW |