Kevin Newton
dae6a0a295
[ruby/yarp] Introduce YARP::Pattern
...
2a12e9637b
2023-09-06 14:19:58 +00:00
Kevin Newton
4c9a036606
[ruby/yarp] Add constants and constants
...
d7eaa89bc3
2023-09-06 13:00:23 +00:00
Kevin Newton
c666077182
[ruby/yarp] Add global variables to the constant pool
...
b48067b067
2023-09-01 22:52:14 +00:00
Kevin Newton
1c622a6b58
[ruby/yarp] Bump to v0.10.0
...
b6164a76d9
2023-09-01 20:56:15 +00:00
Benoit Daloze
4172036bc6
[ruby/yarp] Do not desugar Foo::Bar {||,&&,+}= baz as it is incorrect without a temporary variable
...
* See https://github.com/ruby/yarp/pull/1329#discussion_r1310775433 for details.
f0fdcba0c3
2023-09-01 13:18:29 +00:00
Benoit Daloze
7fb56df726
[ruby/yarp] Fix comments for methods using desugar_or_write_defined_node
...
a39147736e
2023-09-01 13:18:29 +00:00
Kevin Newton
00dbee94ac
[ruby/yarp] Add class variables to the constant pool
...
be5cb60c83
2023-08-30 19:59:28 +00:00
Kevin Newton
c4998bc3f2
[ruby/yarp] Desugar ||= more accurately
...
Class variables, global variables, constants, and constant paths
should actually desugar to `defined?` instead of just reading the
value.
551a59b876
2023-08-30 16:51:17 +00:00
Kevin Newton
b435161404
[ruby/yarp] Add instance variable names to the constant pool
...
f049932c44
2023-08-29 20:12:57 +00:00
Benoit Daloze
5937d01f7f
[ruby/yarp] Rename constant pool fields to name or operator
...
* `constant_id` and `operator_id` are confusing.
* See https://github.com/ruby/yarp/issues/1296
09d0a144df
2023-08-27 16:18:15 +00:00
Kevin Newton
e2b8eac767
[ruby/yarp] Bump to version 0.9.0
...
b327e39527
2023-08-26 00:20:44 +00:00
Kevin Newton
ca9a44795b
Remove version templating in YARP
2023-08-25 18:20:51 -04:00
Kevin Newton
9b8602dd90
[ruby/yarp] Introduce parse_lex instead of asking for a block
...
7e70339fe1
2023-08-25 21:10:19 +00:00
Kevin Newton
934552618e
[ruby/yarp] Fix relative require for version in YARP gemspec
...
ca8e8cfa0d
2023-08-25 19:48:51 +00:00
Benoit Daloze
f603497105
[ruby/yarp] Use templating to avoid duplicating the YARP version in many places
...
9c359fd92e
2023-08-25 19:37:17 +00:00
Kevin Newton
2ebaf077f6
[ruby/yarp] Provide a desugar visitor
...
9fad513089
2023-08-25 19:31:30 +00:00
Kevin Newton
649aba28f4
[ruby/yarp] Add Node#copy and MutationVisitor
...
3693091661
2023-08-25 19:31:28 +00:00
HParker
f84690c6e2
[ruby/yarp] ignore state on embexpr_end
...
Ripper state can carry over from the previous node type making coparison less useful
74509728d4
2023-08-25 19:11:14 +00:00
Kevin Newton
7002d44c10
Fix merge conflict in lib/yarp/lex_compat.rb
2023-08-25 09:00:04 -04:00
Kevin Newton
ec7a2fdc03
[ruby/yarp] Fix up lex compat on Ruby HEAD
...
7710cee248
2023-08-25 12:49:37 +00:00
Nobuyoshi Nakada
fe8f6dfed1
Remove yarp hack for BOM
2023-08-25 20:07:10 +09:00
Kevin Newton
0e3dc5a056
[ruby/yarp] Fix lex compat with BOM
...
* BOM should not impact looking for the encoding string
* We should re-encode tokens when the encoding changes
* BOM should change the column of comments only
119fc2d7b2
2023-08-24 21:30:01 +00:00
Kevin Newton
24bcd49473
[ruby/yarp] Fix first method param lex failures
...
When Ripper encounters a method parameter that is the first
parameter and is an identifier and it shadows a local scope, it
incorrectly marks it as END|LABEL (because it think it's a local).
We need to account for that in the lex compat in order to properly
compare.
15f725a1b1
2023-08-23 18:06:49 +00:00
HParker
9aca3528aa
[ruby/yarp] Match EOF after newline behavior
...
in Ripper EOL after whitespace is returned as a on_nl node with the whitespace as the content
be16d1deed
2023-08-23 17:23:15 +00:00
Kevin Newton
bd440bf85d
[ruby/yarp] Bump to version 0.8.0
...
bfde753702
2023-08-19 01:14:10 +00:00
Takashi Kokubun
67b5f63e97
Render YARP templates in the build process ( #8228 )
2023-08-17 14:39:04 -07:00
Kevin Newton
81d715099c
[ruby/yarp] Treat yp_buffer_t as an opaque pointer
...
Right now, we have to keep the buffer FFI object in sync with the
definition of yp_buffer_t because we access its fields directly. If
we add more fields or change the order, things will get out of sync.
Instead, let's treat yp_buffer_t as an opaque pointer and access
its fields through accessor functions directly. This is more
consistent with how we handle strings anyway.
878d845eff
2023-08-17 09:58:56 -07:00
Takashi Kokubun
3873b1eb39
Resync YARP
2023-08-16 17:47:32 -07:00
Benoit Daloze
3536cad902
[ruby/yarp] Fixes so bundle exec rake
can run on JRuby and TruffleRuby
...
e6cea4fa08
2023-08-16 17:47:32 -07:00
Kevin Newton
ecf2e84c05
[ruby/yarp] Add a CHANGELOG
...
b490ff0919
2023-08-16 17:47:32 -07:00
Kevin Newton
3d032cf3e8
[ruby/yarp] Simplify creation of numerics
...
e5f6ffa23a
2023-08-16 17:47:32 -07:00
Benoit Daloze
70ef66f240
[ruby/yarp] Document the build system of YARP
...
85ae0e2816
2023-08-05 17:30:34 +00:00
Kevin Newton
04f4e0aeb2
[ruby/yarp] Document building, more macro changes
...
4214f262d2
2023-07-31 20:10:23 +00:00
Jemma Issroff
134d874173
Sync YARP gemspec ( #8101 )
...
* Sync YARP gemspec
We were previously not syncing the YARP gemspec over which meant
that the Ruby YARP gem was out of sync.
* Sync YARP node / lex_compat files
2023-07-20 14:51:17 -04:00
Jemma Issroff
a02f5eb56a
YARP resync ( #8059 )
2023-07-12 12:46:38 -04:00
Jemma Issroff
31f83a6fea
[ruby/yarp] Add source to ParseResult
...
f3802e03e0
2023-07-07 17:46:46 +00:00
Jemma Issroff
bfb933371d
Manual YARP resync
2023-07-05 16:58:55 -04:00
Jemma Issroff
cc7f765f2c
[Feature #19741 ] Sync all files in yarp
...
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:
* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp
2023-06-21 11:25:39 -07:00