class Prism::Node

various node types.
This represents a node in the tree. It is the parent class of all of the

def accept(visitor)

Accepts a visitor and calls back into the specialized visit function.
def accept(visitor)
  raise NoMethodError, "undefined method `accept' for #{inspect}"
end

def child_nodes

nodes that were not present.
Returns an array of child nodes, including `nil`s in the place of optional
def child_nodes
  raise NoMethodError, "undefined method `#{__method__}' for #{inspect}"
end

def comment_targets

comments attached to them.
Returns an array of child nodes and locations that could potentially have
def comment_targets
  raise NoMethodError, "undefined method `comment_targets' for #{inspect}"
end

def compact_child_nodes

optional nodes that were not present.
Returns an array of child nodes, excluding any `nil`s in the place of
def compact_child_nodes
  raise NoMethodError, "undefined method `compact_child_nodes' for #{inspect}"
end

def newline? # :nodoc:

:nodoc:
def newline? # :nodoc:
  @newline ? true : false
end

def pretty_print(q)

the pretty print object.
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) # :nodoc:

:nodoc:
def set_newline_flag(newline_marked) # :nodoc:
  line = location.start_line
  unless newline_marked[line]
    newline_marked[line] = true
    @newline = true
  end
end

def slice

Slice the location of the node from the source.
def slice
  location.slice
end

def to_dot

Convert this node into a graphviz dot graph string.
def to_dot
  DotVisitor.new.tap { |visitor| accept(visitor) }.to_dot
end

def type

is particularly useful for case statements and array comparisons.
Returns a symbol symbolizing the type of node that this represents. This
def type
  raise NoMethodError, "undefined method `type' for #{inspect}"
end