diff options
author | Kevin Newton <[email protected]> | 2024-04-19 14:53:39 -0400 |
---|---|---|
committer | git <[email protected]> | 2024-04-19 19:25:32 +0000 |
commit | 23be6599a20a0fd6bbf650816d163f9adfb82009 () | |
tree | 2735cd0c7bca0e9f0c7f80f8f6d339d181adc625 /lib/prism/lex_compat.rb | |
parent | cb711df36f36c847b035bbd5326c217eabc5c8b3 (diff) |
[ruby/prism] Split parse result based on type
https://.com/ruby/prism/commit/17194e096d
-rw-r--r-- | lib/prism/lex_compat.rb | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -10,6 +10,23 @@ module Prism # generally lines up. However, there are a few cases that require special # handling. class LexCompat # :nodoc: # This is a mapping of prism token types to Ripper token types. This is a # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. @@ -844,7 +861,7 @@ module Prism # We sort by location to compare against Ripper's output tokens.sort_by!(&:location) - ParseResult.new(tokens, result.comments, result.magic_comments, result.data_loc, result.errors, result.warnings, Source.new(source)) end end |