Kevin Newton
8e477af1d4
[ruby/prism] Put names on back reference read nodes
...
https://github.com/ruby/prism/commit/10a6403293
2023-10-14 14:15:54 +00:00
Kevin Newton
81fbacb59d
[ruby/prism] Make PM_NODE_FLAG_COMMON_MASK into a constant
...
https://github.com/ruby/prism/commit/ec66feb595
2023-10-13 19:48:15 +00:00
Kevin Newton
e700582d98
[ruby/prism] Bump version to 0.14.0
...
https://github.com/ruby/prism/commit/1731bf4520
2023-10-13 19:45:37 +00:00
eileencodes
42484d1281
[ruby/prism] Move common flags to top bits
...
Moves the common flag bits to the top. This lets us eliminate the `COMMON`
constant, and also allows us to group encoding flags on a nibble so we
can more easily mask them.
https://github.com/ruby/prism/commit/895508659e
2023-10-13 19:38:57 +00:00
Kevin Newton
11e946da2f
[ruby/prism] Fix up PR failings
...
https://github.com/ruby/prism/commit/11255f636e
2023-10-13 15:31:30 -04:00
Kevin Newton
d06523bc52
[ruby/prism] Remove now-defunct semantic_field from nodes
...
https://github.com/ruby/prism/commit/c82a9dad64
2023-10-13 15:31:30 -04:00
Kevin Newton
2de0299839
[ruby/prism] Final unescapes cleanup
...
https://github.com/ruby/prism/commit/bfcd8262a4
2023-10-13 15:31:30 -04:00
Kevin Newton
37d958eaf4
Remove old unescaping code
2023-10-13 15:31:30 -04:00
Kevin Newton
fa76cddc5b
[ruby/prism] Properly handle unescaping in regexp
...
https://github.com/ruby/prism/commit/abf9fd6863
2023-10-13 15:31:30 -04:00
Kevin Newton
e4f1c06a9b
[ruby/prism] Use current_string to handle :" symbols
...
https://github.com/ruby/prism/commit/eedeec8f9a
2023-10-13 15:31:30 -04:00
Kevin Newton
a1de762966
[ruby/prism] Use current_string for :' symbols
...
https://github.com/ruby/prism/commit/fadb5be520
2023-10-13 15:31:30 -04:00
Kevin Newton
8bf0d381dc
[ruby/prism] Use current_string for %s symbol literals
...
https://github.com/ruby/prism/commit/52504f8911
2023-10-13 15:31:30 -04:00
Kevin Newton
d0614b5254
[ruby/prism] Split up lines in tilde heredocs
...
https://github.com/ruby/prism/commit/21fad0c2ce
2023-10-13 15:31:30 -04:00
Kevin Newton
ad46fc093b
[ruby/prism] Calculate heredoc common whitespace while lexing
...
https://github.com/ruby/prism/commit/c3f43b64a3
2023-10-13 15:31:30 -04:00
Kevin Newton
d6424453db
[ruby/prism] Enable remaining heredoc unescape tests
...
https://github.com/ruby/prism/commit/c7ea4941c5
2023-10-13 15:31:30 -04:00
Kevin Newton
24768d8a57
[ruby/prism] Use current_string for escapes in heredocs
...
https://github.com/ruby/prism/commit/fc49acfc59
2023-10-13 15:31:30 -04:00
Kevin Newton
1a7364b347
[ruby/prism] Use create_unescaped functions for empty heredocs
...
https://github.com/ruby/prism/commit/acec5a13cb
2023-10-13 15:31:30 -04:00
Kevin Newton
da47a71325
[ruby/prism] Use current_string for x string escape sequences
...
https://github.com/ruby/prism/commit/66ce9280bb
2023-10-13 15:31:30 -04:00
Kevin Newton
a7f71e461e
[ruby/prism] Use token buffer for string lexing
...
https://github.com/ruby/prism/commit/087cd8f28b
2023-10-13 15:31:30 -04:00
Kevin Newton
973ecf6848
[ruby/prism] Extract out a couple more token buffer functions
...
https://github.com/ruby/prism/commit/341e027d23
2023-10-13 15:31:30 -04:00
Kevin Newton
af8484bc39
[ruby/prism] Capture the token buffer logic into its own struct and functions
...
https://github.com/ruby/prism/commit/4334f0775b
2023-10-13 15:31:30 -04:00
Kevin Newton
ef1e5b65dc
[ruby/prism] Use current_string to handle escapes in string literals
...
https://github.com/ruby/prism/commit/d912d48104
2023-10-13 15:31:30 -04:00
Kevin Newton
f64a0434dd
[ruby/prism] Use current_string to handle %I
...
https://github.com/ruby/prism/commit/831d5f4b45
2023-10-13 15:31:30 -04:00
Kevin Newton
5fc34f1cde
[ruby/prism] Use current_string for handling %W lists
...
https://github.com/ruby/prism/commit/edb1674725
2023-10-13 15:31:30 -04:00
Kevin Newton
41ac8ddca3
[ruby/prism] Extract out string handling for %W lists
...
https://github.com/ruby/prism/commit/dba9bd6b1f
2023-10-13 15:31:30 -04:00
Kevin Newton
3c743445d7
[ruby/prism] Use current_string to handle %i escapes
...
https://github.com/ruby/prism/commit/9c90d0a777
2023-10-13 15:31:30 -04:00
Kevin Newton
4e3013f42d
[ruby/prism] Use current_string to handle %w escapes
...
https://github.com/ruby/prism/commit/b8420ea7ae
2023-10-13 15:31:30 -04:00
Kevin Newton
3dba3ab47d
[ruby/prism] Strip out old char unescaping
...
https://github.com/ruby/prism/commit/27ca207ab3
2023-10-13 15:31:30 -04:00
Kevin Newton
dd3986876a
[ruby/prism] Handle remaining escape sequences for character literals
...
https://github.com/ruby/prism/commit/ba33607034
2023-10-13 15:31:30 -04:00
Kevin Newton
1a941c70e4
[ruby/prism] Track current_string to pass forward for character literals
...
https://github.com/ruby/prism/commit/be1d8ae8bb
2023-10-13 15:31:30 -04:00
Kevin Newton
a0a0cd0caa
[ruby/prism] Fix escaped 8 and escaped 9
...
https://github.com/ruby/prism/commit/c3a46e2de5
2023-10-13 15:31:30 -04:00
Haldun Bayhantopcu
4387af1b4a
[ruby/prism] Fix parsing symbols in strings after labels
...
https://github.com/ruby/prism/commit/e16531650d
2023-10-12 16:01:40 +00:00
Matt Valentine-House
5c8764477f
[ruby/prism] Increase the depth for the For node index variable
...
In CRuby's parser locals in for nodes appear deeper in the ast than they
do in Prism, but we can fix that with a transparent scope
https://github.com/ruby/prism/commit/460187f41e
2023-10-12 15:26:29 +00:00
Matt Valentine-House
9af5abd23a
[ruby/prism] Allow Scope nodes to be created for a For loop
...
https://github.com/ruby/prism/commit/ded8711807
2023-10-11 18:26:00 +00:00
Kevin Newton
f413e50ec2
[ruby/prism] Add Node::type
...
https://github.com/ruby/prism/commit/ca4943e3f9
2023-10-11 17:55:36 +00:00
Matt Valentine-House
0fdee133fc
[ruby/prism] Attach the ast node to the scope
...
So when building instruction sequences for a scope we can reference
items from the ast node that requires the scope. This is useful for for
loops, where the local variable tables from the parent scope will need
to be referenced.
https://github.com/ruby/prism/commit/426b1ca094
2023-10-09 10:16:01 +00:00
Haldun Bayhantopcu
7eccc13c1f
[ruby/prism] Emit error when assigning to a numbered parameter
...
https://github.com/ruby/prism/commit/66248ac2f6
2023-10-06 14:10:28 +00:00
Matt Valentine-House
7db4ce13ed
[ruby/prism] Introduce transparent scopes.
...
A transparent scope is a scope that cannot have local variables added to
it's local table. When a local is added to it's table, it instead gets
added to the first non-transparent parent scope.
This is used in for loops to ensure the correct depth for local
variables inside the body
https://github.com/ruby/prism/commit/ddb8e82253
Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
2023-10-06 12:21:03 +00:00
Haldun Bayhantopcu
8d8fe54355
[ruby/prism] Check for duplicate parameter names in destructured params
...
https://github.com/ruby/prism/commit/c3438aabea
2023-10-05 16:35:45 +00:00
Haldun Bayhantopcu
38cb92a00c
[ruby/prism] Check for duplicate names in shadow args
...
https://github.com/ruby/prism/commit/e100c6b8ae
2023-10-05 15:12:05 +00:00
Haldun Bayhantopcu
fb9795cf7a
[ruby/prism] Fix parsing shadow args in lambda blocks
...
https://github.com/ruby/prism/commit/53efaf252d
2023-10-05 11:25:32 +00:00
Nathan Froyd
e0c66b4749
[ruby/prism] [rust] write flag accessor functions
...
https://github.com/ruby/prism/commit/f2333ba4c8
2023-10-04 14:22:16 +00:00
Nathan Froyd
cf2049cb55
[ruby/prism] give flag enums a non-`typedef`'d name
...
https://github.com/ruby/prism/commit/630af5cb0e
2023-10-04 14:22:15 +00:00
Kevin Newton
d47af93110
[ruby/prism] Provide pm_parser_err_current and pm_parser_err_previous
...
https://github.com/ruby/prism/commit/4828c96939
2023-10-03 18:46:37 +00:00
Kevin Newton
ad0e8ddbdb
[ruby/prism] Consolidate diagnostic appendings
...
https://github.com/ruby/prism/commit/4f107d8962
2023-10-03 18:46:36 +00:00
Benoit Daloze
87dad067e0
Sync with prism CallNode#name changes
...
* https://github.com/ruby/prism/pull/1533
2023-10-02 09:18:56 -04:00
Nathan Froyd
f88f5b59e8
[ruby/prism] remove `peek_string` to avoid subtle memory issues
...
https://github.com/ruby/prism/commit/f393d30ce1
2023-09-29 20:41:23 +00:00
Kevin Newton
9861ec4fb9
[ruby/prism] Mark ranges as static literal
...
https://github.com/ruby/prism/commit/4c77944dd4
2023-09-29 15:26:06 +00:00
Kevin Newton
be63e2515b
[ruby/prism] Bump version
...
https://github.com/ruby/prism/commit/3e44415ca2
2023-09-29 15:21:50 +00:00
Kevin Newton
100ce34331
[ruby/prism] Add a type method for quick comparison
...
https://github.com/ruby/prism/commit/0c7d9c3c01
2023-09-29 15:16:30 +00:00