Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/html.dart

Issue 18129004: Simplify constructors translation, improve code style. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 'error.dart'; 8 import 'error.dart';
9 import 'instrumentation.dart'; 9 import 'instrumentation.dart';
10 import 'element.dart' show HtmlElementImpl; 10 import 'element.dart' show HtmlElementImpl;
(...skipping 30 matching lines...) Expand all
41 * The lexeme represented by this token. 41 * The lexeme represented by this token.
42 */ 42 */
43 String _value; 43 String _value;
44 44
45 /** 45 /**
46 * Initialize a newly created token. 46 * Initialize a newly created token.
47 * 47 *
48 * @param type the token type (not `null`) 48 * @param type the token type (not `null`)
49 * @param offset the offset from the beginning of the file to the first charac ter in the token 49 * @param offset the offset from the beginning of the file to the first charac ter in the token
50 */ 50 */
51 Token.con1(TokenType type, int offset) { 51 Token.con1(TokenType type, int offset) : this.con2(type, offset, type.lexeme);
52 _jtd_constructor_157_impl(type, offset);
53 }
54 _jtd_constructor_157_impl(TokenType type, int offset) {
55 _jtd_constructor_158_impl(type, offset, type.lexeme);
56 }
57 52
58 /** 53 /**
59 * Initialize a newly created token. 54 * Initialize a newly created token.
60 * 55 *
61 * @param type the token type (not `null`) 56 * @param type the token type (not `null`)
62 * @param offset the offset from the beginning of the file to the first charac ter in the token 57 * @param offset the offset from the beginning of the file to the first charac ter in the token
63 * @param value the lexeme represented by this token (not `null`) 58 * @param value the lexeme represented by this token (not `null`)
64 */ 59 */
65 Token.con2(TokenType type2, int offset2, String value2) { 60 Token.con2(TokenType type, int offset, String value) {
66 _jtd_constructor_158_impl(type2, offset2, value2); 61 this._type = type;
67 } 62 this._value = StringUtilities.intern(value);
68 _jtd_constructor_158_impl(TokenType type2, int offset2, String value2) { 63 this._offset = offset;
69 this._type = type2;
70 this._value = StringUtilities.intern(value2);
71 this._offset = offset2;
72 } 64 }
73 65
74 /** 66 /**
75 * Return the offset from the beginning of the file to the character after las t character of the 67 * Return the offset from the beginning of the file to the character after las t character of the
76 * token. 68 * token.
77 * 69 *
78 * @return the offset from the beginning of the file to the first character af ter last character 70 * @return the offset from the beginning of the file to the first character af ter last character
79 * of the token 71 * of the token
80 */ 72 */
81 int get end => _offset + length; 73 int get end => _offset + length;
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 * @coverage dart.engine.html 1615 * @coverage dart.engine.html
1624 */ 1616 */
1625 class HtmlParser extends XmlParser { 1617 class HtmlParser extends XmlParser {
1626 static Set<String> SELF_CLOSING = new Set<String>(); 1618 static Set<String> SELF_CLOSING = new Set<String>();
1627 1619
1628 /** 1620 /**
1629 * Construct a parser for the specified source. 1621 * Construct a parser for the specified source.
1630 * 1622 *
1631 * @param source the source being parsed 1623 * @param source the source being parsed
1632 */ 1624 */
1633 HtmlParser(Source source) : super(source) { 1625 HtmlParser(Source source) : super(source);
1634 }
1635 1626
1636 /** 1627 /**
1637 * Parse the tokens specified by the given scan result. 1628 * Parse the tokens specified by the given scan result.
1638 * 1629 *
1639 * @param scanResult the result of scanning an HTML source (not `null`) 1630 * @param scanResult the result of scanning an HTML source (not `null`)
1640 * @return the parse result (not `null`) 1631 * @return the parse result (not `null`)
1641 */ 1632 */
1642 HtmlParseResult parse(HtmlScanResult scanResult) { 1633 HtmlParseResult parse(HtmlScanResult scanResult) {
1643 Token firstToken = scanResult.token; 1634 Token firstToken = scanResult.token;
1644 List<XmlTagNode> tagNodes = parseTopTagNodes(firstToken); 1635 List<XmlTagNode> tagNodes = parseTopTagNodes(firstToken);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 */ 1717 */
1727 void set element(HtmlElementImpl element2) { 1718 void set element(HtmlElementImpl element2) {
1728 this._element = element2; 1719 this._element = element2;
1729 } 1720 }
1730 void visitChildren(XmlVisitor<Object> visitor) { 1721 void visitChildren(XmlVisitor<Object> visitor) {
1731 for (XmlTagNode node in _tagNodes) { 1722 for (XmlTagNode node in _tagNodes) {
1732 node.accept(visitor); 1723 node.accept(visitor);
1733 } 1724 }
1734 } 1725 }
1735 } 1726 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698