Packages

class PSITokenSource extends TokenSource

Make a PsiBuilder look like a source of ANTLR tokens. PsiBuilder provides tokens created by the lexer created in ParserDefinition#createLexer(Project). This is the bridge between the ANTLR lexer and parser objects. Normally we just create a org.antlr.v4.runtime.CommonTokenStream but the IDE has control and asks our ParserDefinition for the lexer and parser. This is how we hook them together. When IDE ask ParserDefinition for a parser, we will create one of these attached to the PsiBuilder.

Linear Supertypes
TokenSource, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PSITokenSource
  2. TokenSource
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PSITokenSource(builder: PsiBuilder)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def getCharPositionInLine(): Int
    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def getInputStream(): CharStream
    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  11. def getLine(): Int
    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  12. def getSourceName(): String
    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  13. def getTokenFactory(): TokenFactory[_ <: AnyRef]
    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def nextToken(): Token

    Create an ANTLR Token from the current token type of the builder then advance the builder to next token (which ultimately calls an ANTLR lexer).

    Create an ANTLR Token from the current token type of the builder then advance the builder to next token (which ultimately calls an ANTLR lexer). The ANTLRLexerAdaptor creates tokens via an ANTLR lexer but converts to TokenIElementType and here we have to convert back to an ANTLR token using what info we can get from the builder. We lose info such as the original channel. So, whitespace and comments (typically hidden channel) will look like real tokens. Jetbrains uses ParserDefinition#getWhitespaceTokens() and ParserDefinition#getCommentTokens() to strip these before our ANTLR parser sees them.

    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def setTokenFactory(tokenFactory: TokenFactory[_ <: AnyRef]): Unit
    Definition Classes
    PSITokenSource → TokenSource
    Annotations
    @Override()
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from TokenSource

Inherited from AnyRef

Inherited from Any

Ungrouped