prism 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -1
- data/README.md +1 -0
- data/config.yml +257 -20
- data/docs/parsing_rules.md +4 -1
- data/ext/prism/extension.c +63 -26
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +559 -327
- data/include/prism/defines.h +27 -0
- data/include/prism/diagnostic.h +5 -1
- data/include/prism/options.h +39 -2
- data/include/prism/parser.h +7 -0
- data/include/prism/util/pm_string.h +27 -4
- data/include/prism/version.h +2 -2
- data/lib/prism/dot_visitor.rb +2 -0
- data/lib/prism/dsl.rb +10 -8
- data/lib/prism/ffi.rb +37 -3
- data/lib/prism/inspect_visitor.rb +1 -1
- data/lib/prism/lex_compat.rb +1 -1
- data/lib/prism/node.rb +132 -89
- data/lib/prism/parse_result.rb +1 -1
- data/lib/prism/reflection.rb +1 -1
- data/lib/prism/serialize.rb +6 -2
- data/lib/prism/translation/parser/lexer.rb +25 -3
- data/lib/prism/translation/ruby_parser.rb +7 -1
- data/prism.gemspec +1 -2
- data/rbi/prism/dsl.rbi +32 -32
- data/rbi/prism/node.rbi +69 -59
- data/rbi/prism.rbi +34 -34
- data/sig/prism/dsl.rbs +24 -24
- data/sig/prism/node.rbs +113 -105
- data/sig/prism.rbs +90 -72
- data/src/diagnostic.c +15 -7
- data/src/node.c +10 -0
- data/src/options.c +58 -27
- data/src/prettyprint.c +10 -0
- data/src/prism.c +588 -385
- data/src/util/pm_string.c +123 -65
- metadata +2 -3
- data/lib/prism/translation/parser/rubocop.rb +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea89f88aef2ec51d2cfb5868cf873ab256393f5ba632381a3a53631c2506dbc3
|
4
|
+
data.tar.gz: 4da85d79e85d5cca843eb6e71cea07efc80a6e77608aa3027e1cd75c3c3b735a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b7f92a58fa176b04aab230f49dcdc08f9b810575426402db6fc9eee0921ac5ddddf1f01f18bb9429a914955759e8d4cee5a70674e14eb0b0169018ce615780e
|
7
|
+
data.tar.gz: e4a5a6ba40bc7692c6c904f452dd8ff18881703c99d51969507619368748eec29936dc3f521e8967b6d728ea331f26f9f670b44daedde2106f649104aefe0c30
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.1.0] - 2024-10-02
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Explicitly type each child node field in the Ruby API.
|
14
|
+
- Add the `main_script` option to the parse APIs, which controls whether or not shebangs are considered.
|
15
|
+
- Add the `partial_script` options to the parse APIs, which controls whether or not jumps that would otherwise be considered invalid are allowed. This is useful for parsing things like ERB sources, where you know it will be evaluated in a different context. Note that this functionality is replacing the previous idiom of passing in a list of scopes to indicate an `eval` context, because that behavior has changed upstream in `ruby/ruby`.
|
16
|
+
- Add `ArgumentsNode#contains_multiple_splats?`.
|
17
|
+
- Add `ArgumentsNode#contains_forwarding?`.
|
18
|
+
- Accept all valid Ruby versions for the `version` option on parse APIs.
|
19
|
+
- Accept version shorthands like `"3.3"` and `"3.4"` for the `version` option on parse APIs.
|
20
|
+
- Support a max depth to protect against malicious payloads without hitting the stack limit.
|
21
|
+
|
22
|
+
### Changed
|
23
|
+
|
24
|
+
- Fix some token incompatibilities in the `parser` translation.
|
25
|
+
- Fix up parsing tempfiles on Windows.
|
26
|
+
- Fix up handling UTF-8 characters in file paths on Windows.
|
27
|
+
- Do not warn for a `\r` at the end of a shebang on Windows.
|
28
|
+
- Properly handle erroring for parsing a directory on Windows.
|
29
|
+
- When a numbered reference is out of range, warn instead of raise.
|
30
|
+
- Allow returns in default parameter values.
|
31
|
+
- Reject many more invalid syntax patterns.
|
32
|
+
|
9
33
|
## [1.0.0] - 2024-08-28
|
10
34
|
|
11
35
|
### Added
|
@@ -567,7 +591,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
567
591
|
|
568
592
|
- 🎉 Initial release! 🎉
|
569
593
|
|
570
|
-
[unreleased]: https://github.com/ruby/prism/compare/v1.
|
594
|
+
[unreleased]: https://github.com/ruby/prism/compare/v1.1.0...HEAD
|
595
|
+
[1.1.0]: https://github.com/ruby/prism/compare/v1.0.0...v1.1.0
|
571
596
|
[1.0.0]: https://github.com/ruby/prism/compare/v0.30.0...v1.0.0
|
572
597
|
[0.30.0]: https://github.com/ruby/prism/compare/v0.29.0...v0.30.0
|
573
598
|
[0.29.0]: https://github.com/ruby/prism/compare/v0.28.0...v0.29.0
|
data/README.md
CHANGED
@@ -134,6 +134,7 @@ Prism has been integrated into the majority of Ruby runtimes, many libraries, an
|
|
134
134
|
* [smart_todo](https://github.com/Shopify/smart_todo/pull/69)
|
135
135
|
* [sorbet-eraser](https://github.com/kddnewton/sorbet-eraser/pull/25)
|
136
136
|
* [synvert](https://github.com/xinminlabs/synvert-core-ruby)
|
137
|
+
* [typeprof](https://github.com/ruby/typeprof)
|
137
138
|
|
138
139
|
### Applications
|
139
140
|
|