<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/rubyparser.h, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Remove needless `ruby2_keywords` field from `struct rb_args_info`</title>
<updated>2025-12-09T01:09:00+00:00</updated>
<author>
<name>yui-knk</name>
<email>spiketeika@gmail.com</email>
</author>
<published>2025-12-09T00:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=056997cbcdd38b062518fe54e311c964f8bfd98f'/>
<id>056997cbcdd38b062518fe54e311c964f8bfd98f</id>
<content type='text'>
`ruby2_keywords` is set only to be `0` in parse.y.
However `args-&gt;ruby2_keywords` is initialized with `0` by `MEMZERO`
in `rb_node_args_new` function and `body-&gt;param.flags.ruby2_keywords`
is initialized with `0` by `ZALLOC` in `rb_iseq_constant_body_alloc` function,
so `args-&gt;ruby2_keywords` does nothing for `body-&gt;param.flags.ruby2_keywords`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`ruby2_keywords` is set only to be `0` in parse.y.
However `args-&gt;ruby2_keywords` is initialized with `0` by `MEMZERO`
in `rb_node_args_new` function and `body-&gt;param.flags.ruby2_keywords`
is initialized with `0` by `ZALLOC` in `rb_iseq_constant_body_alloc` function,
so `args-&gt;ruby2_keywords` does nothing for `body-&gt;param.flags.ruby2_keywords`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NODE SCLASS locations</title>
<updated>2025-08-30T13:41:23+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-08-30T12:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dd4e7801f3f2b7e258016b8e22c6d8870516166b'/>
<id>dd4e7801f3f2b7e258016b8e22c6d8870516166b</id>
<content type='text'>
Add locations to struct `RNode_SCLASS`.

memo:

```
@ ProgramNode (location: (1,0)-(1,18))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,18))
    +-- body: (length: 1)
        +-- @ SingletonClassNode (location: (1,0)-(1,18))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            +-- operator_loc: (1,6)-(1,8) = "&lt;&lt;"
            +-- expression:
            |   @ SelfNode (location: (1,9)-(1,13))
            +-- body: nil
            +-- end_keyword_loc: (1,15)-(1,18) = "end"
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add locations to struct `RNode_SCLASS`.

memo:

```
@ ProgramNode (location: (1,0)-(1,18))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,18))
    +-- body: (length: 1)
        +-- @ SingletonClassNode (location: (1,0)-(1,18))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            +-- operator_loc: (1,6)-(1,8) = "&lt;&lt;"
            +-- expression:
            |   @ SelfNode (location: (1,9)-(1,13))
            +-- body: nil
            +-- end_keyword_loc: (1,15)-(1,18) = "end"
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Make `RubyVM::AST.of` return a parent node of NODE_SCOPE</title>
<updated>2025-08-28T03:44:04+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2025-08-26T09:58:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ccb2de677849732181224cb9fd1a831dbaac4c0'/>
<id>2ccb2de677849732181224cb9fd1a831dbaac4c0</id>
<content type='text'>
This change makes `RubyVM::AST.of` and `.node_id_for_backtrace_location`
return a parent node of NODE_SCOPE (such as NODE_DEFN) instead of the
NODE_SCOPE node itself.
(In future, we may remove NODE_SCOPE, which is a bit hacky AST node.)

This is preparation for [Feature #21543].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change makes `RubyVM::AST.of` and `.node_id_for_backtrace_location`
return a parent node of NODE_SCOPE (such as NODE_DEFN) instead of the
NODE_SCOPE node itself.
(In future, we may remove NODE_SCOPE, which is a bit hacky AST node.)

This is preparation for [Feature #21543].
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NODE IN locations</title>
<updated>2025-08-11T13:25:47+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-08-10T12:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4775d1ffa8a34f0bca3f6124c98426d56eb8e1b6'/>
<id>4775d1ffa8a34f0bca3f6124c98426d56eb8e1b6</id>
<content type='text'>
Add locations to struct `RNode_IN`.

memo:

```bash
&gt; ruby -e 'case 1; in 2 then 3; end' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,24))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,24))
    +-- body: (length: 1)
        +-- @ CaseMatchNode (location: (1,0)-(1,24))
            +-- predicate:
            |   @ IntegerNode (location: (1,5)-(1,6))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 1
            +-- conditions: (length: 1)
            |   +-- @ InNode (location: (1,8)-(1,19))
            |       +-- pattern:
            |       |   @ IntegerNode (location: (1,11)-(1,12))
            |       |   +-- IntegerBaseFlags: decimal
            |       |   +-- value: 2
            |       +-- statements:
            |       |   @ StatementsNode (location: (1,18)-(1,19))
            |       |   +-- body: (length: 1)
            |       |       +-- @ IntegerNode (location: (1,18)-(1,19))
            |       |           +-- IntegerBaseFlags: decimal
            |       |           +-- value: 3
            |       +-- in_loc: (1,8)-(1,10) = "in"
            |       +-- then_loc: (1,13)-(1,17) = "then"
            +-- else_clause: nil
            +-- case_keyword_loc: (1,0)-(1,4) = "case"
            +-- end_keyword_loc: (1,21)-(1,24) = "end"
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add locations to struct `RNode_IN`.

memo:

```bash
&gt; ruby -e 'case 1; in 2 then 3; end' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,24))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,24))
    +-- body: (length: 1)
        +-- @ CaseMatchNode (location: (1,0)-(1,24))
            +-- predicate:
            |   @ IntegerNode (location: (1,5)-(1,6))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 1
            +-- conditions: (length: 1)
            |   +-- @ InNode (location: (1,8)-(1,19))
            |       +-- pattern:
            |       |   @ IntegerNode (location: (1,11)-(1,12))
            |       |   +-- IntegerBaseFlags: decimal
            |       |   +-- value: 2
            |       +-- statements:
            |       |   @ StatementsNode (location: (1,18)-(1,19))
            |       |   +-- body: (length: 1)
            |       |       +-- @ IntegerNode (location: (1,18)-(1,19))
            |       |           +-- IntegerBaseFlags: decimal
            |       |           +-- value: 3
            |       +-- in_loc: (1,8)-(1,10) = "in"
            |       +-- then_loc: (1,13)-(1,17) = "then"
            +-- else_clause: nil
            +-- case_keyword_loc: (1,0)-(1,4) = "case"
            +-- end_keyword_loc: (1,21)-(1,24) = "end"
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Add MODULE NODE locations</title>
<updated>2025-08-06T16:07:16+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-07-26T01:31:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bcd21053f733a93a82a34c6f5c23d6af2a8010ed'/>
<id>bcd21053f733a93a82a34c6f5c23d6af2a8010ed</id>
<content type='text'>
Add `keyword_module` amd `keyword_end` locations to struct `RNode_MODULE`.

memo:
```
&gt;ruby --dump=parsetree -e 'module A end'
@ ProgramNode (location: (1,0)-(1,12))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,12))
    +-- body: (length: 1)
        +-- @ ModuleNode (location: (1,0)-(1,12))
            +-- locals: []
            +-- module_keyword_loc: (1,0)-(1,6) = "module"
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,7)-(1,8))
            |   +-- name: :A
            +-- body: nil
            +-- end_keyword_loc: (1,9)-(1,12) = "end"
            +-- name: :A
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `keyword_module` amd `keyword_end` locations to struct `RNode_MODULE`.

memo:
```
&gt;ruby --dump=parsetree -e 'module A end'
@ ProgramNode (location: (1,0)-(1,12))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,12))
    +-- body: (length: 1)
        +-- @ ModuleNode (location: (1,0)-(1,12))
            +-- locals: []
            +-- module_keyword_loc: (1,0)-(1,6) = "module"
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,7)-(1,8))
            |   +-- name: :A
            +-- body: nil
            +-- end_keyword_loc: (1,9)-(1,12) = "end"
            +-- name: :A
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Add DEFINED NODE locations</title>
<updated>2025-07-24T14:30:23+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2025-07-24T12:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fd492a45eb747f49d1f35c09332b654ada0280dc'/>
<id>fd492a45eb747f49d1f35c09332b654ada0280dc</id>
<content type='text'>
Add keyword_defined locations to struct RNode_DEFINED
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add keyword_defined locations to struct RNode_DEFINED
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement COLON3 NODE locations</title>
<updated>2025-06-15T13:37:20+00:00</updated>
<author>
<name>ydah</name>
<email>t.yudai92@gmail.com</email>
</author>
<published>2024-11-02T16:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d60144a4908b9bd64f7cd635defaa68b2abf2638'/>
<id>d60144a4908b9bd64f7cd635defaa68b2abf2638</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement COLON2 NODE locations</title>
<updated>2025-06-15T13:37:20+00:00</updated>
<author>
<name>ydah</name>
<email>t.yudai92@gmail.com</email>
</author>
<published>2024-11-02T16:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c584790bde83bfd6a01ebc9301f2fe00e4986ad7'/>
<id>c584790bde83bfd6a01ebc9301f2fe00e4986ad7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of FL_EXIVAR</title>
<updated>2025-06-13T21:50:30+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-13T15:56:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=15084fbc3c10d21769dd61cd1cd55b2662fa8845'/>
<id>15084fbc3c10d21769dd61cd1cd55b2662fa8845</id>
<content type='text'>
Now that the shape_id gives us all the same information, it's no
longer needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the shape_id gives us all the same information, it's no
longer needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement CLASS NODE locations</title>
<updated>2025-03-08T09:26:40+00:00</updated>
<author>
<name>ydah</name>
<email>t.yudai92@gmail.com</email>
</author>
<published>2024-11-03T14:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=eae0fe37c08b568c0a7cbf904caba4faca517746'/>
<id>eae0fe37c08b568c0a7cbf904caba4faca517746</id>
<content type='text'>
The following Location information has been added This is the information required for parse.y to be a universal parser:

```
❯ ruby --parser=prism --dump=parsetree -e "class A &lt; B; end"
@ ProgramNode (location: (1,0)-(1,16))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,16))
    +-- body: (length: 1)
        +-- @ ClassNode (location: (1,0)-(1,16))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,6)-(1,7))
            |   +-- name: :A
            +-- inheritance_operator_loc: (1,8)-(1,9) = "&lt;"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- superclass:
            |   @ ConstantReadNode (location: (1,10)-(1,11))
            |   +-- name: :B
            +-- body: nil
            +-- end_keyword_loc: (1,13)-(1,16) = "end"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- name: :A
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following Location information has been added This is the information required for parse.y to be a universal parser:

```
❯ ruby --parser=prism --dump=parsetree -e "class A &lt; B; end"
@ ProgramNode (location: (1,0)-(1,16))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,16))
    +-- body: (length: 1)
        +-- @ ClassNode (location: (1,0)-(1,16))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,6)-(1,7))
            |   +-- name: :A
            +-- inheritance_operator_loc: (1,8)-(1,9) = "&lt;"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- superclass:
            |   @ ConstantReadNode (location: (1,10)-(1,11))
            |   +-- name: :B
            +-- body: nil
            +-- end_keyword_loc: (1,13)-(1,16) = "end"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- name: :A
```
</pre>
</div>
</content>
</entry>
</feed>
