Package com.google.dart.engine.html.ast

Examples of com.google.dart.engine.html.ast.HtmlScriptTagNode


  @Override
  protected XmlTagNode createTagNode(Token nodeStart, Token tag, List<XmlAttributeNode> attributes,
      Token attributeEnd, List<XmlTagNode> tagNodes, Token contentEnd, Token closingTag,
      Token nodeEnd) {
    if (isScriptNode(tag, attributes, tagNodes)) {
      HtmlScriptTagNode tagNode = new HtmlScriptTagNode(
          nodeStart,
          tag,
          attributes,
          attributeEnd,
          tagNodes,
          contentEnd,
          closingTag,
          nodeEnd);
      String contents = tagNode.getContent();
      int contentOffset = attributeEnd.getEnd();
      Location location = lineInfo.getLocation(contentOffset);
      Scanner scanner = new Scanner(
          getSource(),
          new SubSequenceReader(contents, contentOffset),
          errorListener);
      scanner.setSourceStart(location.getLineNumber(), location.getColumnNumber());
      com.google.dart.engine.scanner.Token firstToken = scanner.tokenize();
      Parser parser = new Parser(getSource(), errorListener);
      CompilationUnit unit = parser.parseCompilationUnit(firstToken);
      unit.setLineInfo(lineInfo);
      tagNode.setScript(unit);
      return tagNode;
    }
    return new XmlTagNode(
        nodeStart,
        tag,
View Full Code Here

TOP

Related Classes of com.google.dart.engine.html.ast.HtmlScriptTagNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.