Commit graph

18 commits

Author SHA1 Message Date
Kevin Newton
39dcfe26ee [ruby/prism] Move Node#type and Node::type documentation
08a71f6259
2024-07-11 14:25:54 -04:00
Kevin Newton
687be43c79 [ruby/prism] Expose flags on every node type
9f12a56fd6
2024-07-11 14:25:54 -04:00
Kevin Newton
72452f4387 [ruby/prism] Tests overhaul
6f886be0a4
2024-05-30 15:18:20 -04:00
Kevin Newton
f8b750370e [ruby/prism] Remove Debug module
4d8929ff6a
2024-05-24 17:19:38 +00:00
Kevin Newton
79001c8b4a [ruby/prism] Remove error formatting, put directly in CRuby
53b2866487
2024-05-24 17:19:36 +00:00
Kevin Newton
e90e8f8bd3 [ruby/prism] Implement ambiguous binary operator warning
6258c3695f
2024-05-20 14:01:05 +00:00
Kevin Newton
92af705498 [ruby/prism] Truncate source lines in errors messages when too long
72518f5716
2024-05-16 19:35:10 +00:00
Kevin Newton
0981f03008 [PRISM] Enable newline test 2024-05-02 12:29:25 -04:00
Kevin Newton
d1ce989829 [ruby/prism] Duplicated hash keys
3e10c46c14
2024-02-23 13:25:31 -05:00
Kevin Newton
14a7277da1 [ruby/prism] Speed up creating Ruby AST
When creating the Ruby AST, we were previously allocating Location
objects for every node and every inner location. Instead, this
commit changes it to pack both the start offset and length into a
single u64 and pass that into the nodes. Then, when the locations
are requested via a reader method, we lazily allocate the Location
objects.

de203dca83

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2024-02-15 20:39:50 +00:00
Kevin Newton
f12ebe1188 [ruby/prism] Add parser translation
8cdec8070c
2024-01-27 19:59:42 +00:00
Kevin Newton
1301422dfe [PRISM] Fix VM_CALL_ARGS_SPLAT_MUT failures 2024-01-25 11:11:50 -05:00
Jeremy Evans
4f77d8d328 Do not use ruby2_keywords for ... argument forwarding
This allows ... argument forwarding to benefit from Allocationless
Anonymous Splat Forwarding, allowing the `f` call below to not
allocate an array or a hash.

```ruby
a = [1]
kw = {b: 2}

def c(a, b:)
end

def f(...)
  c(...)
end

f(*a, **kw)
```

This temporarily skips prism locals tests until prism is changed
to use * and ** for ..., instead of using ruby2_keywords.

Ignore failures in rbs bundled gems tests, since they fail due
to this change.
2024-01-24 18:25:55 -08:00
Kevin Newton
f60b974393 [ruby/prism] Add cp855 encoding
8069d143f5
2023-11-16 17:39:32 +00:00
Kevin Newton
d7d3243364
[ruby/prism] Properly support the start line option
33cc75a4b7
2023-11-03 10:13:50 -04:00
Kevin Newton
f3e77f36c5 [ruby/prism] Fix up newline test
9fdb41d8ba
2023-10-26 19:40:21 +00:00
Kevin Newton
4f73a7c2f7 Sync to prism rename commits 2023-09-27 13:57:38 -04:00
Kevin Newton
8ab56869a6 Rename YARP filepaths to prism filepaths 2023-09-27 13:57:38 -04:00
Renamed from test/yarp/newline_test.rb (Browse further)