lib/prism/parse_result/errors.rb in prism-1.2.0 vs lib/prism/parse_result/errors.rb in prism-1.3.0
- old
+ new
@@ -15,10 +15,10 @@
@parse_result = parse_result
end
# Formats the errors in a human-readable way and return them as a string.
def format
- error_lines = {}
+ error_lines = {} #: Hash[Integer, Array[ParseError]]
parse_result.errors.each do |error|
location = error.location
(location.start_line..location.end_line).each do |line|
error_lines[line] ||= []
error_lines[line] << error