Class StringTemplateToken

java.lang.Object
antlr.Token
antlr.CommonToken
org.antlr.stringtemplate.language.StringTemplateToken
All Implemented Interfaces:
Cloneable

public class StringTemplateToken extends antlr.CommonToken
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Track any args for anonymous templates like invalid input: '<'tokens,rules:{t,r | then }> The lexer in action.g returns a single token ANONYMOUS_TEMPLATE and so I need to have it parse args in the lexer and make them available for when I build the anonymous template.

    Fields inherited from class antlr.CommonToken

    col, line, text

    Fields inherited from class antlr.Token

    badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP, type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    StringTemplateToken(int type, String text)
     
    StringTemplateToken(int type, String text, List args)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class antlr.CommonToken

    getColumn, getLine, getText, setColumn, setLine, setText

    Methods inherited from class antlr.Token

    getFilename, getType, setFilename, setType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • args

      public List args
      Track any args for anonymous templates like invalid input: '<'tokens,rules:{t,r | then }> The lexer in action.g returns a single token ANONYMOUS_TEMPLATE and so I need to have it parse args in the lexer and make them available for when I build the anonymous template.
  • Constructor Details

    • StringTemplateToken

      public StringTemplateToken()
    • StringTemplateToken

      public StringTemplateToken(int type, String text)
    • StringTemplateToken

      public StringTemplateToken(String text)
    • StringTemplateToken

      public StringTemplateToken(int type, String text, List args)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class antlr.CommonToken