<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/prism/translation/parser/compiler.rb, branch master</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/prism] Fix parser translation when escaped newline with trailing content</title>
<updated>2026-05-26T15:48:53+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2026-05-26T15:31:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=01a19896e700148df61b91479a4761c124ff05ff'/>
<id>01a19896e700148df61b91479a4761c124ff05ff</id>
<content type='text'>
https://github.com/ruby/prism/commit/81e07f3cdb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/81e07f3cdb
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Don't replicate unary method bug in parser translator</title>
<updated>2026-05-26T14:29:38+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2026-05-26T09:54:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=986a7ed4fab7175a8ec55b799992b8ac24f4f011'/>
<id>986a7ed4fab7175a8ec55b799992b8ac24f4f011</id>
<content type='text'>
Closes https://github.com/ruby/prism/issues/4112

Also see https://github.com/ruby/prism/issues/2501, for which this was done.
The expectation in rubocop is incorrect (produces code with semantic difference), so the test should be updated instead.

In any way, it should also have applied to `+`, where the same happens

https://github.com/ruby/prism/commit/1f8cae2a75
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes https://github.com/ruby/prism/issues/4112

Also see https://github.com/ruby/prism/issues/2501, for which this was done.
The expectation in rubocop is incorrect (produces code with semantic difference), so the test should be updated instead.

In any way, it should also have applied to `+`, where the same happens

https://github.com/ruby/prism/commit/1f8cae2a75
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Replace MissingNode with ErrorRecoveryNode</title>
<updated>2026-03-24T14:37:18+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2026-03-21T02:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=708656c73525156924e4ef28230a24eab513b30a'/>
<id>708656c73525156924e4ef28230a24eab513b30a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Parser support for no block parameter syntax</title>
<updated>2026-02-16T20:49:32+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2026-02-16T16:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1fbe6214ad17bf335b690433c1abc5a05e2ce049'/>
<id>1fbe6214ad17bf335b690433c1abc5a05e2ce049</id>
<content type='text'>
https://github.com/ruby/prism/commit/675f9c3be7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/675f9c3be7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Document fewer useless methods/classes</title>
<updated>2026-02-06T15:42:11+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2026-02-06T15:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=545db49ba8063d8e9ed916e508c31523b78d5bb9'/>
<id>545db49ba8063d8e9ed916e508c31523b78d5bb9</id>
<content type='text'>
(https://github.com/ruby/prism/pull/3908)

* Add missing nodocs for FFI

When generating docs in ruby/prism, this doesn't seem to matter.

But on docs.ruby-lang.org these take over the actual documentation.

* Nodoc various utility methods

They don't tell much of a story and just pull attention away from actually unique methods

* Nodoc some private functions/modules

* Nodoc translator implementation details

As well as some functionality from ripper that is nodoc in ruby

* Stop documenting visitor implementation details

These result in so many methods that are searchable
and give no actual benefit.
Toplevel docs are all you need to understand the usecase.

https://github.com/ruby/prism/commit/0bd9a7d373
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/prism/pull/3908)

* Add missing nodocs for FFI

When generating docs in ruby/prism, this doesn't seem to matter.

But on docs.ruby-lang.org these take over the actual documentation.

* Nodoc various utility methods

They don't tell much of a story and just pull attention away from actually unique methods

* Nodoc some private functions/modules

* Nodoc translator implementation details

As well as some functionality from ripper that is nodoc in ruby

* Stop documenting visitor implementation details

These result in so many methods that are searchable
and give no actual benefit.
Toplevel docs are all you need to understand the usecase.

https://github.com/ruby/prism/commit/0bd9a7d373
</pre>
</div>
</content>
</entry>
<entry>
<title>Use slices instead of locations</title>
<updated>2026-01-27T20:30:45+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2026-01-27T02:36:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af4a1ca021845837fd7bfb1e1b4b5abd7e336c34'/>
<id>af4a1ca021845837fd7bfb1e1b4b5abd7e336c34</id>
<content type='text'>
In the C API, we want to use slices instead of locations in the
AST. In this case a "slice" is effectively the same thing as the
location, expect it is represented using a 32-bit offset and a
32-bit length. This will cut down on half of the space of all of
the locations in the AST.

Note that from the Ruby/Java/JavaScript side, this is effectively
an invisible change. This only impacts the C/Rust side.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the C API, we want to use slices instead of locations in the
AST. In this case a "slice" is effectively the same thing as the
location, expect it is represented using a 32-bit offset and a
32-bit length. This will cut down on half of the space of all of
the locations in the AST.

Note that from the Ruby/Java/JavaScript side, this is effectively
an invisible change. This only impacts the C/Rust side.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add equal_loc to call nodes</title>
<updated>2025-10-30T13:06:09+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-10-26T20:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8e7d427a721ab715361c577fdea94fdebece6c6d'/>
<id>8e7d427a721ab715361c577fdea94fdebece6c6d</id>
<content type='text'>
In the case of attribute writes, there are use cases where you want
to know the location of the = sign. (Internally we actually need
this for translation to the writequark AST.)

https://github.com/ruby/prism/commit/bfc798a7ec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case of attribute writes, there are use cases where you want
to know the location of the = sign. (Internally we actually need
this for translation to the writequark AST.)

https://github.com/ruby/prism/commit/bfc798a7ec
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] [DOC] Specify markdown mode to RDoc</title>
<updated>2025-05-29T04:45:58+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-05-28T10:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=991cf2dd4d611d5a8b275dfb3ec83c4d25799629'/>
<id>991cf2dd4d611d5a8b275dfb3ec83c4d25799629</id>
<content type='text'>
https://github.com/ruby/prism/commit/12af4e144e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/12af4e144e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parsing rescued exception via indexed assignment</title>
<updated>2025-04-12T17:43:57+00:00</updated>
<author>
<name>viralpraxis</name>
<email>iaroslav2k@gmail.com</email>
</author>
<published>2025-04-10T08:56:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=543dd77cc39d16a45693d35af670995f7e66ce36'/>
<id>543dd77cc39d16a45693d35af670995f7e66ce36</id>
<content type='text'>
Given this code

```ruby
begin
  raise '42'
rescue =&gt; A[]
end
```

Prism fails with this backtrace

```
Error: test_unparser/corpus/literal/rescue.txt(Prism::ParserTest): NoMethodError: undefined method `arguments' for nil
prism/lib/prism/translation/parser/compiler.rb:1055:in `visit_index_target_node'
prism/lib/prism/node.rb:9636:in `accept'
prism/lib/prism/compiler.rb:30:in `visit'
prism/lib/prism/translation/parser/compiler.rb:218:in `visit_begin_node'
```

Seems like

```diff
-            visit_all(node.arguments.arguments),
+            visit_all(node.arguments&amp;.arguments || []),
```

fixes the problem.

https://github.com/ruby/prism/commit/76d01aeb6c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given this code

```ruby
begin
  raise '42'
rescue =&gt; A[]
end
```

Prism fails with this backtrace

```
Error: test_unparser/corpus/literal/rescue.txt(Prism::ParserTest): NoMethodError: undefined method `arguments' for nil
prism/lib/prism/translation/parser/compiler.rb:1055:in `visit_index_target_node'
prism/lib/prism/node.rb:9636:in `accept'
prism/lib/prism/compiler.rb:30:in `visit'
prism/lib/prism/translation/parser/compiler.rb:218:in `visit_begin_node'
```

Seems like

```diff
-            visit_all(node.arguments.arguments),
+            visit_all(node.arguments&amp;.arguments || []),
```

fixes the problem.

https://github.com/ruby/prism/commit/76d01aeb6c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix parser translator when splatting in pattern matching pin</title>
<updated>2025-04-02T20:51:54+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-03-30T11:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=334c261cc9ee125c4c4bfc65dec2e571af8944a2'/>
<id>334c261cc9ee125c4c4bfc65dec2e571af8944a2</id>
<content type='text'>
Because it ends up treating it as a local variable, and `a.x`
is not a valid local variable name.

I'm not big on pattern matching, but conceptually it makes sense to me
to treat anything inside ^() to not be
pattern matching syntax?

https://github.com/ruby/prism/commit/80dbd85c45
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because it ends up treating it as a local variable, and `a.x`
is not a valid local variable name.

I'm not big on pattern matching, but conceptually it makes sense to me
to treat anything inside ^() to not be
pattern matching syntax?

https://github.com/ruby/prism/commit/80dbd85c45
</pre>
</div>
</content>
</entry>
</feed>
