class Prism::ParseResult
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/prism/parse_result.rbs class Prism::ParseResult def initialize: (Prism::ProgramNode value, Array[Prism::InlineComment] comments, Array[Prism::MagicComment] magic_comments, nil data_loc, Array[] errors, Array[] warnings, Prism::Source source) -> void end
encountered.
the AST, any comments that were encounters, and any errors that were
This represents the result of a call to ::parse or ::parse_file. It contains
def attach_comments!
def attach_comments! Comments.new(self).attach! end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { value: value, comments: comments, magic_comments: magic_comments, data_loc: data_loc, errors: errors, warnings: warnings } end
def failure?
Returns true if there were errors during parsing and false if there were
def failure? !success? end
def initialize(value, comments, magic_comments, data_loc, errors, warnings, source)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (Prism::ProgramNode value, (Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment | Prism::InlineComment) comments, (Prism::MagicComment | Prism::MagicComment | Prism::MagicComment | Prism::MagicComment | Prism::MagicComment | Prism::MagicComment | Prism::MagicComment) magic_comments, nil data_loc, errors, warnings, Prism::Source source) -> void
This signature was generated using 2 samples from 1 application.
def initialize(value, comments, magic_comments, data_loc, errors, warnings, source) @value = value @comments = comments @magic_comments = magic_comments @data_loc = data_loc @errors = errors @warnings = warnings @source = source end
def mark_newlines!
def mark_newlines! value.accept(Newlines.new(Array.new(1 + source.offsets.size, false))) end
def success?
Returns true if there were no errors during parsing and false if there
def success? errors.empty? end