Takashi Kokubun
27d81b9282
[ruby/prism] Guard 3.3.0 for pinned it
...
https://github.com/ruby/prism/commit/9778377b12
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-01-17 17:47:34 +00:00
Takashi Kokubun
e0d60a833b
[ruby/prism] Fix => ^it
...
https://github.com/ruby/prism/commit/24a2872b4e
2024-01-17 17:47:34 +00:00
Takashi Kokubun
bcc4b07cc3
[ruby/prism] Add a documentation about 0it
...
https://github.com/ruby/prism/commit/313be8e3f7
2024-01-17 17:47:33 +00:00
Takashi Kokubun
603f2ca730
[ruby/prism] Parse `it` default parameter
...
https://github.com/ruby/prism/commit/a0c5361b9f
2024-01-17 17:47:33 +00:00
Kevin Newton
cd4290910c
[ruby/prism] Wording in node field comments
...
https://github.com/ruby/prism/commit/c9c913ee99
2024-01-17 17:42:50 +00:00
nikhilbhatt
32cbbfc97d
[ruby/prism] Added descriptive comments
...
https://github.com/ruby/prism/commit/2695ae115d
2024-01-17 17:35:07 +00:00
nikhilbhatt
5273c4c919
[ruby/prism] Document AndNode and OrNode
...
https://github.com/ruby/prism/commit/a925856c2b
2024-01-17 17:35:06 +00:00
Kevin Newton
3f23cb1a43
[ruby/prism] Remove flag gating for 3.3.0 bug fixes
...
https://github.com/ruby/prism/commit/64baf94271
2024-01-17 15:51:36 +00:00
git
67a545b3d2
* expand tabs. [ci skip]
...
Please consider using misc/expand_tabs.rb as a pre-commit hook.
2024-01-17 13:26:15 +00:00
Adam Hess
13879fea69
[ruby/prism] Fix prism brace association for constant-like method/local calls
...
https://github.com/ruby/prism/commit/8ca24f263e
2024-01-17 13:26:05 +00:00
Kevin Newton
7b6731b1bb
[ruby/prism] Provide abstract methods in Prism::Node
...
To make typechecking easier.
https://github.com/ruby/prism/commit/8f96877d7a
2024-01-16 20:25:50 +00:00
TSUYUSATO Kitsune
c5e43da426
[ruby/prism] Correct the "ambiguous first argument" condition
...
Fix https://github.com/ruby/prism/pull/2182
This change reflects this line:
6283ae8d36/parse.y (L11124)
.
https://github.com/ruby/prism/commit/a52588ff37
2024-01-16 15:51:09 +00:00
Kevin Newton
76a207e542
[ruby/prism] Fix nested default value error
...
https://github.com/ruby/prism/commit/ef26b283de
2024-01-11 20:52:48 +00:00
Kevin Newton
72be786017
[ruby/prism] Allow fsl comment to set to false
...
https://github.com/ruby/prism/commit/b4db7bb703
2024-01-11 19:27:14 +00:00
Kevin Newton
242dc537f9
[ruby/prism] Exclude encodings that are dynamic
...
https://github.com/ruby/prism/commit/6749146c0e
2024-01-11 19:14:25 +00:00
Kevin Newton
6ff9f1aa51
[ruby/prism] Provide ability to format errors
...
https://github.com/ruby/prism/commit/27985b0e7e
2024-01-11 18:36:32 +00:00
Kevin Newton
8333845b0b
[ruby/prism] Unary symbols that cannot be binary should drop @
...
https://github.com/ruby/prism/commit/d139af033f
2024-01-10 20:24:31 +00:00
Aaron Patterson
f165fa09e7
[ruby/prism] address feedback
...
https://github.com/ruby/prism/commit/ed183ad30c
2024-01-10 15:24:26 +00:00
Aaron Patterson
881c5a1846
[ruby/prism] Add a "repeated flag" to parameter nodes
...
It's possible to repeat parameters in method definitions like so:
```ruby
def foo(_a, _a)
end
```
The compiler needs to know to adjust the local table size to account for
these duplicate names. We'll use the repeated parameter flag to account
for the extra stack space required
https://github.com/ruby/prism/commit/b443cb1f60
Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2024-01-10 15:24:26 +00:00
Kevin Newton
80da9b1547
[ruby/prism] Clarify __END__ comment
...
https://github.com/ruby/prism/commit/3e36d5eabc
2024-01-09 19:02:26 +00:00
Kevin Newton
88d7838445
[ruby/prism] Fix assertion on spanning heredocs
...
https://github.com/ruby/prism/commit/e190308845
2024-01-09 15:15:52 +00:00
Matthew Healy
c39c49cb24
[ruby/prism] Add missing comment key
...
https://github.com/ruby/prism/commit/723480a107
2024-01-08 18:47:18 +00:00
matthew healy
eef74d8367
[ruby/prism] Fix spacing in documentation comment
...
https://github.com/ruby/prism/commit/8408961e76
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-01-08 18:47:17 +00:00
Matthew Healy
d02455afc1
[ruby/prism] Add comments documenting RangeNode fields
...
https://github.com/ruby/prism/commit/e6aef6499b
2024-01-08 18:47:17 +00:00
matthew healy
1e7d1da3b0
[ruby/prism] Clarify keys and values in AssocNode must be non-void
...
https://github.com/ruby/prism/commit/0caca53a2c
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-01-08 18:47:06 +00:00
Matthew Healy
b57c5e560e
[ruby/prism] Add comments for AssocSplatNode fields
...
https://github.com/ruby/prism/commit/a0fd874848
2024-01-08 18:47:06 +00:00
Matthew Healy
04ae8fb3a9
[ruby/prism] Add comments for AssocNode fields
...
https://github.com/ruby/prism/commit/fb60072a1e
2024-01-08 18:47:06 +00:00
Matthew Healy
7e09dd433b
[ruby/prism] Add comments for HashNode fields
...
https://github.com/ruby/prism/commit/649e209519
2024-01-08 18:47:05 +00:00
Kevin Newton
d1d50a0505
[ruby/prism] Handle parsing a line break in a receiver of a method
...
https://github.com/ruby/prism/commit/4d5f43ecbc
2024-01-08 14:34:59 +00:00
Benoit Daloze
7304d56236
[ruby/prism] Include field comments in Java source
...
https://github.com/ruby/prism/commit/4a9389f304
2024-01-03 20:00:18 +00:00
TSUYUSATO Kitsune
a25329e0da
[ruby/prism] Fix parsing pinned local variable pattern for numbered parameter
...
Fix https://github.com/ruby/prism/pull/2094
The part of `parse_variable_call` for variables was split into a new
function `parse_variable` and used it.
https://github.com/ruby/prism/commit/4c5fd1a746
2024-01-03 17:20:33 +00:00
Kevin Newton
0215965df4
[ruby/prism] Better error recovery for content after unterminated heredoc
...
https://github.com/ruby/prism/commit/c2d325a886
2024-01-03 16:46:08 +00:00
Kevin Newton
a1d0c621e9
[ruby/prism] More spacing in config.yml
...
https://github.com/ruby/prism/commit/825ff8b9ec
2024-01-03 16:44:38 +00:00
Kevin Newton
ca2a6b7d4d
[ruby/prism] Spacing in config.yml
...
https://github.com/ruby/prism/commit/983561988e
2024-01-03 16:44:37 +00:00
Sanjay Karukamanna
06a65ce641
[ruby/prism] Document `IntegerNode` fields
...
https://github.com/ruby/prism/commit/77280b2807
2024-01-03 16:44:37 +00:00
Kevin Newton
e46922e48f
[ruby/prism] Introduce field comments
...
In an effort to further improve our documentation, this commit
introduces the concept of templating comments onto fields. I hope
to get more documentation above the nuances of specific fields this
way going forward.
With this, we template the comments into C and Ruby. I haven't done
JS or Java yet, but we can touch those in the future, especially
once their documentation is published.
https://github.com/ruby/prism/commit/af300d5fb3
2024-01-02 21:16:35 +00:00
Kevin Newton
adbfbd822f
[ruby/prism] Ignore visibility flag
...
https://github.com/ruby/prism/commit/55b049ddac
2024-01-02 20:59:19 +00:00
Kevin Newton
380c218bfa
[ruby/prism] Do not add error for forwarding in CRuby 3.3.0
...
https://github.com/ruby/prism/commit/a28e57c650
2024-01-02 19:10:43 +00:00
TSUYUSATO Kitsune
0ee625ceae
[ruby/prism] Fix to check multiple block arguments for forwarding arg
...
Fix https://github.com/ruby/prism/pull/2111
https://github.com/ruby/prism/commit/21ca243d0a
2024-01-02 19:08:15 +00:00
Kevin Newton
165deec5fe
[ruby/prism] Document the version option on prism parse
...
https://github.com/ruby/prism/commit/eddd72a8ef
2024-01-02 18:59:26 +00:00
Kevin Newton
23beceedb7
[ruby/prism] IndexTargetNode should always have ATTRIBUTE_WRITE
...
Because this is a user-facing change, we also need to deal with the
fact that CRuby 3.3.0 was just released.
In order to support workflows that want to parse exactly as CRuby
parses in a specific version, this PR introduces a new option to
the options struct that is "version". This allows you to specify
that you want "3.3.0" parsing.
I'm not sure if this is the correct solution. Another solution is
to just fork and keep around the old branch for security patches.
Or we could keep around a copy of the source files within this
repository as another directory and only update when necessary.
There are a lot of potential solutions here.
Because this change is so small and the check for it is so minimal,
I've decided to go with this enum. If this ends up entirely
cluttering the codebase with version checks, we'll come up with
another solution. But for now this works, so we're going to go in
this direction for a bit until we determine it's no longer working.
https://github.com/ruby/prism/commit/d8c7e6bd10
2024-01-02 18:51:18 +00:00
Kevin Newton
28ec79404a
Sync to latest prism
2024-01-02 11:34:04 -05:00
Hiroshi SHIBATA
fa251d60aa
Revert "Revert all of commits after Prism 0.19.0 release"
...
This reverts commit d242e8416e
.
2023-12-25 21:12:49 +09:00
Hiroshi SHIBATA
d242e8416e
Revert all of commits after Prism 0.19.0 release
...
We should bundle released version of Prism for Ruby 3.3.0
2023-12-16 11:08:51 +08:00
Gopal Patel
b9542246c9
[ruby/prism] Fix majority of RBS type mismatches
...
https://github.com/ruby/prism/commit/62cc50e41b
2023-12-15 21:14:58 +00:00
eileencodes
2e8cfcac91
[ruby/prism] String literal hash keys should be frozen
...
String literal hash keys can't be mutated by the user so we should mark
them as frozen. We were seeing instructions for hashes with string
literal keys using two `putstring` instructions when it should be a
`putobject` and `putstring`.
Code example:
```ruby
{ "a" => "b" }
```
Instructions before:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,14)>
0000 putobject "a" ( 2)[Li]
0002 putstring "b"
0004 newhash 2
0006 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,14)>
0000 putstring "a" ( 1)[Li]
0002 putstring "b"
0004 newhash 2
0006 leave
```
Instructions after:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,14)>
0000 putobject "a" ( 2)[Li]
0002 putstring "b"
0004 newhash 2
0006 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,14)>
0000 putobject "a" ( 1)[Li]
0002 putstring "b"
0004 newhash 2
0006 leave
```
https://github.com/ruby/prism/commit/b14ae55385
2023-12-15 20:55:13 +00:00
Ufuk Kayserilioglu
0a31cb1a37
[ruby/prism] Finish keyword hash node flag refactor by renaming flag
...
https://github.com/ruby/prism/commit/7f812389f8
2023-12-15 18:45:36 +00:00
Kevin Newton
f38814564b
[ruby/prism] Fix eval parsing depth
...
https://github.com/ruby/prism/commit/89bf7a4948
2023-12-15 15:19:50 +00:00
Kevin Newton
fe9b42f024
[ruby/prism] Invalid pinned locals in pattern matching
...
https://github.com/ruby/prism/commit/3a67b37a56
2023-12-15 15:03:49 +00:00
Kevin Newton
854ff25f4f
[ruby/prism] Add TODO comment
...
https://github.com/ruby/prism/commit/885d1d78cb
2023-12-15 13:26:40 +00:00