| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/prism/commit/12649ee74c
|
|
otherwise we get failing tests if we have non-ascii
characters in fixtures/**/*.txt
https://github.com/ruby/prism/commit/9323243569
|
|
https://github.com/ruby/prism/commit/8ca24f263e
|
|
Fix https://github.com/ruby/prism/pull/2182
This change reflects this line:
https://github.com/ruby/ruby/blob/6283ae8d369bd2f8a022bb69bc5b742c58529dec/parse.y#L11124.
https://github.com/ruby/prism/commit/a52588ff37
|
|
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>
|
|
https://github.com/ruby/prism/commit/e190308845
|
|
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
|
|
This reverts commit d242e8416e99eaee4465e2681210ae8b7ecd6d34.
|
|
We should bundle released version of Prism for Ruby 3.3.0
|
|
https://github.com/ruby/prism/commit/3a67b37a56
|
|
https://github.com/ruby/prism/commit/ee6fc9ee87
|
|
https://github.com/ruby/prism/commit/b23136ebfd
|
|
Fix https://github.com/ruby/prism/pull/2022
Fix https://github.com/ruby/prism/pull/2030
https://github.com/ruby/prism/commit/b78d8b6525
|
|
It's possible to write the following and have it be valid Ruby:
```
defined?("foo"
)
```
But Prism wasn't taking the new line into account. This adds an
`accept1` for a `PM_TOKEN_NEWLINE` to account for this. I've also
updated the fixtures and snapshots to test this.
https://github.com/ruby/prism/commit/b87f8eedc6
|
|
https://github.com/ruby/prism/commit/e91f8dbb99
|
|
https://github.com/ruby/prism/commit/d5453f168e
|
|
Fix https://github.com/ruby/prism/pull/1468
Fix https://github.com/ruby/prism/pull/1575
To decide command-style method calls are allowed, this introduce a new
parameter `accepts_command_call` to `parse_expression` and some
functions.
Although one think this can be solved by operator precedence, it is
hard or impossible, because the precedence of command-style calls is skewed
(e.g. `! bar 1 ` is accepted, but `foo = ! bar 1` is rejected.)
One of the most complex examples is that:
(1) even though `foo = bar = baz 1` and `foo, bar = baz 1` is accepted,
(2) `foo, bar = baz = fuzz 1` is rejected.
To implement this behavior, this introduces a new binding power
`PM_BINDING_POWER_MULTI_ASSIGNMENT` and uses it for distinguish which single
assignments or multi assignments at their RHS.
https://github.com/ruby/prism/commit/d4dd49ca81
|
|
https://github.com/ruby/prism/commit/aa8c702271
|
|
The problem was deeper than just looking back a single token.
You can push the heredoc_end token way back into the list.
We need to save the last location of a heredoc end to see if
it's the last token in the file.
Fixes https://github.com/ruby/prism/pull/1954
https://github.com/ruby/prism/commit/91dfd4eecd
|
|
Fixes https://github.com/ruby/prism/pull/1874
https://github.com/ruby/prism/commit/304dd78dd2
|
|
Fix https://github.com/ruby/prism/pull/1936
https://github.com/ruby/prism/commit/232e77a003
|
|
It is for supporting `def foo(bar = (def baz(bar) = bar; 1)) = 2` case.
https://github.com/ruby/prism/commit/c789a833c5
|
|
Fix https://github.com/ruby/prism/pull/1924
https://github.com/ruby/prism/commit/7cde900065
|
|
Fix https://github.com/ruby/prism/pull/1925
Fix https://github.com/ruby/prism/pull/1927
Previously pm_call_node_index_p does not check about a block argument
correctly and is not used in parse_write to check an index call node.
This commit fixes these problems.
https://github.com/ruby/prism/commit/92bab044ff
|
|
Fix https://github.com/ruby/prism/pull/1821
https://github.com/ruby/prism/commit/7d023a26b4
|
|
Fix https://github.com/ruby/prism/pull/1828
https://github.com/ruby/prism/commit/22c0640e48
|
|
Fix https://github.com/ruby/prism/pull/1839
https://github.com/ruby/prism/commit/5784ab749f
|
|
(https://github.com/ruby/prism/pull/1591)
https://github.com/ruby/prism/commit/46b8576dd0
|
|
https://github.com/ruby/prism/commit/eec1862967
|
|
(https://github.com/ruby/prism/pull/1836)
* Don't add an invalid identifier capture to locals
Fix https://github.com/ruby/prism/pull/1815
* Delay creating a MatchWriteNode
https://github.com/ruby/prism/pull/1836#discussion_r1393716600
https://github.com/ruby/prism/commit/635f595a36
|
|
https://github.com/ruby/prism/commit/d81a77e0e3
|
|
Fix https://github.com/ruby/prism/pull/1515
It is also fixed by #1807, so this adds only test cases.
https://github.com/ruby/prism/commit/a0092f075e
|
|
Because the lex mode may be freed when popped, we need to store off
this value for dedentation.
https://github.com/ruby/prism/commit/64007322f5
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
|
|
Fix https://github.com/ruby/prism/pull/1586
https://github.com/ruby/prism/commit/b3bde866f2
|
|
Fix https://github.com/ruby/prism/pull/1596
Fix https://github.com/ruby/prism/pull/1771
Close https://github.com/ruby/prism/pull/1773
https://github.com/ruby/prism/commit/a3413e5605
|
|
Fix https://github.com/ruby/prism/pull/1772
https://github.com/ruby/prism/commit/cdf58e845e
|
|
https://github.com/ruby/prism/commit/2a11bfee76
|
|
https://github.com/ruby/prism/commit/ee54244800
|
|
https://github.com/ruby/prism/commit/ec31fd827f
|
|
https://github.com/ruby/prism/commit/41c0e0e06e
|
|
https://github.com/ruby/prism/commit/555551e8f2
|
|
Right now, our Call{Operator,And,Or}WriteNode nodes represent two
different concepts:
```ruby
foo.bar += 1
foo[bar] += 1
```
These two statements are different in what they can support. The
former can never have arguments (or an opening_loc or closing_loc).
The former can also never have a block. Also, the former is a
variable method name.
The latter is always going to be []/[]=, it can have any number of
arguments including blocks (`foo[&bar] ||= 1`), and will always
have an opening_loc and closing_loc.
Furthermore, these statements end of having to take different paths
through the various compilers because with the latter you have to
consider the arguments and the block, whereas the former can
perform some additional peephole optimizations since there are
fewer values on the stack.
For these reasons, I'm introducing Index{Operator,And,Or}WriteNode.
These nodes never have a read_name or write_name on them because
they are always []/[]=. They also support blocks, which the previous
write nodes didn't. As a benefit of introducing these nodes, I've
removed the opening_loc, closing_loc, and arguments from the older
write nodes because they will always be null.
For the serialized format, both of these nodes end up being
smaller, and for in-memory we're storing fewer things in general,
so we have savings all around.
I don't love that we are introducing another node that is a call
node since we generally want consumers to only have to handle a
single call, but these nodes are so specific that they would have
to be handled separately anyway since in fact call 2 methods.
https://github.com/ruby/prism/commit/70155db9cd
|
|
https://github.com/ruby/prism/commit/0ea19ed823
|
|
|
|
|