Class ChunkToken

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

public class ChunkToken extends antlr.CommonToken
Tracks the various string and attribute chunks discovered by the lexer. Subclassed CommonToken so that I could pass the indentation to the parser, which will add it to the ASTExpr created for the $...$ attribute reference.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     

    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
     
    ChunkToken(int type, String text, String indentation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    setIndentation(String indentation)
     
     

    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

    • indentation

      protected String indentation
  • Constructor Details

    • ChunkToken

      public ChunkToken()
    • ChunkToken

      public ChunkToken(int type, String text, String indentation)
  • Method Details

    • getIndentation

      public String getIndentation()
    • setIndentation

      public void setIndentation(String indentation)
    • toString

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