class Prism::ParseResult

This is a result specific to the ‘parse` and `parse_file` methods.

def attach_comments!

Attach the list of comments to their respective locations in the tree.
def attach_comments!
  Comments.new(self).attach! # steep:ignore
end

def deconstruct_keys(keys)

Implement the hash pattern matching interface for ParseResult.
def deconstruct_keys(keys)
  super.merge!(value: value)
end

def errors_format

displayed inline.
Returns a string representation of the syntax tree with the errors
def errors_format
  Errors.new(self).format
end

def initialize(value, comments, magic_comments, data_loc, errors, warnings, source)

Create a new parse result object with the given values.
def initialize(value, comments, magic_comments, data_loc, errors, warnings, source)
  @value = value
  super(comments, magic_comments, data_loc, errors, warnings, source)
end

def mark_newlines!

the behavior of CRuby's `:line` tracepoint event.
Walk the tree and mark nodes that are on a new line, loosely emulating
def mark_newlines!
  value.accept(Newlines.new(source.offsets.size)) # steep:ignore
end