| Age | Commit message (Collapse) | Author |
|
|
|
Change rescue modifier binding power from PM_BINDING_POWER_COMPOSITION
to PM_BINDING_POWER_MATCH + 1, so that `x = a rescue b in c` is parsed
as `(x = (a rescue b)) in c` and `def f = a rescue b in c` is parsed
as `(def f = (a rescue b)) in c`.
https://github.com/ruby/prism/commit/7e797f59ae
|
|
in is a unique keyword because it can be the start of a clause or
an infix keyword. We need to be explicitly sure that even though in
_could_ close an expression context (the body of another in clause)
that we are not also parsing an inline in. The exception is the
case of a command call, which can never be the LHS of an expression,
and so we must immediately exit.
[Bug #21925]
[Bug #21674]
https://github.com/ruby/prism/commit/20374ced51
|
|
They currently complain that the parent method is not forwarding.
But the actual problem is that these types of arguments simply don't
accept `...`
Fixes [Bug #21927]
https://github.com/ruby/prism/commit/0aa2363331
|
|
It gets confused for syntax introduced in https://bugs.ruby-lang.org/issues/20925
But it actually should be a plain method call.
`!`/`?` are not valid as part of an identifier, methods
however allow them as the last character.
Fixes [Bug #21946]
https://github.com/ruby/prism/commit/5d80bc5e1a
|
|
|
|
https://github.com/ruby/prism/commit/21c499d6e4
|
|
Redo of https://github.com/ruby/prism/pull/3669 with more tests
https://github.com/ruby/prism/commit/48b403ea79
|
|
https://github.com/ruby/prism/commit/138db9ccc4
|
|
https://github.com/ruby/prism/commit/609c80c91e
|
|
When you have a regular expression that has a named capture that
has an escape sequence in the named capture, and that escape
sequence is a unicode escape sequence with an invalid surrogate
pair, the error was attached to the owned string as opposed to a
location on the shared source.
https://github.com/ruby/prism/commit/793a7a6a0a
|
|
https://github.com/ruby/prism/commit/65595d6c2c
|
|
https://github.com/ruby/prism/commit/fc150b1588
|
|
Fixes https://github.com/ruby/prism/pull/3729.
https://github.com/ruby/prism/commit/6e5347803c
|
|
When you have a heredoc interpolated into another heredoc where
the inner heredoc is terminated by a newline, you need to avoid
adding the newline character a second time.
https://github.com/ruby/prism/commit/8eeb5f358b
|
|
If a block exit has a further block exit in its subtree, we need to
keep recursing.
https://github.com/ruby/prism/commit/855d81a4a8
|
|
When there is an invalid syntax tree, we need to make sure to fill
in the required call operator location.
https://github.com/ruby/prism/commit/937313d7f0
|
|
https://github.com/ruby/prism/commit/0ad30561e2
|
|
Just clean the directory if it exists and is empty.
|
|
Fixes https://github.com/ruby/prism/pull/3790.
https://github.com/ruby/prism/commit/173ccb84ad
|
|
When replacing an owned constant by a different type (constant or
shared) replace with the correct type instead of defaulting to
shared.
https://github.com/ruby/prism/commit/fbe9b131a1
|
|
Fixes https://github.com/ruby/prism/pull/3786.
https://github.com/ruby/prism/commit/b72b664675
|
|
Fixes https://github.com/ruby/prism/pull/3784.
https://github.com/ruby/prism/commit/3fe862534b
|
|
The lexer did not jump to the `heredoc_end`, causing the heredoc end delimiter
to be parsed twice.
Normally the heredocs get flushed when a newline is encountered. But because
the newline is part of the string delimiter, that codepath is not taken.
Fixes [Bug #21758]
https://github.com/ruby/prism/commit/7440eb4b11
|
|
Not so sure how to trigger it but this is definitly more correct.
https://github.com/ruby/prism/commit/1bc8ec5e5d
|
|
heredocs
See https://bugs.ruby-lang.org/issues/21756. Ripper fails to parse this,
but prism actually also doesn't handle it correctly.
When heredocs are used, even in lowercase percent arays there can be
multiple `STRING_CONTENT` tokens. We need to concat them.
Luckily we don't need to handle as many cases as in uppercase arrays where interpolation is allowed.
https://github.com/ruby/prism/commit/211677000e
|
|
https://github.com/ruby/prism/commit/c8e1b11120
|
|
https://github.com/ruby/prism/commit/cc0ca08757
|
|
https://github.com/ruby/prism/commit/1988615ce1
|
|
https://github.com/ruby/prism/commit/7ab6d9df47
|
|
https://github.com/ruby/prism/commit/a20afe1674
|
|
https://github.com/ruby/prism/commit/3e0b5c9eb7
|
|
https://github.com/ruby/prism/commit/7eb169513a
|
|
Hide the initialization of the base node inside the node
initializer lists by a macro. As such, consistently enforce flags
are set properly.
https://github.com/ruby/prism/commit/c7b3d66d84
|
|
When you have a %-literal that is delimited by newlines, and you
are also interpolating a heredoc into that literal, then both
concepts will attempt to add the same newline to the newline list.
https://github.com/ruby/prism/commit/c831abb888
|
|
https://github.com/ruby/prism/commit/17b246fd6a
|
|
The unicode version has been updated upstream, which means new
codepoints mapped to alpha/alnum/isupper flags. We need to update
our tables to match.
I'm purposefully not adding a version check here, since that is
such a large amount of code. It's possible that we could include
different tables depending on a macro (like UNICODE_VERSION) or
something to that effect, but it's such a minimal impact on the
running of the actual parser that I don't think it's necessary.
https://github.com/ruby/prism/commit/78925fe5b6
|
|
When we are about to destroy a node because of a syntax error, we
need to check if it is potentially containing an implicit
parameter in its subtree.
https://github.com/ruby/prism/commit/1531433e02
|
|
If we are about to delete a call operator write argument, it needs
to be removed from the list of block exits as well.
https://github.com/ruby/prism/commit/ebc91c2e39
|
|
https://github.com/ruby/prism/commit/b960079559
|
|
https://github.com/ruby/prism/commit/e24e701f3a
Co-authored-by: Steven Johnstone <steven.james.johnstone@gmail.com>
|
|
https://github.com/ruby/prism/commit/e3e2b1ed04
|
|
https://github.com/ruby/prism/commit/198080c106
Co-authored-by: Steven Johnstone <steven.james.johnstone@gmail.com>
|
|
When a pattern match is using a string as a hash pattern key and is
using it incorrectly, we were previously assuming it was a symbol.
In the case of an error, that's not the case. So we need to add a
missing node in this case.
https://github.com/ruby/prism/commit/f0b06d6269
|
|
https://github.com/ruby/prism/commit/5b7456c8f6
|
|
|
|
https://github.com/ruby/prism/commit/fef2c20777
|
|
Fixes https://github.com/ruby/prism/pull/3740
https://github.com/ruby/prism/commit/464a849184
|
|
Fixes https://github.com/ruby/prism/pull/3738.
https://github.com/ruby/prism/commit/37bb46ff5f
|
|
They were being parsed as `p((p a, &block) => value)`.
When we get to this point, we must not just have parsed a command call, always consuming the `=>` is not correct.
Closes [Bug #21622]
https://github.com/ruby/prism/commit/796ab0edf4
|