class Prism::ParseResult
This is a result specific to the ‘parse` and `parse_file` methods.
def attach_comments!
def attach_comments! Comments.new(self).attach! # steep:ignore end
def deconstruct_keys(keys)
def deconstruct_keys(keys) super.merge!(value: value) end
def errors_format
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)
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!
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