<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism/templates/src/serialize.c.erb, branch v3_3_11</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] Provide flags for changing encodings</title>
<updated>2023-12-06T19:23:38+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-12-04T17:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=82f18baa21d0df59c30d8a6e60bf3e0991de1114'/>
<id>82f18baa21d0df59c30d8a6e60bf3e0991de1114</id>
<content type='text'>
https://github.com/ruby/prism/commit/e838eaff6f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/e838eaff6f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Refactor pm_diagnostic_t and pm_comment_t to use pm_location_t</title>
<updated>2023-12-04T14:33:44+00:00</updated>
<author>
<name>Lily Lyons</name>
<email>lily@nowaffles.com</email>
</author>
<published>2023-12-01T21:00:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1227b6d9129d7e978b6bb659c9cb320d47a2aac1'/>
<id>1227b6d9129d7e978b6bb659c9cb320d47a2aac1</id>
<content type='text'>
https://github.com/ruby/prism/commit/115b6a2fc6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/115b6a2fc6
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Prism.parse_success?(source)</title>
<updated>2023-12-01T20:53:34+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-12-01T17:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=492c82cb417a92d1941f10b52e77ec0c4b2cc8a6'/>
<id>492c82cb417a92d1941f10b52e77ec0c4b2cc8a6</id>
<content type='text'>
A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine
if a source is valid. These tools both create an AST instead of
providing an API that will return a boolean only.

This new API only creates the C structs, but doesn't bother
reifying them into Ruby/the serialization API. Instead it only
returns true/false, which is significantly more efficient.

https://github.com/ruby/prism/commit/7014740118
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine
if a source is valid. These tools both create an AST instead of
providing an API that will return a boolean only.

This new API only creates the C structs, but doesn't bother
reifying them into Ruby/the serialization API. Instead it only
returns true/false, which is significantly more efficient.

https://github.com/ruby/prism/commit/7014740118
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Change numbered parameters</title>
<updated>2023-12-01T17:03:09+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-12-01T01:47:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cdb74d74afb87a0d7048a53aaf12d32516033a3c'/>
<id>cdb74d74afb87a0d7048a53aaf12d32516033a3c</id>
<content type='text'>
Previously numbered parameters were a field on blocks and lambdas
that indicated the maximum number of numbered parameters in either
the block or lambda, respectively. However they also had a
parameters field that would always be nil in these cases.

This changes it so that we introduce a NumberedParametersNode that
goes in place of parameters, which has a single uint8_t maximum
field on it. That field contains the maximum numbered parameter in
either the block or lambda.

As a part of the PR, I'm introducing a new UInt8Field type that
can be used on nodes, which is just to make it a little more
explicit what the maximum values can be (the maximum is actually 9,
since it only goes up to _9). Plus we can do a couple of nice
things in serialization like just read a single byte.

https://github.com/ruby/prism/commit/2d87303903
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously numbered parameters were a field on blocks and lambdas
that indicated the maximum number of numbered parameters in either
the block or lambda, respectively. However they also had a
parameters field that would always be nil in these cases.

This changes it so that we introduce a NumberedParametersNode that
goes in place of parameters, which has a single uint8_t maximum
field on it. That field contains the maximum numbered parameter in
either the block or lambda.

As a part of the PR, I'm introducing a new UInt8Field type that
can be used on nodes, which is just to make it a little more
explicit what the maximum values can be (the maximum is actually 9,
since it only goes up to _9). Plus we can do a couple of nice
things in serialization like just read a single byte.

https://github.com/ruby/prism/commit/2d87303903
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Convert start line to signed integers</title>
<updated>2023-11-29T13:56:19+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2023-11-29T10:46:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2af82e23165180f20ca2af374aedb7a45dedcc20'/>
<id>2af82e23165180f20ca2af374aedb7a45dedcc20</id>
<content type='text'>
Ruby allows for 0 or negative line start, this is often used
with `eval` calls to get a correct offset when prefixing a snippet.

e.g.

```ruby
caller = caller_locations(1, 1).first
class_eval &lt;&lt;~RUBY, caller.path, caller.line - 2
  # frozen_string_literal: true
  def some_method
    #{caller_provided_code_snippet}
  end
RUBY
```

https://github.com/ruby/prism/commit/0d14ed1452
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ruby allows for 0 or negative line start, this is often used
with `eval` calls to get a correct offset when prefixing a snippet.

e.g.

```ruby
caller = caller_locations(1, 1).first
class_eval &lt;&lt;~RUBY, caller.path, caller.line - 2
  # frozen_string_literal: true
  def some_method
    #{caller_provided_code_snippet}
  end
RUBY
```

https://github.com/ruby/prism/commit/0d14ed1452
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Rename varint as varuint</title>
<updated>2023-11-29T13:56:18+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2023-11-29T08:56:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2653404840952d25bbdd7deaf599fbfb1f5287f0'/>
<id>2653404840952d25bbdd7deaf599fbfb1f5287f0</id>
<content type='text'>
Line numbers may be negative, so we need to introduce signed varint,
so renaming unsigned ones first avoid confusion.

https://github.com/ruby/prism/commit/90d862361e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Line numbers may be negative, so we need to introduce signed varint,
so renaming unsigned ones first avoid confusion.

https://github.com/ruby/prism/commit/90d862361e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Move DATA parsing into its own parse result field</title>
<updated>2023-11-28T13:25:48+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-11-27T19:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c798943a4a272f213d21295a837da06ed5fa9a51'/>
<id>c798943a4a272f213d21295a837da06ed5fa9a51</id>
<content type='text'>
https://github.com/ruby/prism/commit/42b60b6e95
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/42b60b6e95
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Revert "Ensure serialized file is little endian"</title>
<updated>2023-11-18T01:32:37+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-11-18T01:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f479e629ab497f325091096819fa5bf60c0d03b2'/>
<id>f479e629ab497f325091096819fa5bf60c0d03b2</id>
<content type='text'>
https://github.com/ruby/prism/commit/4cec275fff
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/4cec275fff
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Ensure serialized file is little endian</title>
<updated>2023-11-17T20:11:25+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-11-13T20:05:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7c99e43c3f050244b06dbd18de4f605ea70d234c'/>
<id>7c99e43c3f050244b06dbd18de4f605ea70d234c</id>
<content type='text'>
https://github.com/ruby/prism/commit/0c762ee68a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/0c762ee68a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix up lint</title>
<updated>2023-11-03T14:13:50+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2023-11-02T22:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aab2a6a8a3166c9d3eeaf7a41191afde515e6271'/>
<id>aab2a6a8a3166c9d3eeaf7a41191afde515e6271</id>
<content type='text'>
https://github.com/ruby/prism/commit/4f3a3e3ec1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/4f3a3e3ec1
</pre>
</div>
</content>
</entry>
</feed>
