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.html; | 8 library engine.html; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 List<XmlTagNode> tagNodes, Token contentEnd, Token closingTag, | 409 List<XmlTagNode> tagNodes, Token contentEnd, Token closingTag, |
410 Token nodeEnd) { | 410 Token nodeEnd) { |
411 if (_isScriptNode(tag, attributes, tagNodes)) { | 411 if (_isScriptNode(tag, attributes, tagNodes)) { |
412 HtmlScriptTagNode tagNode = new HtmlScriptTagNode(nodeStart, tag, | 412 HtmlScriptTagNode tagNode = new HtmlScriptTagNode(nodeStart, tag, |
413 attributes, attributeEnd, tagNodes, contentEnd, closingTag, nodeEnd); | 413 attributes, attributeEnd, tagNodes, contentEnd, closingTag, nodeEnd); |
414 String contents = tagNode.content; | 414 String contents = tagNode.content; |
415 int contentOffset = attributeEnd.end; | 415 int contentOffset = attributeEnd.end; |
416 LineInfo_Location location = _lineInfo.getLocation(contentOffset); | 416 LineInfo_Location location = _lineInfo.getLocation(contentOffset); |
417 sc.Scanner scanner = new sc.Scanner(source, | 417 sc.Scanner scanner = new sc.Scanner(source, |
418 new sc.SubSequenceReader(contents, contentOffset), _errorListener); | 418 new sc.SubSequenceReader(contents, contentOffset), _errorListener); |
419 scanner.enableNullAwareOperators = _options.enableNullAwareOperators; | |
420 scanner.setSourceStart(location.lineNumber, location.columnNumber); | 419 scanner.setSourceStart(location.lineNumber, location.columnNumber); |
421 sc.Token firstToken = scanner.tokenize(); | 420 sc.Token firstToken = scanner.tokenize(); |
422 Parser parser = new Parser(source, _errorListener); | 421 Parser parser = new Parser(source, _errorListener); |
423 CompilationUnit unit = parser.parseCompilationUnit(firstToken); | 422 CompilationUnit unit = parser.parseCompilationUnit(firstToken); |
424 unit.lineInfo = _lineInfo; | 423 unit.lineInfo = _lineInfo; |
425 tagNode.script = unit; | 424 tagNode.script = unit; |
426 return tagNode; | 425 return tagNode; |
427 } | 426 } |
428 return new XmlTagNode(nodeStart, tag, attributes, attributeEnd, tagNodes, | 427 return new XmlTagNode(nodeStart, tag, attributes, attributeEnd, tagNodes, |
429 contentEnd, closingTag, nodeEnd); | 428 contentEnd, closingTag, nodeEnd); |
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 */ | 1881 */ |
1883 abstract class XmlVisitor<R> { | 1882 abstract class XmlVisitor<R> { |
1884 R visitHtmlScriptTagNode(HtmlScriptTagNode node); | 1883 R visitHtmlScriptTagNode(HtmlScriptTagNode node); |
1885 | 1884 |
1886 R visitHtmlUnit(HtmlUnit htmlUnit); | 1885 R visitHtmlUnit(HtmlUnit htmlUnit); |
1887 | 1886 |
1888 R visitXmlAttributeNode(XmlAttributeNode xmlAttributeNode); | 1887 R visitXmlAttributeNode(XmlAttributeNode xmlAttributeNode); |
1889 | 1888 |
1890 R visitXmlTagNode(XmlTagNode xmlTagNode); | 1889 R visitXmlTagNode(XmlTagNode xmlTagNode); |
1891 } | 1890 } |
OLD | NEW |