From bc506295a30a5806b3346ed09cd679f3b8ee6f64 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 15 Jan 2025 23:24:05 +0100 Subject: [ruby/prism] Further refine string handling in the parser translator Mostly around newlines and line continuation. * percent arrays need special backslash handling in the ast * Fix offset issue for heredocs with many line continuations (used wrong variable as index access) * More refined rules on when to simplify string tokens * Handle line continuations in squiggly heredocs * Correctly dedent squiggly heredocs with interpolation * Consider `':foo:` and `%s[foo]` to not be interpolation https://github.com/ruby/prism/commit/4edfe9d981 --- test/prism/ruby/ruby_parser_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/prism/ruby/ruby_parser_test.rb') diff --git a/test/prism/ruby/ruby_parser_test.rb b/test/prism/ruby/ruby_parser_test.rb index fd1dbf1ac8..a92e8080de 100644 --- a/test/prism/ruby/ruby_parser_test.rb +++ b/test/prism/ruby/ruby_parser_test.rb @@ -53,6 +53,7 @@ module Prism "alias.txt", "dsym_str.txt", "dos_endings.txt", + "heredocs_with_fake_newlines.txt", "heredocs_with_ignored_newlines.txt", "method_calls.txt", "methods.txt", -- cgit v1.2.3