class Prism::Node
various node types.
This represents a node in the tree. It is the parent class of all of the
def newline?
def newline? @newline ? true : false end
def pretty_print(q)
Similar to inspect, but respects the current level of indentation given by
def pretty_print(q) q.seplist(inspect.chomp.each_line, -> { q.breakable }) do |line| q.text(line.chomp) end q.current_group.break end
def set_newline_flag(newline_marked)
def set_newline_flag(newline_marked) line = location.start_line unless newline_marked[line] newline_marked[line] = true @newline = true end end
def slice
def slice location.slice end