Class: Treetop::Runtime::TerminalSyntaxNode

Inherits:
SyntaxNode
  • Object
show all
Defined in:
lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/runtime/terminal_syntax_node.rb

Instance Attribute Summary

Attributes inherited from SyntaxNode

#input, #interval, #parent

Instance Method Summary collapse

Methods inherited from SyntaxNode

#<=>, #dot_id, #elements, #empty?, #extension_modules, #inspect_children, #inspect_self, #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/puppet_x/wildfly/gems/treetop-1.6.8/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/puppet_x/wildfly/gems/treetop-1.6.8/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