Class TokenImpl

java.lang.Object
org.sonar.python.tree.PyTree
org.sonar.python.tree.TokenImpl
All Implemented Interfaces:
Token, Tree

public class TokenImpl extends PyTree implements Token
  • Constructor Details

    • TokenImpl

      public TokenImpl(com.sonar.sslr.api.Token token)
  • Method Details

    • value

      public String value()
      Specified by:
      value in interface Token
    • line

      public int line()
      Specified by:
      line in interface Token
    • column

      public int column()
      Specified by:
      column in interface Token
    • trivia

      public List<Trivia> trivia()
      Specified by:
      trivia in interface Token
    • type

      public com.sonar.sslr.api.TokenType type()
      Specified by:
      type in interface Token
    • accept

      public void accept(TreeVisitor visitor)
      Specified by:
      accept in interface Tree
    • computeChildren

      public List<Tree> computeChildren()
    • getKind

      public Tree.Kind getKind()
      Specified by:
      getKind in interface Tree
    • firstToken

      public Token firstToken()
      Specified by:
      firstToken in interface Tree
      Overrides:
      firstToken in class PyTree
    • lastToken

      public Token lastToken()
      Specified by:
      lastToken in interface Tree
      Overrides:
      lastToken in class PyTree
      Returns:
      the last meaningful token of the Tree. Separators of simple statements (semicolon and/or newline) are not be returned by this method.