diff options
Diffstat (limited to 'lib/prism/parse_result/errors.rb')
| -rw-r--r-- | lib/prism/parse_result/errors.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/prism/parse_result/errors.rb b/lib/prism/parse_result/errors.rb index 26c376b3ce..388309d23d 100644 --- a/lib/prism/parse_result/errors.rb +++ b/lib/prism/parse_result/errors.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true # :markup: markdown +#-- +# rbs_inline: enabled require "stringio" @@ -9,14 +11,18 @@ module Prism # can be used to format the errors in a human-readable way. class Errors # The parse result that contains the errors. - attr_reader :parse_result + attr_reader :parse_result #: ParseResult # Initialize a new set of errors from the given parse result. + #-- + #: (ParseResult parse_result) -> void def initialize(parse_result) @parse_result = parse_result end # Formats the errors in a human-readable way and return them as a string. + #-- + #: () -> String def format error_lines = {} #: Hash[Integer, Array[ParseError]] parse_result.errors.each do |error| |
