Package com.google.template.soy.soyparse

Examples of com.google.template.soy.soyparse.SoyFileParser


  public final void testClone() throws Exception {

    IdGenerator nodeIdGen = new IncrementingIdGenerator();
    SoyFileSetNode fileSetNode = new SoyFileSetNode(nodeIdGen.genId(), nodeIdGen);
    SoyFileNode fileNode =
        (new SoyFileParser(SOY_SOURCE_FOR_TESTING_CLONING, SoyFileKind.SRC, "test.soy", nodeIdGen))
            .parseSoyFile();
    fileSetNode.addChild(fileNode);

    SoyFileSetNode clone = fileSetNode.clone();
    assertEquals(1, clone.numChildren());
View Full Code Here


  public final void testCloneWithNewIds() throws Exception {

    IdGenerator nodeIdGen = new IncrementingIdGenerator();
    SoyFileSetNode fileSetNode = new SoyFileSetNode(nodeIdGen.genId(), nodeIdGen);
    SoyFileNode fileNode =
        (new SoyFileParser(SOY_SOURCE_FOR_TESTING_CLONING, SoyFileKind.SRC, "test.soy", nodeIdGen))
            .parseSoyFile();
    fileSetNode.addChild(fileNode);

    SoyFileSetNode clone = SoytreeUtils.cloneWithNewIds(fileSetNode);
    assertEquals(1, clone.numChildren());
View Full Code Here

  public final void testMsgHtmlTagNode() throws Exception {

    IdGenerator nodeIdGen = new IncrementingIdGenerator();
    SoyFileSetNode fileSetNode = new SoyFileSetNode(nodeIdGen.genId(), nodeIdGen);
    SoyFileNode fileNode =
        (new SoyFileParser(SOY_SOURCE_FOR_TESTING_CLONING, SoyFileKind.SRC, "test.soy", nodeIdGen))
            .parseSoyFile();
    fileSetNode.addChild(fileNode);

    FindNodeByTypeVisitor<MsgHtmlTagNode> visitor =
        new FindNodeByTypeVisitor<MsgHtmlTagNode>(MsgHtmlTagNode.class);
View Full Code Here

TOP

Related Classes of com.google.template.soy.soyparse.SoyFileParser

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.