module Riml::Visitable

Constants

EMPTY_CHILDREN

Attributes

compiled_output[W]
force_newline[RW]
parent[RW]
parent=[RW]
parent_node[RW]
parser_info[RW]
scope[RW]

Public Instance Methods

accept(visitor) click to toggle source
# File lib/riml/nodes.rb, line 10
def accept(visitor)
  visitor.visit(self)
end
children() click to toggle source
# File lib/riml/nodes.rb, line 25
def children
  EMPTY_CHILDREN
end
compiled_output() click to toggle source
# File lib/riml/nodes.rb, line 19
def compiled_output
  @compiled_output ||= ''
end
force_newline_if_child_call_node?() click to toggle source
# File lib/riml/nodes.rb, line 41
def force_newline_if_child_call_node?
  true
end
location_info() click to toggle source
# File lib/riml/nodes.rb, line 29
def location_info
  n = self
  while n != nil && !n.parser_info
    n = n.parent
  end
  if n.nil?
    return Constants::UNKNOWN_LOCATION_INFO
  end
  filename = parser_info[:filename] || Constants::COMPILED_STRING_LOCATION
  "#{filename}:#{parser_info[:lineno]}"
end