summaryrefslogtreecommitdiff
path: root/lib/prism
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-06-12 09:44:28 -0400
committerKevin Newton <[email protected]>2024-06-18 21:18:39 -0400
commit24f48382bc3ab62ca0979f1a6879f0d82134abfe (patch)
tree23c9b01c864b6200ec21674872dca2e5686d98ce /lib/prism
parentc93b70cfdde962c24d99253ecf1e2c256d695f67 (diff)
[ruby/prism] (parser) Fix up tokens for empty symbol
https://github.com/ruby/prism/commit/5985ab7687
Diffstat (limited to 'lib/prism')
-rw-r--r--lib/prism/translation/parser/lexer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prism/translation/parser/lexer.rb b/lib/prism/translation/parser/lexer.rb
index 9d7caae0ba..8191bd19c5 100644
--- a/lib/prism/translation/parser/lexer.rb
+++ b/lib/prism/translation/parser/lexer.rb
@@ -339,7 +339,7 @@ module Prism
location = Range.new(source_buffer, offset_cache[token.location.start_offset], offset_cache[token.location.start_offset + 1])
end
when :tSYMBEG
- if (next_token = lexed[index][0]) && next_token.type != :STRING_CONTENT && next_token.type != :EMBEXPR_BEGIN && next_token.type != :EMBVAR
+ if (next_token = lexed[index][0]) && next_token.type != :STRING_CONTENT && next_token.type != :EMBEXPR_BEGIN && next_token.type != :EMBVAR && next_token.type != :STRING_END
next_location = token.location.join(next_token.location)
type = :tSYMBOL
value = next_token.value