aboutsummaryrefslogtreecommitdiffstats
path: root/test/prism/snapshots/xstring.txt
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/prism] Expose common flags in inspect outputKevin Newton2024-07-111-7/+12
| | | | https://github.com/ruby/prism/commit/d0143865c2
* [ruby/prism] Freeze internal parts, againKevin Newton2024-03-261-2/+2
| | | | https://github.com/ruby/prism/commit/50372fee5c
* [ruby/prism] Revert "Frozen parts"Kevin Newton2024-03-251-2/+2
| | | | https://github.com/ruby/prism/commit/48f2e8c169
* [ruby/prism] Mark inner parts of interpolated* nodes as frozenKevin Newton2024-03-251-2/+2
| | | | https://github.com/ruby/prism/commit/58a127cd5d
* [ruby/prism] Fix an AST and token incompatibility for ↵Koichi ITO2024-03-131-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Prism::Translation::Parser` This PR fixes an AST and token incompatibility between Parser gem and `Prism::Translation::Parser` for empty xstring literal. ## Parser gem (Expected) ```console $ bundle exec ruby -Ilib -rparser/ruby33 -ve \ 'buf = Parser::Source::Buffer.new("/tmp/s.rb"); buf.source = "``"; p Parser::Ruby33.new.tokenize(buf)' ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] [s(:xstr), [], [[:tXSTRING_BEG, ["`", #<Parser::Source::Range /tmp/s.rb 0...1>]], [:tSTRING_END, ["`", #<Parser::Source::Range /tmp/s.rb 1...2>]]]] ``` ## `Prism::Translation::Parser` (Actual) Previously, the AST and tokens returned by the Parser gem were different: ```console $ bunele exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \ 'buf = Parser::Source::Buffer.new("/tmp/s.rb"); buf.source = "``"; p Prism::Translation::Parser33.new.tokenize(buf)' ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] [s(:xstr, s(:str, "")), [], [[:tBACK_REF2, ["`", #<Parser::Source::Range /tmp/s.rb 0...1>]], [:tSTRING_END, ["`", #<Parser::Source::Range /tmp/s.rb 1...2>]]]] ``` After this correction, the AST and tokens returned by the Parser gem are the same: ```console $ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \ 'buf = Parser::Source::Buffer.new("/tmp/s.rb"); buf.source = "``"; p Prism::Translation::Parser33.new.tokenize(buf)' ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] [s(:xstr), [], [[:tXSTRING_BEG, ["`", #<Parser::Source::Range /tmp/s.rb 0...1>]], [:tSTRING_END, ["`", #<Parser::Source::Range /tmp/s.rb 1...2>]]]] ``` https://github.com/ruby/prism/commit/4ac89dcbb5
* [ruby/prism] Fix an AST incompatibility for `Prism::Translation::Parser`Koichi ITO2024-03-131-8/+14
| | | | | | | | | | | | | | | | Fixes ruby/prism#2480. This PR fixes an AST incompatibility between Parser gem and `Prism::Translation::Parser` for xstring literal with line breaks. The following case in ruby/prism#2480 has already been addressed in ruby/prism#2576: ```ruby "foo bar" ``` https://github.com/ruby/prism/commit/cf85e72c55
* [ruby/prism] Fix a token incompatibility for `Prism::Translation::Parser::Lexer`Koichi ITO2024-03-121-13/+7
| | | | | | | | | | | | | | In practice, the `BACKTICK` is mapped either as `:tXSTRING_BEG` or `:tBACK_REF2`. The former is used in xstrings like `` `foo` ``, while the latter is utilized as a back reference in contexts like `` A::` ``. This PR will make corrections to differentiate the use of `BACKTICK`. This mistake was discovered through the investigation of xstring.txt file. The PR will run tests from xstring.txt file except for `` `f\oo` ``, which will still fail, hence it will be separated into xstring_with_backslash.txt file. This separation will facilitate addressing the correction at a different time. https://github.com/ruby/prism/commit/49ad8df40a
* [ruby/prism] Ignore visibility flagKevin Newton2024-01-021-1/+1
| | | | https://github.com/ruby/prism/commit/55b049ddac
* [ruby/prism] Move flag position consistently to frontKevin Newton2023-12-061-2/+2
| | | | https://github.com/ruby/prism/commit/6e69a81737
* [ruby/prism] Provide flags for changing encodingsKevin Newton2023-12-061-0/+3
| | | | https://github.com/ruby/prism/commit/e838eaff6f
* [ruby/prism] Move CallNode#name field between receiver and argumentsBenoit Daloze2023-11-221-2/+2
| | | | | | | | * The same order as in source code. * CallOrWriteNode, CallOperatorWriteNode, CallAndWriteNode already have the correct order so it was also inconsistent with them. https://github.com/ruby/prism/commit/4434e4bc22
* Sync with prism CallNode#name changesBenoit Daloze2023-10-021-1/+1
| | | | * https://github.com/ruby/prism/pull/1533
* Rename YARP filepaths to prism filepathsKevin Newton2023-09-271-0/+52