class Antlr4::Runtime::TokenTagToken
Attributes
label[R]
token_name[R]
Public Class Methods
new(token_name, type, label = nil)
click to toggle source
Calls superclass method
Antlr4::Runtime::CommonToken::new
# File lib/antlr4/runtime/token_tag_token.rb, line 6 def initialize(token_name, type, label = nil) super(type) @token_name = token_name @label = label end
Public Instance Methods
text()
click to toggle source
# File lib/antlr4/runtime/token_tag_token.rb, line 12 def text return '<' + @label + ':' + @token_name + '>' unless @label.nil? '<' + @token_name + '>' end
to_s()
click to toggle source
# File lib/antlr4/runtime/token_tag_token.rb, line 18 def to_s @token_name + ':' + @type end