<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/prism/translation/parser.rb, branch v4.0.4</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] Add Ruby 4.1 as a version specifier</title>
<updated>2025-12-19T00:58:53+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-12-17T09:47:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=76248400b75d42288a5941aa03e2d2e6d4fac057'/>
<id>76248400b75d42288a5941aa03e2d2e6d4fac057</id>
<content type='text'>
https://github.com/ruby/prism/commit/138db9ccc4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/138db9ccc4
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Rename Ruby 3.5 to Ruby 4.0</title>
<updated>2025-11-08T00:22:17+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-11-07T12:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7037d8f89e71a13547d031d76747e45cfe930c9f'/>
<id>7037d8f89e71a13547d031d76747e45cfe930c9f</id>
<content type='text'>
See https://github.com/ruby/ruby/commit/6d81969b475262aba251e99b518181bdf7c5a523

It leaves the old variant around. RuboCop for examples accesses `Prism::Translation::Parser35`
to test against ruby-head. For now I left these simply as an alias

https://github.com/ruby/prism/commit/d0a823f045
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/ruby/ruby/commit/6d81969b475262aba251e99b518181bdf7c5a523

It leaves the old variant around. RuboCop for examples accesses `Prism::Translation::Parser35`
to test against ruby-head. For now I left these simply as an alias

https://github.com/ruby/prism/commit/d0a823f045
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Documentation for Prism::Translation::Parser</title>
<updated>2025-09-13T14:16:59+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-09-13T14:09:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b897a47ae965367eb154eec8abe618711a91f1c1'/>
<id>b897a47ae965367eb154eec8abe618711a91f1c1</id>
<content type='text'>
Make it clear that it parses with the most recent version of Ruby
syntax.

https://github.com/ruby/prism/commit/7285d1fbab
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it clear that it parses with the most recent version of Ruby
syntax.

https://github.com/ruby/prism/commit/7285d1fbab
</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] Enforce a minimum `parser` version for the parser translator</title>
<updated>2025-03-22T17:08:42+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-03-20T14:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c49051eaa82e68b1a8792ad79f8cf2cf73f5ee90'/>
<id>c49051eaa82e68b1a8792ad79f8cf2cf73f5ee90</id>
<content type='text'>
There hasn't been much that would actually affect parsers usage of it.
But, when adding new node types, these usually appear in the `Parser::Meta::NODE_TYPES`.

`itblock` was added, gets emitted by prism, and then `rubocop-ast` blindly delegates to `on_itblock`.
These methods are dynamically created through `NODE_TYPES`, which means that it will error if it
doesn't contain `itblock`.

This is unfortunate because in `rubocop-ast` these methods are eagerly defined but
the prism translator is lazily loaded on demand.
The simplest solution is to add them on the `parser` side (even if they are not emitted directly), and require that a version that contains those be used.

In summary when adding a new node type:
* Add it to `Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES` (gets included in `NODE_TYPES`)
* Bump the minimum `parser` version used by `prism` to a version that contains the above change
* Actually emit that node type in `prism`

https://github.com/ruby/prism/commit/d73783d065
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There hasn't been much that would actually affect parsers usage of it.
But, when adding new node types, these usually appear in the `Parser::Meta::NODE_TYPES`.

`itblock` was added, gets emitted by prism, and then `rubocop-ast` blindly delegates to `on_itblock`.
These methods are dynamically created through `NODE_TYPES`, which means that it will error if it
doesn't contain `itblock`.

This is unfortunate because in `rubocop-ast` these methods are eagerly defined but
the prism translator is lazily loaded on demand.
The simplest solution is to add them on the `parser` side (even if they are not emitted directly), and require that a version that contains those be used.

In summary when adding a new node type:
* Add it to `Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES` (gets included in `NODE_TYPES`)
* Bump the minimum `parser` version used by `prism` to a version that contains the above change
* Actually emit that node type in `prism`

https://github.com/ruby/prism/commit/d73783d065
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Polyfill Kernel#warn category parameter</title>
<updated>2025-03-19T21:03:18+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-03-19T18:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=050ffab82b1a855d6b6edf5fbc6dc8c9311b6556'/>
<id>050ffab82b1a855d6b6edf5fbc6dc8c9311b6556</id>
<content type='text'>
https://github.com/ruby/prism/commit/d85c72a1b9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/d85c72a1b9
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Warn when the parser translator receives an incompatible builder class</title>
<updated>2025-03-19T21:03:17+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-03-19T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e5e160475bbd94ab90525132f7987cf29e9afc11'/>
<id>e5e160475bbd94ab90525132f7987cf29e9afc11</id>
<content type='text'>
In https://github.com/ruby/prism/pull/3494 I added a bit of code
so that using the new builder doesn't break stuff.
This code can be dropped when it is enforced that builder
is _always_ the correct subclass (and makes future issues like that unlikely).

https://github.com/ruby/prism/commit/193d4b806d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In https://github.com/ruby/prism/pull/3494 I added a bit of code
so that using the new builder doesn't break stuff.
This code can be dropped when it is enforced that builder
is _always_ the correct subclass (and makes future issues like that unlikely).

https://github.com/ruby/prism/commit/193d4b806d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix merge mishap</title>
<updated>2025-03-18T17:36:53+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-02-25T16:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=90d38ddb47f557b07b57c88139725267c7c313f8'/>
<id>90d38ddb47f557b07b57c88139725267c7c313f8</id>
<content type='text'>
Caused by https://github.com/ruby/prism/pull/3478 and https://github.com/ruby/prism/pull/3443

I also made the builder reference more explicit to clearly distinquish
between `::Parser` and `Prism::Translation::Parser`

https://github.com/ruby/prism/commit/d52aaa75b6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Caused by https://github.com/ruby/prism/pull/3478 and https://github.com/ruby/prism/pull/3443

I also made the builder reference more explicit to clearly distinquish
between `::Parser` and `Prism::Translation::Parser`

https://github.com/ruby/prism/commit/d52aaa75b6
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add a custom builder class for the parser translator</title>
<updated>2025-03-18T17:36:53+00:00</updated>
<author>
<name>Earlopain</name>
<email>14981592+Earlopain@users.noreply.github.com</email>
</author>
<published>2025-01-21T09:20:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9e5e3f1bede46ed499a809975c663ba32c34ffff'/>
<id>9e5e3f1bede46ed499a809975c663ba32c34ffff</id>
<content type='text'>
I want to add new node types to the parser translator, for example `itblock`. The bulk of the work is already done by prism itself. In the `parser`
builder, this would be a 5-line change at most but we don't control that here.

Instead, we can add our own builder and either overwrite the few methods we need,
or just inline the complete builder. I'm not sure yet which would be better.

`rubocop-ast` uses its own builder for `parser`. For this to correctly work, it must explicitly choose to extend the
prism builder and use it, same as it currently chooses to use a different parser when prism is used.

I'd like to enforce that the builder for prism extends its custom one since it will lead to
some pretty weird issues otherwise. But first, I'd like to change `rubocop-ast` to make use of this.

https://github.com/ruby/prism/commit/b080e608a8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I want to add new node types to the parser translator, for example `itblock`. The bulk of the work is already done by prism itself. In the `parser`
builder, this would be a 5-line change at most but we don't control that here.

Instead, we can add our own builder and either overwrite the few methods we need,
or just inline the complete builder. I'm not sure yet which would be better.

`rubocop-ast` uses its own builder for `parser`. For this to correctly work, it must explicitly choose to extend the
prism builder and use it, same as it currently chooses to use a different parser when prism is used.

I'd like to enforce that the builder for prism extends its custom one since it will lead to
some pretty weird issues otherwise. But first, I'd like to change `rubocop-ast` to make use of this.

https://github.com/ruby/prism/commit/b080e608a8
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Restore a comment for `Prism::Translation::Parser#initialize`</title>
<updated>2025-02-25T22:18:02+00:00</updated>
<author>
<name>Koichi ITO</name>
<email>koic.ito@gmail.com</email>
</author>
<published>2025-02-25T16:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6efd15a12823883fc94824041f8b3a00927a8364'/>
<id>6efd15a12823883fc94824041f8b3a00927a8364</id>
<content type='text'>
This restores the missing method comments in https://github.com/ruby/prism/pull/3479.

https://github.com/ruby/prism/commit/78b8f67dee
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This restores the missing method comments in https://github.com/ruby/prism/pull/3479.

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