Class: Treetop::Runtime::SyntaxNode

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/idlc/syntax_node.rb

Direct Known Subclasses

Idl::SyntaxNode

Instance Method Summary collapse

Instance Method Details

#set_input_file(filename, starting_line = 0, starting_offset = 0, line_file_offsets = nil) ⇒ Object



22
23
24
25
26
27
# File 'lib/idlc/syntax_node.rb', line 22

def set_input_file(filename, starting_line = 0, starting_offset = 0, line_file_offsets = nil)
  @input_file = filename
  @starting_line = starting_line
  @starting_offset = starting_offset
  @line_file_offsets = line_file_offsets
end

#set_input_file_unless_already_set(filename, starting_line = 0, starting_offset = 0, line_file_offsets = nil) ⇒ Object



41
42
43
44
45
# File 'lib/idlc/syntax_node.rb', line 41

def set_input_file_unless_already_set(filename, starting_line = 0, starting_offset = 0, line_file_offsets = nil)
  if @input_file.nil?
    set_input_file(filename, starting_line, starting_offset, line_file_offsets)
  end
end

#space?Boolean

Returns:

  • (Boolean)


30
# File 'lib/idlc/syntax_node.rb', line 30

def space? = false