class YARP::Node

This represents a node in the tree.

Attributes

location[R]

Public Instance Methods

newline?() click to toggle source
# File yarp.rb, line 292
def newline?
  @newline ? true : false
end
pretty_print(q) click to toggle source
# File yarp.rb, line 309
def pretty_print(q)
  q.text(inspect.chomp)
end
set_newline_flag(newline_marked) click to toggle source
# File yarp.rb, line 296
def set_newline_flag(newline_marked)
  line = location.start_line
  unless newline_marked[line]
    newline_marked[line] = true
    @newline = true
  end
end
slice() click to toggle source

Slice the location of the node from the source.

# File yarp.rb, line 305
def slice
  location.slice
end