Class TemplateLiteralNode

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
TemplateLiteralNode.TaggedTemplateLiteralNode, TemplateLiteralNode.UntaggedTemplateLiteralNode

public abstract class TemplateLiteralNode extends Expression
Template string literal.
  • Constructor Details

    • TemplateLiteralNode

      protected TemplateLiteralNode(long token, int finish)
    • TemplateLiteralNode

      protected TemplateLiteralNode(TemplateLiteralNode literalNode)
  • Method Details

    • accept

      public <R> R accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
      Description copied from class: Node
      Provides a means to navigate the IR.
      Specified by:
      accept in class Node
      Parameters:
      visitor - Node visitor.
      Returns:
      node the node or its replacement after visitation, null if no further visitations are required
    • accept

      public Node accept(NodeVisitor<? extends LexicalContext> visitor)
      Description copied from class: Node
      Provides a means to navigate the IR.
      Specified by:
      accept in class Node
      Parameters:
      visitor - Node visitor.
      Returns:
      node the node or its replacement after visitation, null if no further visitations are required
    • newTagged

      public static TemplateLiteralNode newTagged(long token, int finish, List<Expression> rawStrings, List<Expression> cookedStrings)
      Create a new tagged template string literal.
      Parameters:
      token - token
      finish - finish
      Returns:
      the new literal node
    • newUntagged

      public static TemplateLiteralNode newUntagged(long token, int finish, List<Expression> expressions)
      Create a new untagged template string literal.
      Parameters:
      token - token
      finish - finish
      expressions - interleaved string parts and expressions
      Returns:
      the new template literal node