| Age | Commit message (Collapse) | Author |
|
|
|
https://github.com/ruby/prism/commit/6e69a81737
|
|
https://github.com/ruby/prism/commit/5f70b32b02
|
|
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
|
|
https://github.com/ruby/prism/commit/e148e8fe6a
|
|
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
|
|
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
|
|
MacJapanese (also aliased as MacJapan) is a modified Shift_JIS
encoding, but is implemented identically in Ruby
https://github.com/ruby/prism/commit/9e0a097699
|
|
https://github.com/ruby/prism/commit/9c2d1cf4ba
|
|
Fundamentally, `foo { |bar,| }` is different from `foo { |bar, *| }`
because of arity checks. This PR introduces a new node to handle
that, `ImplicitRestNode`, which goes in the `rest` slot of parameter
nodes instead of `RestParameterNode` instances.
This is also used in a couple of other places, namely:
* pattern matching: `foo in [bar,]`
* multi target: `for foo, in bar do end`
* multi write: `foo, = bar`
Now the only splat nodes with a `NULL` value are when you're
forwarding, as in: `def foo(*) = bar(*)`.
https://github.com/ruby/prism/commit/dba2a3b652
|
|
https://github.com/ruby/prism/commit/42b60b6e95
|
|
https://github.com/ruby/prism/commit/99dfca6c1d
|
|
https://github.com/ruby/prism/commit/9e78dfdf69
|
|
* The same order as in source code.
* CallOrWriteNode, CallOperatorWriteNode, CallAndWriteNode already have
the correct order so it was also inconsistent with them.
https://github.com/ruby/prism/commit/4434e4bc22
|
|
https://github.com/ruby/prism/commit/1398879d79
|
|
constant
(https://github.com/ruby/prism/pull/1742)
* Raise if constant path parts contains nodes that can't be used to build full name
* Fix typo in constant path error documentation
Co-authored-by: Tim Morgan <tim@timmorgan.org>
---------
https://github.com/ruby/prism/commit/d73a053262
Co-authored-by: Tim Morgan <tim@timmorgan.org>
|
|
(https://github.com/ruby/prism/pull/1899)
https://github.com/ruby/prism/commit/1b41c2d56c
|
|
common code.
Merge the Big5 extensions into pm_big5.c
|
|
(https://github.com/ruby/prism/pull/1809)
https://github.com/ruby/prism/commit/d493ccd093
|
|
https://github.com/ruby/prism/commit/3ca9823eb4
|
|
https://github.com/ruby/prism/commit/1a10f6f9c0
|
|
https://github.com/ruby/prism/commit/fef0019a25
|
|
librubyparser was an artifact of the prototype that was initially
named ruby-parser. Instead, this renames it to libprism to be
consistent with the actual name.
https://github.com/ruby/prism/commit/8600b06811
|
|
https://github.com/ruby/prism/commit/3e4b4fb947
|
|
https://github.com/ruby/prism/commit/b7850f2d30
|
|
https://github.com/ruby/prism/commit/33a85f7867
|
|
https://github.com/ruby/prism/commit/90b3245528
|
|
|
|
https://github.com/ruby/prism/commit/61a306cd5c
|
|
https://github.com/ruby/prism/commit/fbb30216ca
|
|
We were previously holding a type field on Comment to tell what
kind of comment it was. Instead, let's just use actual classes for
this.
https://github.com/ruby/prism/commit/e76830ca6e
|
|
https://github.com/ruby/prism/commit/13fa262669
|
|
https://github.com/ruby/prism/commit/33cc75a4b7
|
|
https://github.com/ruby/prism/commit/5a2252e3ac
|
|
https://github.com/ruby/prism/commit/f0aa8ad93b
|
|
https://github.com/ruby/prism/commit/8582d372a3
|
|
https://github.com/ruby/prism/commit/99e81619de
|
|
|
|
https://github.com/ruby/prism/commit/26934263b7
|
|
https://github.com/ruby/prism/commit/dfdcc98a3c
|
|
https://github.com/ruby/prism/commit/ca9a660f52
|
|
https://github.com/ruby/prism/commit/085da4feb9
|
|
https://github.com/ruby/prism/commit/c2b7724d91
|
|
RequiredKeywordParameterNode
https://github.com/ruby/prism/commit/c31f61e898
|
|
Prior to this commit, KeywordParameterNode included both optional
and required keywords. With this commit, it is split in two, with
`OptionalKeywordParameterNode`s no longer having a value field.
https://github.com/ruby/prism/commit/89084d9af4
|