Kevin Newton
77056674a0
[ruby/prism] Fix up binding power for singleton method receiver
...
https://github.com/ruby/prism/commit/f29ceae5cf
2024-10-02 18:39:20 +00:00
Kevin Newton
2610bf01b2
[ruby/prism] Fix up doubled range in arguments
...
https://github.com/ruby/prism/commit/aee2de91a3
2024-10-02 15:27:01 +00:00
Kevin Newton
2e2520ef10
[ruby/prism] Fix up beginless ranges in method definitions
...
https://github.com/ruby/prism/commit/ab9d80987a
2024-10-02 14:47:53 +00:00
Kevin Newton
467ebbebd9
[ruby/prism] Disallow dynamic patterns in labels at top level followed by pipes
...
https://github.com/ruby/prism/commit/ccc746f918
2024-10-01 15:42:44 -04:00
Kevin Newton
ec230ac643
Resync to latest Prism
2024-10-01 11:03:25 -04:00
Kevin Newton
d86b4041b5
[ruby/prism] Disallow empty labels when not allowed
...
https://github.com/ruby/prism/commit/399ee28dc1
2024-10-01 13:51:05 +00:00
Kevin Newton
75568d23e9
[ruby/prism] Disallow &. after endless range
...
https://github.com/ruby/prism/commit/498dd922d4
2024-10-01 12:57:00 +00:00
Kevin Newton
6c9b5c1615
Sync Prism with latest main branch
2024-09-30 11:36:29 -04:00
Kevin Newton
c1c9ba77ca
[ruby/prism] Require a delimiter for singleton classes
...
https://github.com/ruby/prism/commit/fd58d6a9ea
2024-09-30 14:33:58 +00:00
Daniel Insley
9a966a09cb
[ruby/prism] Fix incorrect reference to AlternationPatternNode as non-void expressions
...
https://github.com/ruby/prism/commit/68de31919e
2024-09-26 15:47:51 +00:00
Daniel Insley
a73d80db41
[ruby/prism] Add fields documentation for AliasMethodNode and AlternationPatternNode
...
https://github.com/ruby/prism/commit/6953daebde
2024-09-26 15:47:51 +00:00
Kevin Newton
1f431b63a2
[ruby/prism] Reject non-assoc ranges with subsequent operators
...
https://github.com/ruby/prism/commit/976a3cd0a5
2024-09-26 14:57:02 +00:00
Kevin Newton
cab81d1bba
[ruby/prism] Update templates/include/prism/ast.h.erb
...
https://github.com/ruby/prism/commit/dc7164e21c
2024-09-25 19:43:47 +00:00
Alexander Momchilov
fa7fef270d
[ruby/prism] Fix rendering of type overview docs
...
https://github.com/ruby/prism/commit/d42bc309cc
2024-09-25 19:43:47 +00:00
Kevin Newton
be331c0eeb
[ruby/prism] Fix up more error messages to more closely match parse.y
...
https://github.com/ruby/prism/commit/988ac82187
2024-09-25 19:19:18 +00:00
Kevin Newton
12cf9f2ae5
[ruby/prism] Fix up void value expression checking for rescue
...
https://github.com/ruby/prism/commit/509ff88e92
2024-09-25 18:34:51 +00:00
Kevin Newton
768ceceb12
[ruby/prism] Disallow label in parentheses
...
https://github.com/ruby/prism/commit/b624e09cc6
2024-09-25 17:33:51 +00:00
Kevin Newton
a6ea4ddb4e
[ruby/prism] Remove use of __assume to simplify
...
https://github.com/ruby/prism/commit/4daf58f7a0
2024-09-25 16:17:08 +00:00
Kevin Newton
bf6109c8cc
[ruby/prism] Fix up windows use of __assume
...
https://github.com/ruby/prism/commit/9fd0c0901e
2024-09-25 16:08:13 +00:00
Kevin Newton
57688cd625
[ruby/prism] Support a max depth to protect against malicious payloads
...
https://github.com/ruby/prism/commit/a474017bbe
2024-09-25 15:47:08 +00:00
Benoit Daloze
cafd666adf
[ruby/prism] Type every node field and mark on-error-only types explicitly
...
* For Loader.java, do not deserialize the AST if there are errors, so then Java nodes only have non-error types for fields.
https://github.com/ruby/prism/commit/ae78e3c605
2024-09-25 13:46:31 +00:00
Kevin Newton
414a848cc6
[ruby/prism] Accept version shorthand like 3.4
...
https://github.com/ruby/prism/commit/098f1c4607
2024-09-24 13:21:36 +00:00
Benoit Daloze
ed4a55fc4d
[ruby/prism] Accept all 3.3.x and 3.4.x Ruby versions for Prism.parse
...
https://github.com/ruby/prism/commit/a4fcd5339a
2024-09-24 12:24:19 +00:00
Benoit Daloze
b8baf3f3ee
[ruby/prism] check_string() should always return a valid C string
...
* Otherwise it is invalid e.g. to call strlen() to the result,
or to assume the argument was a string.
* All callers are already checking for nil before.
https://github.com/ruby/prism/commit/8197be883e
2024-09-24 12:24:19 +00:00
Kevin Newton
f515a1ab4b
[ruby/prism] Introduce partial_script option
...
https://github.com/ruby/prism/commit/b28877fa4f
2024-09-20 15:42:12 +00:00
Jeremy Evans
268c72377b
Raise a compile error for break/next/redo inside eval in cases where it is optimized away
...
In cases where break/next/redo are not valid syntax, they should
raise a SyntaxError even if inside a conditional block that is
optimized away.
Fixes [Bug #20597 ]
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-09-18 16:54:56 -07:00
Kevin Newton
96da3f16a0
[ruby/prism] Allow returns in default parameter values
...
https://github.com/ruby/prism/commit/e98ea15596
2024-09-18 11:52:27 -04:00
Kevin Newton
748933aa1b
[ruby/prism] Accept "do" blocks in some parameter default values
...
https://github.com/ruby/prism/commit/6d7b734dbe
2024-09-17 18:47:27 +00:00
Kevin Newton
7e2ae30f8b
[ruby/prism] Handle retry doubly nested under rescue
...
Fixes [Bug #20747 ]
https://github.com/ruby/prism/commit/d3194715a9
2024-09-16 19:55:29 +00:00
Kevin Newton
2ea1950510
[ruby/prism] Do not leak explicit encoding
...
Fixes [Bug #20744 ]
https://github.com/ruby/prism/commit/f1b8b1b2a2
2024-09-16 18:57:54 +00:00
Kevin Newton
ddbd644001
[ruby/prism] Stat file first to check directory
...
https://github.com/ruby/prism/commit/4ed7de537b
2024-09-13 19:30:57 +00:00
Kevin Newton
f85efc9748
[ruby/prism] Expose main_script in serialization API
...
https://github.com/ruby/prism/commit/0b527ca93f
2024-09-13 19:13:21 +00:00
Kevin Newton
77521afac1
[PRISM] Do not warn ambiguous ampersand when symbol literal
...
Fixes [Bug #20735 ]
2024-09-13 14:09:02 -04:00
Kevin Newton
9afc6a981d
[PRISM] Only parse shebang on main script
...
Fixes [Bug #20730 ]
2024-09-13 12:51:53 -04:00
Kevin Newton
d42d19059d
[PRISM] Allow case/when to be indented with no warning
...
Fixes [Bug #20731 ]
2024-09-13 12:51:36 -04:00
Kevin Newton
74f315c3f5
[PRISM] Turn off mismatched indentation warnings in eval
...
Fixes [Bug #20732 ]
2024-09-13 12:08:56 -04:00
Andrew Konchin
353997dd3e
[ruby/prism] Refactor and move common node flags count into a constant to reuse in templates
...
https://github.com/ruby/prism/commit/c20bf05ecc
2024-09-13 15:05:33 +00:00
Andrew Konchin
38f8f42e4f
[ruby/prism] Unify code style of flags generation in the nodes templates
...
https://github.com/ruby/prism/commit/dbb7e0a44e
2024-09-13 15:05:33 +00:00
Kevin Newton
38ba15beed
[ruby/prism] Check errno for parsing directory
...
https://github.com/ruby/prism/commit/d68ea29d04
2024-09-12 13:43:04 -04:00
Kevin Newton
15135030e5
[ruby/prism] Do not warn \r in shebang on windows
...
https://github.com/ruby/prism/commit/e8c862ca1f
2024-09-12 15:50:34 +00:00
Kevin Newton
d4d6f1de83
[ruby/prism] UTF-8 characters in file name
...
https://github.com/ruby/prism/commit/487f0ffe78
2024-09-11 19:17:12 +00:00
Kevin Newton
1be9a99837
[ruby/prism] Add a flag for arguments that contain forwarding
...
https://github.com/ruby/prism/commit/ebd2889bee
2024-09-11 16:35:10 +00:00
Kevin Newton
886fc69b1c
[ruby/prism] Parse tempfile
...
https://github.com/ruby/prism/commit/31154a389a
2024-09-11 15:39:22 +00:00
Kevin Newton
da0460a2e1
[ruby/prism] Update config.yml
...
https://github.com/ruby/prism/commit/8a3fa9f46e
2024-09-04 13:13:38 +00:00
Kevin Newton
a246188695
[ruby/prism] Update config.yml
...
https://github.com/ruby/prism/commit/369b2c1304
2024-09-04 13:13:38 +00:00
ydah
5c3a52627f
[ruby/prism] containt ==> contains
...
https://github.com/ruby/prism/commit/fa65b66237
2024-09-04 13:13:37 +00:00
Kevin Newton
9f4954559b
[PRISM] Handle nth reference ERANGE with warning
2024-08-29 15:24:55 -04:00
Kevin Newton
d25833b81a
[ruby/prism] Multi-splat flag for arguments
...
https://github.com/ruby/prism/commit/21cb9b78ae
2024-08-28 21:10:39 +00:00
Kevin Newton
ad737a8d0f
[PRISM] Sync version update
2024-08-28 15:43:32 -04:00
Kevin Newton
417bb8d4fd
[PRISM] Field renaming
...
Rename some fields that do not quite make sense.
* CaseMatchNode#consequent -> CaseMatchNode#else_clause
* CaseNode#consequent -> CaseNode#else_clause
* IfNode#consequent -> IfNode#subsequent
* RescueNode#consequent -> RescueNode#subsequent
* UnlessNode#consequent -> UnlessNode#else_clause
2024-08-28 15:06:53 -04:00