| Index: pkg/analyzer_experimental/lib/src/generated/html.dart
|
| diff --git a/pkg/analyzer_experimental/lib/src/generated/html.dart b/pkg/analyzer_experimental/lib/src/generated/html.dart
|
| index c667f7bb4986f308f40f0fe11763a939d063c8a9..7e1d62ab8480f605032e3948907f9b0bb50bb45a 100644
|
| --- a/pkg/analyzer_experimental/lib/src/generated/html.dart
|
| +++ b/pkg/analyzer_experimental/lib/src/generated/html.dart
|
| @@ -12,6 +12,7 @@ import 'engine.dart' show AnalysisEngine;
|
| /**
|
| * Instances of the class `Token` represent a token that was scanned from the input. Each
|
| * token knows which token follows it, acting as the head of a linked list of tokens.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class Token {
|
| @@ -43,6 +44,7 @@ class Token {
|
|
|
| /**
|
| * Initialize a newly created token.
|
| + *
|
| * @param type the token type (not `null`)
|
| * @param offset the offset from the beginning of the file to the first character in the token
|
| */
|
| @@ -55,6 +57,7 @@ class Token {
|
|
|
| /**
|
| * Initialize a newly created token.
|
| + *
|
| * @param type the token type (not `null`)
|
| * @param offset the offset from the beginning of the file to the first character in the token
|
| * @param value the lexeme represented by this token (not `null`)
|
| @@ -71,43 +74,50 @@ class Token {
|
| /**
|
| * Return the offset from the beginning of the file to the character after last character of the
|
| * token.
|
| + *
|
| * @return the offset from the beginning of the file to the first character after last character
|
| - * of the token
|
| + * of the token
|
| */
|
| int get end => _offset + length;
|
|
|
| /**
|
| * Return the number of characters in the node's source range.
|
| + *
|
| * @return the number of characters in the node's source range
|
| */
|
| int get length => lexeme.length;
|
|
|
| /**
|
| * Return the lexeme that represents this token.
|
| + *
|
| * @return the lexeme (not `null`)
|
| */
|
| String get lexeme => _value;
|
|
|
| /**
|
| * Return the next token in the token stream.
|
| + *
|
| * @return the next token in the token stream
|
| */
|
| Token get next => _next;
|
|
|
| /**
|
| * Return the offset from the beginning of the file to the first character in the token.
|
| + *
|
| * @return the offset from the beginning of the file to the first character in the token
|
| */
|
| int get offset => _offset;
|
|
|
| /**
|
| * Return the previous token in the token stream.
|
| + *
|
| * @return the previous token in the token stream
|
| */
|
| Token get previous => _previous;
|
|
|
| /**
|
| * Answer the token type for the receiver.
|
| + *
|
| * @return the token type (not `null`)
|
| */
|
| TokenType get type => _type;
|
| @@ -116,6 +126,7 @@ class Token {
|
| * Return `true` if this token is a synthetic token. A synthetic token is a token that was
|
| * introduced by the parser in order to recover from an error in the code. Synthetic tokens always
|
| * have a length of zero (`0`).
|
| + *
|
| * @return `true` if this token is a synthetic token
|
| */
|
| bool get isSynthetic => length == 0;
|
| @@ -123,6 +134,7 @@ class Token {
|
| /**
|
| * Set the next token in the token stream to the given token. This has the side-effect of setting
|
| * this token to be the previous token for the given token.
|
| + *
|
| * @param token the next token in the token stream
|
| * @return the token that was passed in
|
| */
|
| @@ -135,6 +147,7 @@ class Token {
|
|
|
| /**
|
| * Set the previous token in the token stream to the given token.
|
| + *
|
| * @param previous the previous token in the token stream
|
| */
|
| void set previous(Token previous2) {
|
| @@ -143,6 +156,7 @@ class Token {
|
| }
|
| /**
|
| * Instances of `HtmlParseResult` hold the result of parsing an HTML file.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class HtmlParseResult extends HtmlScanResult {
|
| @@ -157,6 +171,7 @@ class HtmlParseResult extends HtmlScanResult {
|
|
|
| /**
|
| * Answer the unit generated by parsing the source
|
| + *
|
| * @return the unit (not `null`)
|
| */
|
| HtmlUnit get htmlUnit => _unit;
|
| @@ -164,11 +179,13 @@ class HtmlParseResult extends HtmlScanResult {
|
| /**
|
| * Instances of the class `RecursiveXmlVisitor` implement an XML visitor that will recursively
|
| * visit all of the nodes in an XML structure. For example, using an instance of this class to visit
|
| - * a [XmlTagNode] will also cause all of the contained [XmlAttributeNode]s and[XmlTagNode]s to be visited.
|
| + * a [XmlTagNode] will also cause all of the contained [XmlAttributeNode]s and
|
| + * [XmlTagNode]s to be visited.
|
| *
|
| * Subclasses that override a visit method must either invoke the overridden visit method or must
|
| * explicitly ask the visited node to visit its children. Failure to do so will cause the children
|
| * of the visited node to not be visited.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class RecursiveXmlVisitor<R> implements XmlVisitor<R> {
|
| @@ -187,6 +204,7 @@ class RecursiveXmlVisitor<R> implements XmlVisitor<R> {
|
| }
|
| /**
|
| * The abstract class `XmlNode` defines behavior common to all XML/HTML nodes.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| abstract class XmlNode {
|
| @@ -198,6 +216,7 @@ abstract class XmlNode {
|
|
|
| /**
|
| * Use the given visitor to visit this node.
|
| + *
|
| * @param visitor the visitor that will visit this node
|
| * @return the value returned by the visitor as a result of visiting this node
|
| */
|
| @@ -205,6 +224,7 @@ abstract class XmlNode {
|
|
|
| /**
|
| * Return the first token included in this node's source range.
|
| + *
|
| * @return the first token or `null` if none
|
| */
|
| Token get beginToken;
|
| @@ -213,18 +233,21 @@ abstract class XmlNode {
|
| * Return the offset of the character immediately following the last character of this node's
|
| * source range. This is equivalent to `node.getOffset() + node.getLength()`. For an html
|
| * unit this will be equal to the length of the unit's source.
|
| + *
|
| * @return the offset of the character just past the node's source range
|
| */
|
| int get end => offset + length;
|
|
|
| /**
|
| * Return the last token included in this node's source range.
|
| + *
|
| * @return the last token or `null` if none
|
| */
|
| Token get endToken;
|
|
|
| /**
|
| * Return the number of characters in the node's source range.
|
| + *
|
| * @return the number of characters in the node's source range
|
| */
|
| int get length {
|
| @@ -239,8 +262,9 @@ abstract class XmlNode {
|
| /**
|
| * Return the offset from the beginning of the file to the first character in the node's source
|
| * range.
|
| + *
|
| * @return the offset from the beginning of the file to the first character in the node's source
|
| - * range
|
| + * range
|
| */
|
| int get offset {
|
| Token beginToken = this.beginToken;
|
| @@ -255,6 +279,7 @@ abstract class XmlNode {
|
| *
|
| * Note that the relationship between an AST node and its parent node may change over the lifetime
|
| * of a node.
|
| + *
|
| * @return the parent of this node, or `null` if none
|
| */
|
| XmlNode get parent => _parent;
|
| @@ -267,12 +292,14 @@ abstract class XmlNode {
|
| /**
|
| * Use the given visitor to visit all of the children of this node. The children will be visited
|
| * in source order.
|
| + *
|
| * @param visitor the visitor that will be used to visit the children of this node
|
| */
|
| void visitChildren(XmlVisitor<Object> visitor);
|
|
|
| /**
|
| * Make this node the parent of the given child nodes.
|
| + *
|
| * @param children the nodes that will become the children of this node
|
| * @return the nodes that were made children of this node
|
| */
|
| @@ -289,6 +316,7 @@ abstract class XmlNode {
|
|
|
| /**
|
| * Make this node the parent of the given child node.
|
| + *
|
| * @param child the node that will become a child of this node
|
| * @return the node that was made a child of this node
|
| */
|
| @@ -338,6 +366,7 @@ abstract class XmlNode {
|
|
|
| /**
|
| * Set the parent of this node to the given node.
|
| + *
|
| * @param newParent the node that is to be made the parent of this node
|
| */
|
| void set parent(XmlNode newParent) {
|
| @@ -366,6 +395,7 @@ class SimpleXmlVisitor<R> implements XmlVisitor<R> {
|
| /**
|
| * The abstract class `AbstractScanner` implements a scanner for HTML code. Subclasses are
|
| * required to implement the interface used to access the characters being scanned.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| abstract class AbstractScanner {
|
| @@ -398,6 +428,7 @@ abstract class AbstractScanner {
|
|
|
| /**
|
| * Initialize a newly created scanner.
|
| + *
|
| * @param source the source being scanned
|
| */
|
| AbstractScanner(Source source) {
|
| @@ -410,6 +441,7 @@ abstract class AbstractScanner {
|
|
|
| /**
|
| * Return an array containing the offsets of the first character of each line in the source code.
|
| + *
|
| * @return an array containing the offsets of the first character of each line in the source code
|
| */
|
| List<int> get lineStarts => _lineStarts;
|
| @@ -418,12 +450,14 @@ abstract class AbstractScanner {
|
| * Return the current offset relative to the beginning of the file. Return the initial offset if
|
| * the scanner has not yet scanned the source code, and one (1) past the end of the source code if
|
| * the source code has been scanned.
|
| + *
|
| * @return the current offset of the scanner in the source
|
| */
|
| int get offset;
|
|
|
| /**
|
| * Answer the source being scanned.
|
| + *
|
| * @return the source or `null` if undefined
|
| */
|
| Source get source => _source;
|
| @@ -437,6 +471,7 @@ abstract class AbstractScanner {
|
|
|
| /**
|
| * Scan the source code to produce a list of tokens representing the source.
|
| + *
|
| * @return the first token in the list of tokens that were produced
|
| */
|
| Token tokenize() {
|
| @@ -447,6 +482,7 @@ abstract class AbstractScanner {
|
|
|
| /**
|
| * Advance the current position and return the character at the new current position.
|
| + *
|
| * @return the character at the new current position
|
| */
|
| int advance();
|
| @@ -454,16 +490,18 @@ abstract class AbstractScanner {
|
| /**
|
| * Return the substring of the source code between the start offset and the modified current
|
| * position. The current position is modified by adding the end delta.
|
| + *
|
| * @param start the offset to the beginning of the string, relative to the start of the file
|
| * @param endDelta the number of character after the current location to be included in the
|
| - * string, or the number of characters before the current location to be excluded if the
|
| - * offset is negative
|
| + * string, or the number of characters before the current location to be excluded if the
|
| + * offset is negative
|
| * @return the specified substring of the source code
|
| */
|
| String getString(int start, int endDelta);
|
|
|
| /**
|
| * Return the character at the current position without changing the current position.
|
| + *
|
| * @return the character at the current position
|
| */
|
| int peek();
|
| @@ -639,6 +677,7 @@ abstract class AbstractScanner {
|
| }
|
| /**
|
| * Instances of `HtmlScanResult` hold the result of scanning an HTML file.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class HtmlScanResult {
|
| @@ -665,18 +704,21 @@ class HtmlScanResult {
|
|
|
| /**
|
| * Answer the line start information that was produced.
|
| + *
|
| * @return an array of line starts (not `null`)
|
| */
|
| List<int> get lineStarts => _lineStarts;
|
|
|
| /**
|
| * Return the time at which the contents of the source were last set.
|
| + *
|
| * @return the time at which the contents of the source were last set
|
| */
|
| int get modificationTime => _modificationTime;
|
|
|
| /**
|
| * Answer the first token in the token stream.
|
| + *
|
| * @return the token (not `null`)
|
| */
|
| Token get token => _token;
|
| @@ -684,6 +726,7 @@ class HtmlScanResult {
|
| /**
|
| * Instances of the class `StringScanner` implement a scanner that reads from a string. The
|
| * scanning logic is in the superclass.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class StringScanner extends AbstractScanner {
|
| @@ -705,6 +748,7 @@ class StringScanner extends AbstractScanner {
|
|
|
| /**
|
| * Initialize a newly created scanner to scan the characters in the given string.
|
| + *
|
| * @param source the source being scanned
|
| * @param string the string from which characters will be read
|
| */
|
| @@ -735,6 +779,7 @@ class StringScanner extends AbstractScanner {
|
| /**
|
| * Instances of the class `CharBufferScanner` implement a scanner that reads from a character
|
| * buffer. The scanning logic is in the superclass.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class CharBufferScanner extends AbstractScanner {
|
| @@ -756,6 +801,7 @@ class CharBufferScanner extends AbstractScanner {
|
|
|
| /**
|
| * Initialize a newly created scanner to scan the characters in the given character buffer.
|
| + *
|
| * @param source the source being scanned
|
| * @param buffer the buffer from which characters will be read
|
| */
|
| @@ -783,6 +829,7 @@ class CharBufferScanner extends AbstractScanner {
|
| /**
|
| * Instances of the class `ToSourceVisitor` write a source representation of a visited XML
|
| * node (and all of it's children) to a writer.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class ToSourceVisitor implements XmlVisitor<Object> {
|
| @@ -795,6 +842,7 @@ class ToSourceVisitor implements XmlVisitor<Object> {
|
| /**
|
| * Initialize a newly created visitor to write source code representing the visited nodes to the
|
| * given writer.
|
| + *
|
| * @param writer the writer to which the source is to be written
|
| */
|
| ToSourceVisitor(PrintWriter writer) {
|
| @@ -844,6 +892,7 @@ class ToSourceVisitor implements XmlVisitor<Object> {
|
|
|
| /**
|
| * Safely visit the given node.
|
| + *
|
| * @param node the node to be visited
|
| */
|
| void visit(XmlNode node) {
|
| @@ -855,6 +904,7 @@ class ToSourceVisitor implements XmlVisitor<Object> {
|
| /**
|
| * The enumeration `TokenType` defines the types of tokens that can be returned by the
|
| * scanner.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class TokenType implements Comparable<TokenType> {
|
| @@ -894,6 +944,7 @@ class TokenType implements Comparable<TokenType> {
|
| /**
|
| * Return the lexeme that defines this type of token, or `null` if there is more than one
|
| * possible lexeme for this type of token.
|
| + *
|
| * @return the lexeme that defines this type of token
|
| */
|
| String get lexeme => _lexeme;
|
| @@ -907,6 +958,7 @@ class TokenType_EOF extends TokenType {
|
| }
|
| /**
|
| * Instances of `XmlAttributeNode` represent name/value pairs owned by an [XmlTagNode].
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class XmlAttributeNode extends XmlNode {
|
| @@ -916,8 +968,9 @@ class XmlAttributeNode extends XmlNode {
|
|
|
| /**
|
| * Construct a new instance representing an XML attribute.
|
| + *
|
| * @param name the name token (not `null`). This may be a zero length token if the attribute
|
| - * is badly formed.
|
| + * is badly formed.
|
| * @param equals the equals sign or `null` if none
|
| * @param value the value token (not `null`)
|
| */
|
| @@ -931,19 +984,23 @@ class XmlAttributeNode extends XmlNode {
|
| Token get endToken => _value;
|
|
|
| /**
|
| - * Answer the equals sign token that appears between the name and value tokens. This may be`null` if the attribute is badly formed.
|
| + * Answer the equals sign token that appears between the name and value tokens. This may be
|
| + * `null` if the attribute is badly formed.
|
| + *
|
| * @return the token or `null` if there is no equals sign between the name and value
|
| */
|
| Token get equals => _equals;
|
|
|
| /**
|
| * Answer the attribute name. This may be a zero length token if the attribute is badly formed.
|
| + *
|
| * @return the name (not `null`)
|
| */
|
| Token get name => _name;
|
|
|
| /**
|
| * Answer the lexeme for the value token without the leading and trailing quotes.
|
| + *
|
| * @return the text or `null` if the value is not specified
|
| */
|
| String get text {
|
| @@ -973,6 +1030,7 @@ class XmlAttributeNode extends XmlNode {
|
| /**
|
| * Answer the attribute value. A properly formed value will start and end with matching quote
|
| * characters, but the value returned may not be properly formed.
|
| + *
|
| * @return the value or `null` if this represents a badly formed attribute
|
| */
|
| Token get value => _value;
|
| @@ -980,7 +1038,9 @@ class XmlAttributeNode extends XmlNode {
|
| }
|
| }
|
| /**
|
| - * The interface `XmlVisitor` defines the behavior of objects that can be used to visit an[XmlNode] structure.
|
| + * The interface `XmlVisitor` defines the behavior of objects that can be used to visit an
|
| + * [XmlNode] structure.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| abstract class XmlVisitor<R> {
|
| @@ -991,11 +1051,13 @@ abstract class XmlVisitor<R> {
|
| /**
|
| * Instances of `HtmlScanner` receive and scan HTML content from a [Source].<br/>
|
| * For example, the following code scans HTML source and returns the result:
|
| + *
|
| * <pre>
|
| - * HtmlScanner scanner = new HtmlScanner(source);
|
| - * source.getContents(scanner);
|
| - * return scanner.getResult();
|
| + * HtmlScanner scanner = new HtmlScanner(source);
|
| + * source.getContents(scanner);
|
| + * return scanner.getResult();
|
| * </pre>
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class HtmlScanner implements Source_ContentReceiver {
|
| @@ -1023,6 +1085,7 @@ class HtmlScanner implements Source_ContentReceiver {
|
|
|
| /**
|
| * Construct a new instance to scan the specified source.
|
| + *
|
| * @param source the source to be scanned (not `null`)
|
| */
|
| HtmlScanner(Source source) {
|
| @@ -1043,6 +1106,7 @@ class HtmlScanner implements Source_ContentReceiver {
|
|
|
| /**
|
| * Answer the result of scanning the source
|
| + *
|
| * @return the result (not `null`)
|
| */
|
| HtmlScanResult get result => new HtmlScanResult(_modificationTime, _token, _scanner.lineStarts);
|
| @@ -1050,6 +1114,7 @@ class HtmlScanner implements Source_ContentReceiver {
|
| /**
|
| * Instances of the class `XmlParser` are used to parse tokens into a AST structure comprised
|
| * of [XmlNode]s.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class XmlParser {
|
| @@ -1066,6 +1131,7 @@ class XmlParser {
|
|
|
| /**
|
| * Construct a parser for the specified source.
|
| + *
|
| * @param source the source being parsed
|
| */
|
| XmlParser(Source source) {
|
| @@ -1074,6 +1140,7 @@ class XmlParser {
|
|
|
| /**
|
| * Answer the source being parsed.
|
| + *
|
| * @return the source
|
| */
|
| Source get source => _source;
|
| @@ -1081,6 +1148,7 @@ class XmlParser {
|
| /**
|
| * Answer `true` if the specified tag is self closing and thus should never have content or
|
| * child tag nodes.
|
| + *
|
| * @param tag the tag (not `null`)
|
| * @return `true` if self closing
|
| */
|
| @@ -1089,6 +1157,7 @@ class XmlParser {
|
| /**
|
| * Parse the entire token stream and in the process, advance the current token to the end of the
|
| * token stream.
|
| + *
|
| * @return the list of tag nodes found (not `null`, contains no `null`)
|
| */
|
| List<XmlTagNode> parseTopTagNodes(Token firstToken) {
|
| @@ -1113,12 +1182,14 @@ class XmlParser {
|
|
|
| /**
|
| * Answer the current token.
|
| + *
|
| * @return the current token
|
| */
|
| Token get currentToken => _currentToken;
|
|
|
| /**
|
| * Insert a synthetic token of the specified type before the current token
|
| + *
|
| * @param type the type of token to be inserted (not `null`)
|
| * @return the synthetic token that was inserted (not `null`)
|
| */
|
| @@ -1132,6 +1203,7 @@ class XmlParser {
|
| /**
|
| * Parse the token stream for an attribute. This method advances the current token over the
|
| * attribute, but should not be called if the [currentToken] is not [TokenType#TAG].
|
| + *
|
| * @return the attribute (not `null`)
|
| */
|
| XmlAttributeNode parseAttribute() {
|
| @@ -1159,6 +1231,7 @@ class XmlParser {
|
| /**
|
| * Parse the stream for a sequence of attributes. This method advances the current token to the
|
| * next [TokenType#GT], [TokenType#SLASH_GT], or [TokenType#EOF].
|
| + *
|
| * @return a collection of zero or more attributes (not `null`, contains no `null`s)
|
| */
|
| List<XmlAttributeNode> parseAttributes() {
|
| @@ -1185,6 +1258,7 @@ class XmlParser {
|
| /**
|
| * Parse the stream for a sequence of tag nodes existing within a parent tag node. This method
|
| * advances the current token to the next [TokenType#LT_SLASH] or [TokenType#EOF].
|
| + *
|
| * @return a list of nodes (not `null`, contains no `null`s)
|
| */
|
| List<XmlTagNode> parseChildTagNodes() {
|
| @@ -1213,6 +1287,7 @@ class XmlParser {
|
| /**
|
| * Parse the token stream for the next tag node. This method advances current token over the
|
| * parsed tag node, but should only be called if the current token is [TokenType#LT]
|
| + *
|
| * @return the tag node or `null` if none found
|
| */
|
| XmlTagNode parseTagNode() {
|
| @@ -1273,7 +1348,9 @@ class XmlParser {
|
| }
|
| }
|
| /**
|
| - * Instances of `XmlTagNode` represent XML or HTML elements such as `` and`<body foo="bar"> ... </body>`.
|
| + * Instances of `XmlTagNode` represent XML or HTML elements such as `` and
|
| + * `<body foo="bar"> ... </body>`.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class XmlTagNode extends XmlNode {
|
| @@ -1304,7 +1381,9 @@ class XmlTagNode extends XmlNode {
|
| List<XmlAttributeNode> _attributes;
|
|
|
| /**
|
| - * The [TokenType#GT] or [TokenType#SLASH_GT] token after the attributes (not`null`). The token may be the same token as [nodeEnd] if there are no child[tagNodes].
|
| + * The [TokenType#GT] or [TokenType#SLASH_GT] token after the attributes (not
|
| + * `null`). The token may be the same token as [nodeEnd] if there are no child
|
| + * [tagNodes].
|
| */
|
| Token _attributeEnd;
|
|
|
| @@ -1339,25 +1418,29 @@ class XmlTagNode extends XmlNode {
|
|
|
| /**
|
| * Construct a new instance representing an XML or HTML element
|
| + *
|
| * @param nodeStart the starting [TokenType#LT] token (not `null`)
|
| * @param tag the [TokenType#TAG] token after the starting '<' (not `null`).
|
| - * @param attributes the attributes associated with this element or [NO_ATTRIBUTES] (not`null`, contains no `null`s)
|
| + * @param attributes the attributes associated with this element or [NO_ATTRIBUTES] (not
|
| + * `null`, contains no `null`s)
|
| * @param attributeEnd The [TokenType#GT] or [TokenType#SLASH_GT] token after the
|
| - * attributes (not `null`). The token may be the same token as [nodeEnd] if
|
| - * there are no child [tagNodes].
|
| + * attributes (not `null`). The token may be the same token as [nodeEnd] if
|
| + * there are no child [tagNodes].
|
| * @param tagNodes child tag nodes of the receiver or [NO_TAG_NODES] (not `null`,
|
| - * contains no `null`s)
|
| + * contains no `null`s)
|
| * @param contentEnd the token (not `null`) after the content, which may be
|
| *
|
| - * * (1) [TokenType#LT_SLASH] for nodes with open and close tags, or
|
| - * * (2) the [TokenType#LT] nodeStart of the next sibling node if this node is
|
| - * self closing or the attributeEnd is [TokenType#SLASH_GT], or
|
| - * * (3) [TokenType#EOF] if the node does not have a closing tag and is the last
|
| - * node in the stream [TokenType#LT_SLASH] token after the content, or `null`if there is no content and the attributes ended with [TokenType#SLASH_GT].
|
| + * * (1) [TokenType#LT_SLASH] for nodes with open and close tags, or
|
| + * * (2) the [TokenType#LT] nodeStart of the next sibling node if this node is
|
| + * self closing or the attributeEnd is [TokenType#SLASH_GT], or
|
| + * * (3) [TokenType#EOF] if the node does not have a closing tag and is the last
|
| + * node in the stream [TokenType#LT_SLASH] token after the content, or `null`
|
| + * if there is no content and the attributes ended with [TokenType#SLASH_GT].
|
| *
|
| * @param closingTag the closing [TokenType#TAG] after the child elements or `null` if
|
| - * there is no content and the attributes ended with [TokenType#SLASH_GT]
|
| - * @param nodeEnd the ending [TokenType#GT] or [TokenType#SLASH_GT] token (not`null`)
|
| + * there is no content and the attributes ended with [TokenType#SLASH_GT]
|
| + * @param nodeEnd the ending [TokenType#GT] or [TokenType#SLASH_GT] token (not
|
| + * `null`)
|
| */
|
| XmlTagNode(Token nodeStart, Token tag, List<XmlAttributeNode> attributes, Token attributeEnd, List<XmlTagNode> tagNodes, Token contentEnd, Token closingTag, Token nodeEnd) {
|
| this._nodeStart = nodeStart;
|
| @@ -1373,6 +1456,7 @@ class XmlTagNode extends XmlNode {
|
|
|
| /**
|
| * Answer the attribute with the specified name.
|
| + *
|
| * @param name the attribute name
|
| * @return the attribute or `null` if no matching attribute is found
|
| */
|
| @@ -1386,7 +1470,10 @@ class XmlTagNode extends XmlNode {
|
| }
|
|
|
| /**
|
| - * The [TokenType#GT] or [TokenType#SLASH_GT] token after the attributes (not`null`). The token may be the same token as [nodeEnd] if there are no child[tagNodes].
|
| + * The [TokenType#GT] or [TokenType#SLASH_GT] token after the attributes (not
|
| + * `null`). The token may be the same token as [nodeEnd] if there are no child
|
| + * [tagNodes].
|
| + *
|
| * @return the token (not `null`)
|
| */
|
| Token get attributeEnd => _attributeEnd;
|
| @@ -1394,13 +1481,16 @@ class XmlTagNode extends XmlNode {
|
| /**
|
| * Answer the receiver's attributes. Callers should not manipulate the returned list to edit the
|
| * AST structure.
|
| + *
|
| * @return the attributes (not `null`, contains no `null`s)
|
| */
|
| List<XmlAttributeNode> get attributes => _attributes;
|
|
|
| /**
|
| * Find the attribute with the given name (see [getAttribute] and answer the lexeme
|
| - * for the attribute's value token without the leading and trailing quotes (see[XmlAttributeNode#getText]).
|
| + * for the attribute's value token without the leading and trailing quotes (see
|
| + * [XmlAttributeNode#getText]).
|
| + *
|
| * @param name the attribute name
|
| * @return the attribute text or `null` if no matching attribute is found
|
| */
|
| @@ -1413,6 +1503,7 @@ class XmlTagNode extends XmlNode {
|
| /**
|
| * The the closing [TokenType#TAG] after the child elements or `null` if there is no
|
| * content and the attributes ended with [TokenType#SLASH_GT]
|
| + *
|
| * @return the closing tag or `null`
|
| */
|
| Token get closingTag => _closingTag;
|
| @@ -1421,6 +1512,7 @@ class XmlTagNode extends XmlNode {
|
| * Answer a string representing the content contained in the receiver. This includes the textual
|
| * representation of any child tag nodes ([getTagNodes]). Whitespace between '<',
|
| * '</', and '>', '/>' is discarded, but all other whitespace is preserved.
|
| + *
|
| * @return the content (not `null`)
|
| */
|
| String get content {
|
| @@ -1451,6 +1543,7 @@ class XmlTagNode extends XmlNode {
|
| * the stream [TokenType#LT_SLASH] token after the content, or `null` if there is no
|
| * content and the attributes ended with [TokenType#SLASH_GT].
|
| *
|
| + *
|
| * @return the token (not `null`)
|
| */
|
| Token get contentEnd => _contentEnd;
|
| @@ -1478,18 +1571,21 @@ class XmlTagNode extends XmlNode {
|
|
|
| /**
|
| * Answer the ending [TokenType#GT] or [TokenType#SLASH_GT] token.
|
| + *
|
| * @return the token (not `null`)
|
| */
|
| Token get nodeEnd => _nodeEnd;
|
|
|
| /**
|
| * Answer the starting [TokenType#LT] token.
|
| + *
|
| * @return the token (not `null`)
|
| */
|
| Token get nodeStart => _nodeStart;
|
|
|
| /**
|
| * Answer the [TokenType#TAG] token after the starting '<'.
|
| + *
|
| * @return the token (not `null`)
|
| */
|
| Token get tag => _tag;
|
| @@ -1497,6 +1593,7 @@ class XmlTagNode extends XmlNode {
|
| /**
|
| * Answer the tag nodes contained in the receiver. Callers should not manipulate the returned list
|
| * to edit the AST structure.
|
| + *
|
| * @return the children (not `null`, contains no `null`s)
|
| */
|
| List<XmlTagNode> get tagNodes => _tagNodes;
|
| @@ -1522,6 +1619,7 @@ class XmlTagNode extends XmlNode {
|
| /**
|
| * Instances of the class `HtmlParser` are used to parse tokens into a AST structure comprised
|
| * of [XmlNode]s.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class HtmlParser extends XmlParser {
|
| @@ -1529,6 +1627,7 @@ class HtmlParser extends XmlParser {
|
|
|
| /**
|
| * Construct a parser for the specified source.
|
| + *
|
| * @param source the source being parsed
|
| */
|
| HtmlParser(Source source) : super(source) {
|
| @@ -1536,6 +1635,7 @@ class HtmlParser extends XmlParser {
|
|
|
| /**
|
| * Parse the tokens specified by the given scan result.
|
| + *
|
| * @param scanResult the result of scanning an HTML source (not `null`)
|
| * @return the parse result (not `null`)
|
| */
|
| @@ -1548,6 +1648,7 @@ class HtmlParser extends XmlParser {
|
|
|
| /**
|
| * Scan then parse the specified source.
|
| + *
|
| * @param source the source to be scanned and parsed (not `null`)
|
| * @return the parse result (not `null`)
|
| */
|
| @@ -1560,6 +1661,7 @@ class HtmlParser extends XmlParser {
|
| }
|
| /**
|
| * Instances of the class `HtmlUnit` represent the contents of an HTML file.
|
| + *
|
| * @coverage dart.engine.html
|
| */
|
| class HtmlUnit extends XmlNode {
|
| @@ -1587,9 +1689,11 @@ class HtmlUnit extends XmlNode {
|
|
|
| /**
|
| * Construct a new instance representing the content of an HTML file.
|
| + *
|
| * @param beginToken the first token in the file (not `null`)
|
| * @param tagNodes child tag nodes of the receiver (not `null`, contains no `null`s)
|
| - * @param endToken the last token in the token stream which should be of type[TokenType.EOF]
|
| + * @param endToken the last token in the token stream which should be of type
|
| + * [TokenType.EOF]
|
| */
|
| HtmlUnit(Token beginToken, List<XmlTagNode> tagNodes, Token endToken) {
|
| this._beginToken = beginToken;
|
| @@ -1601,6 +1705,7 @@ class HtmlUnit extends XmlNode {
|
|
|
| /**
|
| * Return the element associated with this HTML unit.
|
| + *
|
| * @return the element or `null` if the receiver is not resolved
|
| */
|
| HtmlElementImpl get element => _element;
|
| @@ -1609,12 +1714,14 @@ class HtmlUnit extends XmlNode {
|
| /**
|
| * Answer the tag nodes contained in the receiver. Callers should not manipulate the returned list
|
| * to edit the AST structure.
|
| + *
|
| * @return the children (not `null`, contains no `null`s)
|
| */
|
| List<XmlTagNode> get tagNodes => _tagNodes;
|
|
|
| /**
|
| * Set the element associated with this HTML unit.
|
| + *
|
| * @param element the element
|
| */
|
| void set element(HtmlElementImpl element2) {
|
|
|