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

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

Issue 624403002: Write end-of-block comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.html; 8 library engine.html;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 c = advance(); 185 c = advance();
186 break; 186 break;
187 } else { 187 } else {
188 dashCount = 0; 188 dashCount = 0;
189 } 189 }
190 c = _recordStartOfLineAndAdvance(c); 190 c = _recordStartOfLineAndAdvance(c);
191 } 191 }
192 _emitWithOffsetAndLength(TokenType.COMMENT, start, -1); 192 _emitWithOffsetAndLength(TokenType.COMMENT, start, -1);
193 // Capture <!--> and <!---> as tokens but report an error 193 // Capture <!--> and <!---> as tokens but report an error
194 if (_tail.length < 7) { 194 if (_tail.length < 7) {
195 // TODO (danrubel): Report invalid HTML comment
195 } 196 }
196 } else { 197 } else {
197 // handle a declaration 198 // handle a declaration
198 while (c >= 0) { 199 while (c >= 0) {
199 if (c == 0x3E) { 200 if (c == 0x3E) {
200 c = advance(); 201 c = advance();
201 break; 202 break;
202 } 203 }
203 c = _recordStartOfLineAndAdvance(c); 204 c = _recordStartOfLineAndAdvance(c);
204 } 205 }
205 _emitWithOffsetAndLength(TokenType.DECLARATION, start, -1); 206 _emitWithOffsetAndLength(TokenType.DECLARATION, start, -1);
206 if (!StringUtilities.endsWithChar(_tail.lexeme, 0x3E)) { 207 if (!StringUtilities.endsWithChar(_tail.lexeme, 0x3E)) {
208 // TODO (danrubel): Report missing '>' in directive
207 } 209 }
208 } 210 }
209 } else if (c == 0x3F) { 211 } else if (c == 0x3F) {
210 // handle a directive 212 // handle a directive
211 while (c >= 0) { 213 while (c >= 0) {
212 if (c == 0x3F) { 214 if (c == 0x3F) {
213 c = advance(); 215 c = advance();
214 if (c == 0x3E) { 216 if (c == 0x3E) {
215 c = advance(); 217 c = advance();
216 break; 218 break;
217 } 219 }
218 } else { 220 } else {
219 c = _recordStartOfLineAndAdvance(c); 221 c = _recordStartOfLineAndAdvance(c);
220 } 222 }
221 } 223 }
222 _emitWithOffsetAndLength(TokenType.DIRECTIVE, start, -1); 224 _emitWithOffsetAndLength(TokenType.DIRECTIVE, start, -1);
223 if (_tail.length < 4) { 225 if (_tail.length < 4) {
226 // TODO (danrubel): Report invalid directive
224 } 227 }
225 } else if (c == 0x2F) { 228 } else if (c == 0x2F) {
226 _emitWithOffset(TokenType.LT_SLASH, start); 229 _emitWithOffset(TokenType.LT_SLASH, start);
227 inBrackets = true; 230 inBrackets = true;
228 c = advance(); 231 c = advance();
229 } else { 232 } else {
230 inBrackets = true; 233 inBrackets = true;
231 _emitWithOffset(TokenType.LT, start); 234 _emitWithOffset(TokenType.LT, start);
232 // ignore whitespace in braces 235 // ignore whitespace in braces
233 while (Character.isWhitespace(c)) { 236 while (Character.isWhitespace(c)) {
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 /** 1275 /**
1273 * Answer the attribute value token. A properly formed value will start and en d with matching 1276 * Answer the attribute value token. A properly formed value will start and en d with matching
1274 * quote characters, but the value returned may not be properly formed. 1277 * quote characters, but the value returned may not be properly formed.
1275 * 1278 *
1276 * @return the value token or `null` if this represents a badly formed attribu te 1279 * @return the value token or `null` if this represents a badly formed attribu te
1277 */ 1280 */
1278 Token get valueToken => _value; 1281 Token get valueToken => _value;
1279 1282
1280 @override 1283 @override
1281 void visitChildren(XmlVisitor visitor) { 1284 void visitChildren(XmlVisitor visitor) {
1285 // no children to visit
1282 } 1286 }
1283 } 1287 }
1284 1288
1285 /** 1289 /**
1286 * Instances of the class `XmlExpression` represent an abstract expression embed ded into 1290 * Instances of the class `XmlExpression` represent an abstract expression embed ded into
1287 * [XmlNode]. 1291 * [XmlNode].
1288 */ 1292 */
1289 abstract class XmlExpression { 1293 abstract class XmlExpression {
1290 /** 1294 /**
1291 * An empty array of expressions. 1295 * An empty array of expressions.
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 _reportUnexpectedToken(); 1800 _reportUnexpectedToken();
1797 nodeEnd = _insertSyntheticToken(TokenType.GT); 1801 nodeEnd = _insertSyntheticToken(TokenType.GT);
1798 } 1802 }
1799 return createTagNode(nodeStart, tag, attributes, attributeEnd, tagNodes, con tentEnd, closingTag, nodeEnd); 1803 return createTagNode(nodeStart, tag, attributes, attributeEnd, tagNodes, con tentEnd, closingTag, nodeEnd);
1800 } 1804 }
1801 1805
1802 /** 1806 /**
1803 * Report the current token as unexpected 1807 * Report the current token as unexpected
1804 */ 1808 */
1805 void _reportUnexpectedToken() { 1809 void _reportUnexpectedToken() {
1810 // TODO (danrubel): report unexpected token
1806 } 1811 }
1807 } 1812 }
1808 1813
1809 /** 1814 /**
1810 * Instances of `XmlTagNode` represent XML or HTML elements such as `` and 1815 * Instances of `XmlTagNode` represent XML or HTML elements such as `` and
1811 * `<body foo="bar"> ... </body>`. 1816 * `<body foo="bar"> ... </body>`.
1812 */ 1817 */
1813 class XmlTagNode extends XmlNode { 1818 class XmlTagNode extends XmlNode {
1814 /** 1819 /**
1815 * Constant representing empty list of attributes. 1820 * Constant representing empty list of attributes.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 */ 2040 */
2036 abstract class XmlVisitor<R> { 2041 abstract class XmlVisitor<R> {
2037 R visitHtmlScriptTagNode(HtmlScriptTagNode node); 2042 R visitHtmlScriptTagNode(HtmlScriptTagNode node);
2038 2043
2039 R visitHtmlUnit(HtmlUnit htmlUnit); 2044 R visitHtmlUnit(HtmlUnit htmlUnit);
2040 2045
2041 R visitXmlAttributeNode(XmlAttributeNode xmlAttributeNode); 2046 R visitXmlAttributeNode(XmlAttributeNode xmlAttributeNode);
2042 2047
2043 R visitXmlTagNode(XmlTagNode xmlTagNode); 2048 R visitXmlTagNode(XmlTagNode xmlTagNode);
2044 } 2049 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698