Method: Token#getTokenSource

Defined in:
lib/antlr4/Token.rb

#getTokenSourceObject

Explicitly set the text for this token. If text is not null, then #getText will return this value rather than extracting the text from the input.

should be obtained from the input along with the start and stop indexes of the token.

Parameters:

  • text

    The explicit text of the token, or null if the text



44
45
46
# File 'lib/antlr4/Token.rb', line 44

def getTokenSource()
    return self.source[0]
end