class Antlr4::Runtime::TerminalNodeImpl
Attributes
parent[RW]
symbol[RW]
Public Class Methods
new(symbol)
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 9 def initialize(symbol) @symbol = symbol end
Public Instance Methods
accept(visitor)
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 32 def accept(visitor) visitor.visit_terminal(self) end
child(_i)
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 13 def child(_i) nil end
child_count()
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 28 def child_count 0 end
payload()
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 17 def payload @symbol end
source_interval()
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 21 def source_interval return Interval.invalid if @symbol.nil? token_index = @symbol.token_index Interval.new(token_index, token_index) end
text()
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 36 def text @symbol.text end
to_s()
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 44 def to_s return '<EOF>' if @symbol.type == Token::EOF @symbol.text end
to_string_tree(_parser = nil)
click to toggle source
# File lib/antlr4/runtime/terminal_node_impl.rb, line 40 def to_string_tree(_parser = nil) to_s end