| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/prism/commit/138db9ccc4
|
|
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
|
|
https://github.com/ruby/prism/commit/34428946db
|
|
https://github.com/ruby/prism/commit/44c4306247
|
|
The docs currently say to use `Prism.parse(foo, version: RUBY_VERSION)` for this.
By specifying "current" instead, we can have prism raise a more specifc error.
Note: Does not use `ruby_version` from `ruby/version.h` because writing a test for that is not really possible.
`RUBY_VERSION` is nicely stubbable for both the c-ext and FFI backend.
https://github.com/ruby/prism/commit/9c5cd205cf
|
|
When parent scopes around an eval are forwarding parameters (like
*, **, &, or ...) we need to know that information when we are in
the parser. As such, we need to support passing that information
into the scopes option. In order to do this, unfortunately we need
a bunch of changes.
The scopes option was previously an array of array of strings.
These corresponded to the names of the locals in the parent scopes.
We still support this, but now additionally support passing in a
Prism::Scope instance at each index in the array. This Prism::Scope
class holds both the names of the locals as well as an array of
forwarding parameter names (symbols corresponding to the forwarding
parameters). There is convenience function on the Prism module that
creates a Prism::Scope object using Prism.scope.
In JavaScript, we now additionally support an object much the same
as the Ruby side. In Java, we now have a ParsingOptions.Scope class
that holds that information. In the dump APIs, these objects in all
3 languages will add an additional byte for the forwarding flags in
the middle of the scopes serialization.
All of this is in service of properly parsing the following code:
```ruby
def foo(*) = eval("bar(*)")
```
https://github.com/ruby/prism/commit/21abb6b7c4
|
|
To make it so that you can pass `freeze: true` to Prism parse
methods and get back a deeply-frozen AST that is Ractor-
shareable.
https://github.com/ruby/prism/commit/8e6a93b2d2
|
|
https://github.com/ruby/prism/commit/6b6aa05bfb
|
|
method call to handle -l CLI option
https://github.com/ruby/prism/commit/717e41c87d
|
|
https://github.com/ruby/prism/commit/098f1c4607
|
|
https://github.com/ruby/prism/commit/b28877fa4f
|
|
https://github.com/ruby/prism/commit/4ed7de537b
|
|
Fixes [Bug #20730]
Notes:
Merged: https://github.com/ruby/ruby/pull/11617
|
|
|
|
https://github.com/ruby/prism/commit/d68ea29d04
Notes:
Merged: https://github.com/ruby/ruby/pull/11497
|
|
https://github.com/ruby/prism/commit/487f0ffe78
|
|
https://github.com/ruby/prism/commit/31154a389a
|
|
https://github.com/ruby/prism/commit/084baca463
|
|
https://github.com/ruby/prism/commit/4a41d298c8
|
|
https://github.com/ruby/prism/commit/6f886be0a4
|