Commit graph

20 commits

Author SHA1 Message Date
Philip Mueller
f7d1699f67 [ruby/prism] Implement case equality on nodes
dc121e4fdf
2024-04-23 13:53:23 +00:00
Kevin Newton
cd516ebd20 [ruby/prism] Add Location#chop
5dd57f4b84
2024-04-11 18:53:30 +00:00
Kevin Newton
fcc06fa82a [ruby/prism] CLI -x flag
2068e3c30a
2024-03-28 12:04:35 -04:00
Kevin Newton
af7bf9e0d8 [ruby/prism] Provide options for reducing size
592128de4d
2024-03-20 17:32:03 -04:00
Kevin Newton
2ab75bc444 [ruby/prism] Support offset
665f533373
2024-03-11 14:49:23 +00:00
Kevin Newton
b1964a9204 [ruby/prism] Add code unit APIs to location
LSPs need this because the protocol dictates that you return code
units for offsets. None of our existing APIs provided that
information, and since we hid the source it's not nearly as useful
for them. Now they can pass an encoding directly to:

* Location#start_code_units_offset
* Location#end_code_units_offset
* Location#start_code_units_column
* Location#end_code_units_column

4757a2cc06

Co-Authored-By: Vinicius Stock <vinicius.stock@shopify.com>
2024-02-13 20:10:25 +00:00
Kevin Newton
3a3fcf56d0 [ruby/prism] Fix rational when parsing non decimal integer
75d4331f7f
2024-01-03 17:18:02 +00: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
Kevin Newton
f38814564b [ruby/prism] Fix eval parsing depth
89bf7a4948
2023-12-15 15:19:50 +00:00
Kevin Newton
c05278e425 [ruby/prism] Update ordering of integer base flags
d711950d5f
2023-12-07 16:00:41 +00:00
Kevin Newton
10bc0bd4ab [ruby/prism] Remove warnings check from parse_success? method
e30a241fb3
2023-12-07 14:39:11 +00:00
Kevin Newton
492c82cb41 [ruby/prism] Prism.parse_success?(source)
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.

7014740118
2023-12-01 20:53:34 +00:00
Kevin Newton
ec83bd7356 [ruby/prism] Provide heredoc? queries
e148e8fe6a
2023-12-01 18:46:52 +00:00
Kevin Newton
f2ed7eaba0 [ruby/prism] Add character APIs for locations
(https://github.com/ruby/prism/pull/1809)

d493ccd093
2023-11-20 16:07:06 +00:00
Kevin Newton
d7d3243364
[ruby/prism] Properly support the start line option
33cc75a4b7
2023-11-03 10:13:50 -04:00
Kevin Newton
05f5c545d2
[ruby/prism] Wire up options through the FFI API
f0aa8ad93b
2023-11-03 10:13:49 -04:00
Kevin Newton
ca7297efd3
[ruby/prism] Wire up options through the Ruby API
8582d372a3
2023-11-03 10:13:49 -04: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/ruby_api_test.rb (Browse further)