Kevin Newton
1e4c4fe478
[ruby/prism] Fix parsing parentheses in hash patterns
...
https://github.com/ruby/prism/commit/22c3b559cd
2024-07-19 12:55:49 +00:00
Kevin Newton
059535bd65
[ruby/prism] Mark local variable writes in value positions as being read
...
https://github.com/ruby/prism/commit/f5149870ab
2024-07-18 19:38:53 +00:00
Kevin Newton
8e5ac5a87d
[PRISM] Ensure not opening directories
2024-07-18 13:03:25 -04:00
Kevin Newton
e77e4aa608
[ruby/prism] Have parse_stream handle NUL bytes
...
https://github.com/ruby/prism/commit/4a41d298c8
2024-07-17 19:44:32 +00:00
Koichi ITO
0fe816f380
[ruby/prism] [Doc] Tweak example of `Prism::Dispatcher`
...
This PR tweaked the documentation to correct an error encountered
when running the example code of `Prism::Dispatcher`.
This aims to make understanding the example smoother.
https://github.com/ruby/prism/commit/165a1a0e78
2024-07-17 18:17:59 +00:00
Nobuyoshi Nakada
644424941a
[Bug #20457 ] [Prism] Remove redundant return flag
2024-07-17 14:06:11 -04:00
Kevin Newton
c06f79c575
[ruby/prism] Fix up implicit flags
...
https://github.com/ruby/prism/commit/f4152c1f50
2024-07-15 18:12:37 +00:00
Kevin Newton
6298667ff5
[ruby/prism] When parsing an invalid write, still add to the local table
...
https://github.com/ruby/prism/commit/a54abc4d1b
2024-07-12 13:50:00 +00:00
Kevin Newton
cfaa3e9311
[ruby/prism] Bump typecheck dependencies to fix CI
...
https://github.com/ruby/prism/commit/c7a4a90ee8
2024-07-11 19:46:51 +00:00
Kevin Newton
ac093f5a06
[PRISM] Fix up shareable constant casting
2024-07-11 14:25:54 -04:00
Kevin Newton
c1df15c3e6
[PRISM] Use node ids for error highlight
2024-07-11 14:25:54 -04:00
Stan Lo
be4589df80
[ruby/prism] Prevent optional block parameter from accepting certain prefixed values
...
This commit prevents the following unary operators from being accepted
as the value prefix of a block's optional parameter:
- `+`
- `-`
- `~`
- `!`
For example, `f { |a = +b| }` will now raise a syntax error.
https://github.com/ruby/prism/commit/3024bee60c
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-07-11 14:25:54 -04:00
Kevin Newton
aa473489a2
[ruby/prism] Various cleanup for initializers and typechecks
...
https://github.com/ruby/prism/commit/86cf82794a
2024-07-11 14:25:54 -04:00
Kevin Newton
2bf9ae3fa1
[ruby/prism] Add node ids to nodes
...
https://github.com/ruby/prism/commit/bf16ade7f9
2024-07-11 14:25:54 -04:00
Kevin Newton
39dcfe26ee
[ruby/prism] Move Node#type and Node::type documentation
...
https://github.com/ruby/prism/commit/08a71f6259
2024-07-11 14:25:54 -04:00
Kevin Newton
32090e2b8d
[ruby/prism] Add Node#breadth_first_search
...
https://github.com/ruby/prism/commit/1ffb141199
2024-07-11 14:25:54 -04:00
Kevin Newton
aca42a2478
[ruby/prism] Expose common flags in inspect output
...
https://github.com/ruby/prism/commit/d0143865c2
2024-07-11 14:25:54 -04:00
Kevin Newton
687be43c79
[ruby/prism] Expose flags on every node type
...
https://github.com/ruby/prism/commit/9f12a56fd6
2024-07-11 14:25:54 -04:00
Kevin Newton
ca48fb76fb
[ruby/prism] Move location to second position for node initializers
...
https://github.com/ruby/prism/commit/4cc0eda4ca
2024-07-11 14:25:54 -04:00
Kevin Newton
0ac9c6dc10
[ruby/prism] Fix up find and array patterns with multiple rests
...
https://github.com/ruby/prism/commit/035890a839
2024-07-01 15:22:40 +00:00
Kevin Newton
8fb2227205
[ruby/prism] Properly support parsing regexp in extended mode
...
https://github.com/ruby/prism/commit/bedc4585ed
2024-07-01 14:42:10 +00:00
Kevin Newton
ce7299d09a
[ruby/prism] Handle block exits under modifiers
...
https://github.com/ruby/prism/commit/6b78f5309b
2024-06-26 20:46:27 +00:00
Andrew Konchin
a47c152ab5
[ruby/prism] Fix documentation comment in generated with templates files
...
Fix warning
```
/******************************************************************************/
^
warning: [dangling-doc-comments] documentation comment is not attached to any declaration
```
in Nodes.java and AbstractNodeVisitor.java files. /** is treated as a starting of a javadoc comment.
https://github.com/ruby/prism/commit/c83d7844b8
2024-06-25 20:15:25 +00:00
Yusuke Endoh
9a22d4b9a0
[ruby/prism] Update `#line` that was missed to update
...
Follow up https://github.com/ruby/prism/commit/1a2626be275d
https://github.com/ruby/prism/commit/8174aac929
2024-06-21 12:32:04 +00:00
Yusuke Endoh
c3b5b98e15
[ruby/prism] Set `#line" directives to respect the path in ruby/ruby repo
...
ruby/ruby measures test coverage of C code, but the `#line` directive
generated by prism points to a file that does not exist, so coverage is
not taken properly.
This changeset specifies the location of the source files as a relative
path in terms of ruby/ruby repo.
https://github.com/ruby/prism/commit/1a2626be27
2024-06-20 12:36:18 +00:00
Kevin Newton
c93b70cfdd
[ruby/prism] Make sure Init_prism is visible for extension
...
https://github.com/ruby/prism/commit/4601d3adfd
2024-06-19 00:06:01 +00:00
Herwin
84947c515a
[ruby/prism] Document MultiWriteNode fields
...
https://github.com/ruby/prism/commit/b6a97a43c2
2024-06-15 15:03:18 +00:00
Herwin
6184882b84
[ruby/prism] Document MultiTargetNode
...
https://github.com/ruby/prism/commit/b817cd25c5
2024-06-15 12:06:49 +00:00
Kevin Newton
7529591df1
[ruby/prism] Ensure ranges are non-associative
...
https://github.com/ruby/prism/commit/f59295938b
2024-06-14 19:22:54 +00:00
Kevin Newton
0321f2c8fe
[ruby/prism] Handle implicit array precedence
...
When an implicit array is used in a write, is causes the whole
expression to become a statement. For example:
```ruby
a = *b
a = 1, 2, 3
```
Even though these expressions are exactly equivalent to their
explicit array counterparts:
```ruby
a = [*b]
a = [1, 2, 3]
```
As such, these expressions cannot be joined with other expressions
by operators or modifiers except if, unless, while, until, or
rescue.
https://github.com/ruby/prism/commit/7cd2407272
2024-06-13 18:46:02 +00:00
Kevin Newton
47322b592a
[ruby/prism] Match CRuby error message for unknown regexp options
...
https://github.com/ruby/prism/commit/73669b59f6
2024-06-11 12:34:00 +00:00
Kevin Newton
d6b1822f22
[ruby/prism] Fix binding power for class <<
...
https://github.com/ruby/prism/commit/cd66c478de
2024-06-11 12:33:46 +00:00
Kevin Newton
d827d32527
[ruby/prism] Provide ability to lock encoding while parsing
...
https://github.com/ruby/prism/commit/f7faedfb3f
2024-06-10 17:21:32 -04:00
Kevin Newton
0d5eea9957
[ruby/prism] Disallow multi writes when not in statement level
...
https://github.com/ruby/prism/commit/fe34a77df2
2024-06-10 17:21:32 -04:00
Kevin Newton
21e06e57af
[ruby/prism] Allow block exits in loop predicates
...
https://github.com/ruby/prism/commit/f09db18e46
2024-06-10 13:42:40 +00:00
Nobuyoshi Nakada
c357138aa3
Use `PRISM_EXPORTED_FUNCTION` consistently with the header
2024-06-09 17:34:37 +09:00
Kevin Newton
c90b5303a2
Sync prism version to latest
2024-06-07 15:54:06 -04:00
Kevin Newton
cbc83c4a92
Remove circular parameter syntax error
...
https://bugs.ruby-lang.org/issues/20478
2024-06-06 16:29:50 -04:00
Kevin Newton
7b7d1586ee
[ruby/prism] Reject additional patterns under splat in target
...
https://github.com/ruby/prism/commit/90d570aa50
2024-06-06 16:44:43 +00:00
Kevin Newton
6f3c1e1def
[PRISM] Sync latest prism
2024-06-05 20:04:12 -04:00
Kevin Newton
46c3e609a3
[ruby/prism] Fix up documentation for regexp structs
...
https://github.com/ruby/prism/commit/78d9f20e9d
2024-06-05 14:40:03 -04:00
Kevin Newton
d13112b779
[ruby/prism] Parse all regular expressions
...
https://github.com/ruby/prism/commit/11e0e204ce
2024-06-05 14:40:03 -04:00
Kevin Newton
2a9c20c317
[ruby/prism] Add Onigmo errors for invalid groups
...
https://github.com/ruby/prism/commit/27e7685dd4
2024-06-05 14:40:03 -04:00
Kevin Newton
0406efaf05
[ruby/prism] Add Onigmo error for invalid repeat and empty group name
...
https://github.com/ruby/prism/commit/953601e3c0
2024-06-05 14:40:03 -04:00
Kevin Newton
d604287626
[ruby/prism] Add Onigmo error for empty char-class
...
https://github.com/ruby/prism/commit/2e02fa3b80
2024-06-05 14:40:03 -04:00
Kevin Newton
c3747d5a2e
[ruby/prism] Report onigmo errors for depth
...
https://github.com/ruby/prism/commit/e0e8bba8be
2024-06-05 14:40:03 -04:00
Kevin Newton
41f2734644
[ruby/prism] Change pm_regexp_parse to not return boolean
...
https://github.com/ruby/prism/commit/b03afbe857
2024-06-05 14:40:03 -04:00
Kevin Newton
65746055b4
[ruby/prism] Pass prism parser into regexp parser
...
https://github.com/ruby/prism/commit/c19b0fa185
2024-06-05 14:40:03 -04:00
Kevin Newton
ac70dd07e6
[ruby/prism] Remove unused string list struct
...
https://github.com/ruby/prism/commit/36c6851c85
2024-06-05 14:40:03 -04:00
Kevin Newton
ad438623e8
[ruby/prism] Switch regexp parsing to use a callback from named capture groups
...
https://github.com/ruby/prism/commit/29d80e486e
2024-06-05 14:40:03 -04:00
Jeremy Evans
89486c79bb
Make error messages clear blocks/keywords are disallowed in index assignment
...
Blocks and keywords are allowed in regular index.
Also update NEWS to make this more clear.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-05-31 08:22:40 -07:00
nasa
af89465406
[ruby/prism] Document `ForNode` fields
...
(https://github.com/ruby/prism/pull/2845 )
* Add document
* fix
* fix fmt
* fix fmt
* Revert "fix fmt"
This reverts commit https://github.com/ruby/prism/commit/b23a05a94148 .
* add potition
* fix fmt
* reposition
* fix indent
* fix comment
* fix indent
https://github.com/ruby/prism/commit/0dd4c1bba1
2024-05-29 13:36:10 +00:00
Kevin Newton
7f18126882
[ruby/prism] Fix line continuation heredoc dedent calculation
...
https://github.com/ruby/prism/commit/63b596df07
2024-05-28 16:31:55 +00:00
Herwin
61e2916d1c
[ruby/prism] Typo fix: poitive => positive
...
https://github.com/ruby/prism/commit/d13a05252d
2024-05-28 15:28:02 +00:00
Kevin Newton
9f71393fe4
[ruby/prism] Fix up self-write order for lex
...
https://github.com/ruby/prism/commit/8f6da451b4
2024-05-24 17:37:51 +00:00
Kevin Newton
745a948b6d
[ruby/prism] Remove dynamic Debug module methods
...
https://github.com/ruby/prism/commit/b850794db9
2024-05-24 17:19:36 +00:00
Kevin Newton
79001c8b4a
[ruby/prism] Remove error formatting, put directly in CRuby
...
https://github.com/ruby/prism/commit/53b2866487
2024-05-24 17:19:36 +00:00
Kevin Newton
653652bcbe
[ruby/prism] Remove Debug#named_captures
...
https://github.com/ruby/prism/commit/5050dfbe70
2024-05-24 17:19:35 +00:00
Kevin Newton
e1041a8eda
[ruby/prism] Move profiling to prism module directly
...
https://github.com/ruby/prism/commit/75fabf7081
2024-05-24 17:19:35 +00:00
Kevin Newton
b04c959621
[ruby/prism] Remove various unused memsize infra
...
https://github.com/ruby/prism/commit/283938ed1f
2024-05-24 17:19:34 +00:00
Kevin Newton
b8681c2e37
[ruby/prism] Remove Debug::integer_parse
...
https://github.com/ruby/prism/commit/14e397598b
2024-05-24 17:19:33 +00:00
Kevin Newton
870350253e
[ruby/prism] Remove Debug::static_inspect
...
https://github.com/ruby/prism/commit/486c71c426
2024-05-24 17:19:33 +00:00
Kevin Newton
7021e15652
[ruby/prism] Update duplicated when error message
...
https://github.com/ruby/prism/commit/54316fd8a0
2024-05-24 12:36:54 -04:00
eileencodes
c96b5791ef
[ruby/prism] Raise `void value expression` in begin clauses
...
In some cases Prism was either not raising an appropriate `void value
expression` error, or raising that error when the syntax is considered
valid.
To fix this Prism needs to check whether we have other clauses on the
`begin` rather than just returning `cast->statements`.
* If the `cast->statements` are null and the `cast->ensure_clause` is
not null, set the code to `cast->ensure_clause`
* else
* If there is a `cast->rescue_clause`
* Check if `cast->statements` are null and `cast->rescue_clause->statements`
are null, and return `NULL`
* Check if there is an `else_clause`, and set the node to
`cast->else_clause`.
* Otherwise return `cast->statements` as the node
* return `cast->statements` as the node
See tests for test cases. Note I took these directly from CRuby so if
desired I can delete them since the test will now pass. This only fixes
one test in the `test_parse` file, taking failures from 14 to 13.
This fixes `TestParse#test_void_value_in_rhs` and is related to
issue #2791 .
https://github.com/ruby/prism/commit/398152b412
2024-05-23 19:30:03 +00:00
Kevin Newton
e5e079e70f
[ruby/prism] Only accept command call when specified for constant path
...
https://github.com/ruby/prism/commit/0ae908b6ee
2024-05-23 18:45:04 +00:00
Kevin Newton
7d89d52714
[ruby/prism] Disallow newlines in heredoc identifiers
...
https://github.com/ruby/prism/commit/737f2c2117
2024-05-23 15:51:27 +00:00
Kevin Newton
6d81ae3f01
[PRISM] Properly support 'it'
2024-05-22 16:34:04 -04:00
Kevin Newton
e575954887
[ruby/prism] Fix support for 'it' implicit local variable
...
https://github.com/ruby/prism/commit/53bbcfe513
2024-05-22 16:34:04 -04:00
Kevin Newton
89efb94fec
[ruby/prism] Reconfigure rationals
...
This eliminates the subnode on RationalNode and replaces it with two
integer fields, which represent the ratio for the rational. It also
reduces those two integers if they both fit into 32 bits.
Importantly, this PR does not implement bignum reduction. That's something
I'd like to consider for the future, but it's simple enough for now to
leave them unreduced, which makes it more useful than it used to be.
https://github.com/ruby/prism/commit/86e06c7068
2024-05-21 14:27:46 -04:00
Kevin Newton
ff43b4a28b
[ruby/prism] Add error for numbered parameter used in inner block
...
https://github.com/ruby/prism/commit/c386ba6d48
2024-05-21 15:46:45 +00:00
Kevin Newton
7c2c528d35
[ruby/prism] Fix up regexp escapes with control/meta
...
https://github.com/ruby/prism/commit/8a7afa6988
2024-05-20 19:39:21 +00:00
Kevin Newton
012b764f7c
[ruby/prism] Fix up regexp escapes with control/meta and x
...
https://github.com/ruby/prism/commit/1dbbbedf55
2024-05-20 19:39:21 +00:00
Kevin Newton
ca5b458044
[PRISM] Match CRuby line semantics for evstr
2024-05-20 11:28:53 -04:00
Kevin Newton
2e8ae13974
[ruby/prism] Fix invalid read at EOF
...
https://github.com/ruby/prism/commit/dddaf67c34
2024-05-20 14:42:58 +00:00
Kevin Newton
e90e8f8bd3
[ruby/prism] Implement ambiguous binary operator warning
...
https://github.com/ruby/prism/commit/6258c3695f
2024-05-20 14:01:05 +00:00
Kevin Newton
0649c1e3bc
[ruby/prism] Revert incorrect synthesized true node change
...
https://github.com/ruby/prism/commit/31ef81fd06
2024-05-17 14:47:18 +00:00
S-H-GAMELINKS
aed93ba19e
[ruby/prism] Replace and Use PM_LOCATION_NULL_VALUE macro
...
https://github.com/ruby/prism/commit/50e188b168
2024-05-17 14:45:42 +00:00
Kevin Newton
92af705498
[ruby/prism] Truncate source lines in errors messages when too long
...
https://github.com/ruby/prism/commit/72518f5716
2024-05-16 19:35:10 +00:00
Kevin Newton
98e1e610f6
[ruby/prism] Update more escape error messages to match CRuby
...
https://github.com/ruby/prism/commit/ab43b3ab66
2024-05-16 18:40:20 +00:00
Kevin Newton
286d3032a7
[ruby/prism] More mixed encoding errors
...
https://github.com/ruby/prism/commit/2a43b4f55c
2024-05-16 17:22:14 +00:00
Kevin Newton
d314d976d4
[ruby/prism] Match CRuby invalid escape character syntax error message
...
https://github.com/ruby/prism/commit/0ef5658dcc
2024-05-16 15:10:49 +00:00
Kevin Newton
0e11781f21
[ruby/prism] Match CRuby invalid character error message
...
https://github.com/ruby/prism/commit/8d4c5c2bca
2024-05-16 15:10:03 +00:00
Kevin Newton
910bb49230
[ruby/prism] Update error message for invalid % at EOF
...
https://github.com/ruby/prism/commit/178d4f66fd
2024-05-16 14:52:34 +00:00
Kevin Newton
7a4b9d1614
[ruby/prism] Match CRuby error message for unknown % string
...
https://github.com/ruby/prism/commit/863197629c
2024-05-16 14:23:36 +00:00
Kevin Newton
011668883c
[ruby/prism] Always go to string lex mode even if EOF
...
https://github.com/ruby/prism/commit/57d5c9be2c
2024-05-16 14:16:32 +00:00
Kevin Newton
477b13ba17
[ruby/prism] Update unterminated string error location
...
https://github.com/ruby/prism/commit/33d12afa60
2024-05-16 14:00:18 +00:00
Kevin Newton
cbd1553800
[ruby/prism] Extend the bounds of the invalid global variable name error
...
https://github.com/ruby/prism/commit/89d0d9851a
2024-05-15 15:53:24 +00:00
Kevin Newton
c4a5866798
[ruby/prism] Replace end of file with end-of-input
...
https://github.com/ruby/prism/commit/dd532ded95
2024-05-15 15:44:16 +00:00
Kevin Newton
e6340258f8
[ruby/prism] Autoload newlines and comment visitors
...
Having the @newline instance variable in every node adds up, and
since it is so rarely used, we only want to add it when necessary.
Moving this into an autoloaded file and moving the instance variable
out of the default initializers reduces allocated memory because the
nodes are now smaller and some fit into the compact list. On my
machine, I'm seeing about an 8% drop.
https://github.com/ruby/prism/commit/eea92c07d2
2024-05-13 15:34:47 +00:00
Kevin Newton
afdfff933f
[PRISM] Bump to version 0.29.0
2024-05-10 13:09:45 -04:00
Kevin Newton
83f481ebf0
[ruby/prism] Enhance parameter forwarding error messages
...
https://github.com/ruby/prism/commit/826657232e
2024-05-10 15:54:15 +00:00
Kevin Newton
2e44664547
[ruby/prism] operator rename
...
https://github.com/ruby/prism/commit/b5e47f5c42
2024-05-10 11:47:48 -04:00
Kevin Newton
346f7bf33e
[ruby/prism] Fix escaping control+x
...
https://github.com/ruby/prism/commit/0f0b4c1161
2024-05-10 00:54:31 -04:00
Kevin Newton
442e398e62
[ruby/prism] Ensure keyword parameters are not constants
...
https://github.com/ruby/prism/commit/fd210115c1
2024-05-08 18:56:14 +00:00
Kevin Newton
128c9a92dd
[ruby/prism] Enhance def params term error message
...
https://github.com/ruby/prism/commit/3af1acd5da
2024-05-08 17:58:46 +00:00
Kevin Newton
2d631cf428
[ruby/prism] Fix line number of unreachable statement warning
...
https://github.com/ruby/prism/commit/62f6b1f2e2
2024-05-08 17:30:18 +00:00
Kevin Newton
61829eec65
[ruby/prism] Ensure keyword parameters do not end in ! or ?
...
https://github.com/ruby/prism/commit/57d86a8545
2024-05-08 16:52:07 +00:00
Kevin Newton
84ba35e8c2
[ruby/prism] Invalid escape character syntax for nested unicode escapes
...
https://github.com/ruby/prism/commit/623a0bb995
2024-05-08 16:38:22 +00:00
Kevin Newton
7c1e11fe02
[ruby/prism] Validate Unicode escape sequences are not surrogates
...
https://github.com/ruby/prism/commit/64d2ce2622
2024-05-08 16:26:50 +00:00
Kevin Newton
548a72e537
[PRISM] Sync prism version bump
2024-05-08 10:20:48 -04:00
Kevin Newton
74d948a617
[ruby/prism] Better error message on missing hash value
...
https://github.com/ruby/prism/commit/b20e37e82e
2024-05-08 12:52:54 +00:00
Kevin Newton
21b94ae0d1
[ruby/prism] Extend error message for unterminated HEREDOC
...
https://github.com/ruby/prism/commit/c1b07ec11b
2024-05-07 18:03:03 +00:00
Kevin Newton
dcbe0edb83
[ruby/prism] Better error message for contents of hash pattern
...
https://github.com/ruby/prism/commit/60dbf60f48
2024-05-07 17:22:50 +00:00
Kevin Newton
5d44846815
[ruby/prism] Disallow implicit hash in array pattern
...
https://github.com/ruby/prism/commit/bdd509c6ac
2024-05-07 17:15:14 +00:00
Kevin Newton
8ec1c416f7
[ruby/prism] Specific error message for symbol literal with interpolation in hash patterns
...
https://github.com/ruby/prism/commit/31f0201bae
2024-05-07 16:31:05 +00:00
Kevin Newton
8cc733dff7
[ruby/prism] Add error for invalid implicit local writes
...
https://github.com/ruby/prism/commit/ab21882561
2024-05-07 16:31:05 +00:00
Kevin Newton
eb8efa42f0
[ruby/prism] shareable_constant_value line warnings
...
https://github.com/ruby/prism/commit/8c984b6922
2024-05-07 14:56:48 +00:00
Kevin Newton
d4fdc45953
[ruby/prism] Unexpected fractional component error messages
...
https://github.com/ruby/prism/commit/e893bc2230
2024-05-06 12:09:48 -04:00
Kevin Newton
f92d82ef06
[ruby/prism] More specific error for conflicting forwarding parameters
...
https://github.com/ruby/prism/commit/1c3b48fedb
2024-05-06 12:09:30 -04:00
Kevin Newton
5909186d02
[ruby/prism] Fix up error message for unexpected {
...
https://github.com/ruby/prism/commit/80dbe035ba
2024-05-06 15:09:20 +00:00
Kevin Newton
d4a6d0c177
[ruby/prism] Prism::Location#adjoin
...
https://github.com/ruby/prism/commit/a298db68e3
2024-05-03 19:14:03 +00:00
Kevin Newton
7a49edcf1f
[ruby/prism] Prism::Node#tunnel
...
https://github.com/ruby/prism/commit/0bf5d651da
2024-05-03 18:37:19 +00:00
Kevin Newton
1af2dead5a
[ruby/prism] Disallow *a&.x=0
...
https://github.com/ruby/prism/commit/624fdf74bd
2024-05-03 18:14:55 +00:00
Vinicius Stock
4fbb208185
[ruby/prism] Create specialized `ASCIISource` with asciionly optimizations
...
https://github.com/ruby/prism/commit/40993166a8
2024-05-03 18:10:21 +00:00
Kevin Newton
31361aeca3
[ruby/prism] Disallow safe navigation in a call target node
...
https://github.com/ruby/prism/commit/b1917adac7
2024-05-03 18:09:35 +00:00
Kevin Newton
2368dab1fa
[ruby/prism] Disallow **nil after keyword parameters
...
https://github.com/ruby/prism/commit/5beeae076f
2024-05-03 13:32:32 -04:00
Kevin Newton
7caeff2bae
[ruby/prism] Disallow keywords and blocks in index expressions
...
https://github.com/ruby/prism/commit/e950dc1e83
2024-05-03 13:01:40 -04:00
Kevin Newton
5758e45657
[ruby/prism] Change ConstantPathNode#child to ConstantPathNode#{name,name_loc}
...
This has been requested for a long time, and I'm finally doing it
now. Unfortunately this is a breaking change for all of the APIs.
I've added in a Ruby method for `#child` that is deprecated so that
existing usage doesn't break, but for everyone else this is going
to be a bit of a pain.
https://github.com/ruby/prism/commit/9cbe74464e
2024-05-03 11:11:57 -04:00
Kevin Newton
5409661fe6
Mark the first string element of a regexp as binary if US-ASCII
2024-05-02 22:46:09 -04:00
Kevin Newton
7c0cf71049
[ruby/prism] Node#script_lines and supporting infra
...
https://github.com/ruby/prism/commit/cb4a8ab772
2024-05-02 15:27:18 +00:00
Kevin Newton
de6e05da49
[PRISM] Consolidate handling heredoc terminators
2024-05-01 19:19:07 -04:00
Kevin Newton
8ea6daa86d
[PRISM] Enable passing tests in test_syntax.rb
2024-05-01 19:19:07 -04:00
Kevin Newton
b64fd2f5c5
[PRISM] Closer error messages on invalid unicode escapes in character literals
2024-05-01 19:19:07 -04:00
Kevin Newton
1be5ede766
[PRISM] Error message for unterminated heredoc identifier
2024-05-01 19:19:07 -04:00
Kevin Newton
62f8fb7f89
[PRISM] Fix unterminated regular expression error message
2024-05-01 19:19:07 -04:00
Kevin Newton
5d1e4cd249
[PRISM] Better error messages for unwriteable targets
2024-05-01 19:19:07 -04:00
Kevin Newton
4e8ae5d32a
[PRISM] Match unterminated error messages
2024-05-01 19:19:07 -04:00
Kevin Newton
8e1647c3aa
[ruby/prism] Support passing version 3.3.1
...
https://github.com/ruby/prism/commit/445a0f0d22
2024-05-01 23:03:25 +00:00
Kevin Newton
5cd0abdfb5
[PRISM] Simplify prism error highlighting
2024-05-01 16:57:29 -04:00
Kevin Newton
fc8fb581cf
[ruby/prism] CRuby error message for trailing underscore in number
...
https://github.com/ruby/prism/commit/4e34f236d3
2024-05-01 19:51:09 +00:00
Kevin Newton
efefe42dd1
[ruby/prism] Add more errors for dynamic constant writes in methods
...
https://github.com/ruby/prism/commit/486e4c0367
2024-05-01 19:02:18 +00:00
Kevin Newton
41f8ae1ffd
[ruby/prism] Mark errors for invalid symbols
...
https://github.com/ruby/prism/commit/661884c4a3
2024-05-01 16:43:05 +00:00
Kevin Newton
cfe7019ef5
[ruby/prism] Match CRuby interpolation semantics
...
If a single string that is a static literal is interpolated, it
does not impact whether or not the parent is a static literal. In
this way, if you have something like a regular expression that
interpolates a string literal, it's possible that you will end up
pushing just a single regexp onto the stack as opposed to calling
out to toregexp.
https://github.com/ruby/prism/commit/4f096c2257
2024-05-01 12:34:29 -04:00
Kevin Newton
3872e54039
[ruby/prism] Bump to v0.27.0
...
https://github.com/ruby/prism/commit/c9edeef91a
2024-04-26 17:01:03 -04:00
Kevin Newton
bb3dd5b808
[PRISM] Sync latest config.yml documentation updates
2024-04-26 17:01:03 -04:00
Kevin Newton
9688093124
[ruby/prism] Location#slice_lines, Node#slice_lines
...
https://github.com/ruby/prism/commit/9b61f6fdb3
2024-04-26 19:05:32 +00:00
Kevin Newton
0599184a18
[ruby/prism] Match CRuby error messages for invalid numerics
...
https://github.com/ruby/prism/commit/be21a1bd1d
2024-04-26 18:55:27 +00:00
Kevin Newton
6a296089c6
[ruby/prism] Add a flag on returns when they are redundant
...
https://github.com/ruby/prism/commit/450541d2c3
2024-04-26 18:10:42 +00:00
Kevin Newton
4c431744b7
[ruby/prism] Warn for nested hashes as well
...
https://github.com/ruby/prism/commit/76e802f59e
2024-04-24 19:39:42 +00:00
Kevin Newton
7d64fbda53
[ruby/prism] Remove static literals dependence on parser definition
...
https://github.com/ruby/prism/commit/b3e104e8a2
2024-04-24 19:39:41 +00:00
Kevin Newton
6d9ba1e014
[ruby/prism] Change inspect from recursive to a queue
...
We would previously cause a stack overflow if we parsed a file that
was too deeply nested when we were calling inspect. Instead, we now
use a queue of commands to do it linearly so we don't.
https://github.com/ruby/prism/commit/0f21f5bfe1
2024-04-24 14:16:42 -04:00
Kevin Newton
0defbc11a5
[ruby/prism] Fix recursive multiply when values are switched in karatsuba_multiply
...
https://github.com/ruby/prism/commit/4dc6ea960d
2024-04-23 18:17:29 +00:00
Kevin Newton
4f57262338
[ruby/prism] Use GC-able symbols for AST
...
https://github.com/ruby/prism/commit/801117e45a
2024-04-23 17:26:10 +00:00
Matheus Richard
99a46d7fe9
[ruby/prism] Document UnlessNode fields
...
https://github.com/ruby/prism/commit/eee8276ae6
2024-04-23 15:20:16 +00:00
Daniel Gollahon
b62ab952e3
[ruby/prism] Document `IfNode` fields
...
- Adds documentation for the fields of the `IfNode`. Also updates the overall description to mention ternary expressions.
- Part of #2123
https://github.com/ruby/prism/commit/fd17c0733d
2024-04-23 15:18:52 +00:00
Matheus Richard
b3350e3e6f
[ruby/prism] Document BreakNode fields
...
https://github.com/ruby/prism/commit/7a3ed22f14
2024-04-23 15:11:21 +00:00
Philip Mueller
f7d1699f67
[ruby/prism] Implement case equality on nodes
...
https://github.com/ruby/prism/commit/dc121e4fdf
2024-04-23 13:53:23 +00:00
Cory Hutchison
87b829aa94
[ruby/prism] Document the `AliasGlobalVariableNode` fields
...
https://github.com/ruby/prism/commit/35bc711069
2024-04-23 13:22:05 +00:00
Sanjay Karukamanna
5fd08b506c
[ruby/prism] Document `ArrayNode`, `SourceFileNode` fields
...
https://github.com/ruby/prism/commit/0bdc566f67
2024-04-23 13:13:29 +00:00
Kevin Newton
aa5b53d232
[ruby/prism] Consolidate integer fields into a single reflection class
...
https://github.com/ruby/prism/commit/0156057580
2024-04-22 14:17:45 +00:00