Class: Treetop::Runtime::TerminalSyntaxNode
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- Treetop::Runtime::TerminalSyntaxNode
- Defined in:
- lib/treetop/runtime/terminal_syntax_node.rb
Instance Attribute Summary
Attributes inherited from SyntaxNode
Instance Method Summary collapse
-
#initialize(input, interval) ⇒ TerminalSyntaxNode
constructor
A new instance of TerminalSyntaxNode.
- #inspect(indent = "") ⇒ Object
Methods inherited from SyntaxNode
#<=>, #dot_id, #elements, #empty?, #extension_modules, #nonterminal?, #terminal?, #text_value, #write_dot, #write_dot_file
Constructor Details
#initialize(input, interval) ⇒ TerminalSyntaxNode
Returns a new instance of TerminalSyntaxNode.
5 6 7 |
# File 'lib/treetop/runtime/terminal_syntax_node.rb', line 5 def initialize(input, interval) super(input, interval, []) end |
Instance Method Details
#inspect(indent = "") ⇒ Object
9 10 11 12 13 14 |
# File 'lib/treetop/runtime/terminal_syntax_node.rb', line 9 def inspect(indent="") indent+ self.class.to_s.sub(/.*:/,'') + " offset=#{interval.first}" + " #{text_value.inspect}" end |