prism 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -1
- data/Makefile +7 -1
- data/config.yml +2 -0
- data/docs/releasing.md +2 -4
- data/docs/ruby_api.md +1 -0
- data/ext/prism/extension.h +1 -1
- data/include/prism/diagnostic.h +2 -0
- data/include/prism/version.h +3 -3
- data/lib/prism/compiler.rb +152 -152
- data/lib/prism/lex_compat.rb +17 -75
- data/lib/prism/lex_ripper.rb +64 -0
- data/lib/prism/node.rb +1104 -1
- data/lib/prism/serialize.rb +4 -2
- data/lib/prism/translation/parser_current.rb +1 -1
- data/lib/prism/translation/parser_versions.rb +36 -0
- data/lib/prism/translation/ripper/lexer.rb +46 -0
- data/lib/prism/translation/ripper.rb +25 -2
- data/lib/prism/translation/ruby_parser.rb +1 -1
- data/lib/prism/translation.rb +5 -5
- data/lib/prism/visitor.rb +152 -152
- data/lib/prism.rb +1 -1
- data/prism.gemspec +5 -11
- data/rbi/prism/translation/parser_versions.rbi +23 -0
- data/sig/prism/node.rbs +1 -0
- data/src/diagnostic.c +5 -1
- data/src/prism.c +106 -41
- metadata +5 -11
- data/lib/prism/translation/parser33.rb +0 -13
- data/lib/prism/translation/parser34.rb +0 -13
- data/lib/prism/translation/parser35.rb +0 -8
- data/lib/prism/translation/parser40.rb +0 -13
- data/lib/prism/translation/parser41.rb +0 -13
- data/rbi/prism/translation/parser33.rbi +0 -6
- data/rbi/prism/translation/parser34.rbi +0 -6
- data/rbi/prism/translation/parser35.rbi +0 -4
- data/rbi/prism/translation/parser40.rbi +0 -6
- data/rbi/prism/translation/parser41.rbi +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc702a11a2b52196e74eee050fefa294ac3c2aef3dcd7d4ab2f347e075707286
|
|
4
|
+
data.tar.gz: 32666fef05c64edc7a55ab517d6b582931f9b5b11ff22b5d9dfc5c7d00ee00b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2507880056ab51a2aafb14b6927a5d009ff8f3be4eb9917705a56ac59ac6c21c4a687f984652f2f4abe813e24f239077ee5aa0cd7308b6f3240fa864b1b06b28
|
|
7
|
+
data.tar.gz: 921a61d5bd263f70975250aca097c6ed36b747762098b2bc90d113d88f8c8f802e931bf7c2f78c365bce9390190b53bc1c243c1dfa5d3ea2a9c89a12b45659fb
|
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.8.1] - 2026-03-16
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Fix `not` binding power in endless methods.
|
|
14
|
+
- Correctly handle `and?` and similar on Ruby 4.0.
|
|
15
|
+
- Fix error message for block/lambda with `...` argument.
|
|
16
|
+
- Fix `in` handling.
|
|
17
|
+
|
|
18
|
+
## [1.8.0] - 2026-01-12
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Optimize ruby visitor.
|
|
23
|
+
- Report unterminated construct errors at opening token.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Correctly expose ripper state.
|
|
28
|
+
- Use one file for versioned parser classes.
|
|
29
|
+
- Fix denominator of rational float literal.
|
|
30
|
+
- Decouple ripper translator from ripper library.
|
|
31
|
+
- Sync Prism::Translation::ParserCurrent with Ruby 4.0.
|
|
32
|
+
|
|
9
33
|
## [1.7.0] - 2025-12-18
|
|
10
34
|
|
|
11
35
|
### Added
|
|
@@ -716,7 +740,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
716
740
|
|
|
717
741
|
- 🎉 Initial release! 🎉
|
|
718
742
|
|
|
719
|
-
[unreleased]: https://github.com/ruby/prism/compare/v1.
|
|
743
|
+
[unreleased]: https://github.com/ruby/prism/compare/v1.8.1...HEAD
|
|
744
|
+
[1.8.1]: https://github.com/ruby/prism/compare/v1.8.0...v1.8.1
|
|
745
|
+
[1.8.0]: https://github.com/ruby/prism/compare/v1.7.0...v1.8.0
|
|
720
746
|
[1.7.0]: https://github.com/ruby/prism/compare/v1.6.0...v1.7.0
|
|
721
747
|
[1.6.0]: https://github.com/ruby/prism/compare/v1.5.2...v1.6.0
|
|
722
748
|
[1.5.2]: https://github.com/ruby/prism/compare/v1.5.1...v1.5.2
|
data/Makefile
CHANGED
|
@@ -43,7 +43,13 @@ build/libprism.a: $(STATIC_OBJECTS)
|
|
|
43
43
|
|
|
44
44
|
javascript/src/prism.wasm: Makefile $(SOURCES) $(HEADERS)
|
|
45
45
|
$(ECHO) "building $@"
|
|
46
|
-
$(Q) $(WASI_SDK_PATH)/bin/clang --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot/
|
|
46
|
+
$(Q) $(WASI_SDK_PATH)/bin/clang --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot/ \
|
|
47
|
+
$(DEBUG_FLAGS) \
|
|
48
|
+
-DPRISM_EXPORT_SYMBOLS -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXCLUDE_JSON -DPRISM_EXCLUDE_PACK \
|
|
49
|
+
-D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(CFLAGS) \
|
|
50
|
+
-Wl,--export-all -Wl,--gc-sections -Wl,--strip-all -Wl,--lto-O3 -Wl,--no-entry -mexec-model=reactor \
|
|
51
|
+
-Oz -g0 -flto -fdata-sections -ffunction-sections \
|
|
52
|
+
-o $@ $(SOURCES)
|
|
47
53
|
|
|
48
54
|
java-wasm/src/test/resources/prism.wasm: Makefile $(SOURCES) $(HEADERS)
|
|
49
55
|
$(ECHO) "building $@"
|
data/config.yml
CHANGED
|
@@ -17,6 +17,8 @@ errors:
|
|
|
17
17
|
- ARGUMENT_FORWARDING_UNBOUND
|
|
18
18
|
- ARGUMENT_NO_FORWARDING_AMPERSAND
|
|
19
19
|
- ARGUMENT_NO_FORWARDING_ELLIPSES
|
|
20
|
+
- ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA
|
|
21
|
+
- ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK
|
|
20
22
|
- ARGUMENT_NO_FORWARDING_STAR
|
|
21
23
|
- ARGUMENT_NO_FORWARDING_STAR_STAR
|
|
22
24
|
- ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT
|
data/docs/releasing.md
CHANGED
|
@@ -47,10 +47,8 @@ bundle install
|
|
|
47
47
|
* Update the version-specific lockfiles:
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
for VERSION in "2.7" "3.0" "3.1" "3.2" "3.3" "3.4"; do docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/$VERSION/Gemfile" "ruby:$VERSION" bundle update; done
|
|
51
|
-
|
|
52
|
-
docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/jruby/Gemfile" jruby:latest bundle update
|
|
53
|
-
BUNDLE_GEMFILE=gemfiles/truffleruby/Gemfile chruby-exec truffleruby -- bundle update
|
|
50
|
+
for VERSION in "2.7" "3.0" "3.1" "3.2" "3.3" "3.4" "4.0"; do docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/$VERSION/Gemfile" "ruby:$VERSION" bundle update; done
|
|
51
|
+
chruby ruby-4.1.0-dev && BUNDLE_GEMFILE=gemfiles/4.1/Gemfile bundle install
|
|
54
52
|
```
|
|
55
53
|
|
|
56
54
|
* Update the cargo lockfiles:
|
data/docs/ruby_api.md
CHANGED
|
@@ -36,6 +36,7 @@ Once you have nodes in hand coming out of a parse result, there are a number of
|
|
|
36
36
|
* `#accept(visitor)` - a method that will immediately call `visit_*` to specialize for the node type
|
|
37
37
|
* `#child_nodes` - a positional array of the child nodes of the node, with `nil` values for any missing children
|
|
38
38
|
* `#compact_child_nodes` - a positional array of the child nodes of the node with no `nil` values
|
|
39
|
+
* `#each_child_node` - with a block given yields all child nodes, without a block return an enumerator containing all child nodes
|
|
39
40
|
* `#copy(**keys)` - a method that allows creating a shallow copy of the node with the given keys overridden
|
|
40
41
|
* `#deconstruct`/`#deconstruct_keys(keys)` - the pattern matching interface for nodes
|
|
41
42
|
* `#inspect` - a string representation that looks like the syntax tree of the node
|
data/ext/prism/extension.h
CHANGED
data/include/prism/diagnostic.h
CHANGED
|
@@ -48,6 +48,8 @@ typedef enum {
|
|
|
48
48
|
PM_ERR_ARGUMENT_FORWARDING_UNBOUND,
|
|
49
49
|
PM_ERR_ARGUMENT_NO_FORWARDING_AMPERSAND,
|
|
50
50
|
PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES,
|
|
51
|
+
PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA,
|
|
52
|
+
PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK,
|
|
51
53
|
PM_ERR_ARGUMENT_NO_FORWARDING_STAR,
|
|
52
54
|
PM_ERR_ARGUMENT_NO_FORWARDING_STAR_STAR,
|
|
53
55
|
PM_ERR_ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT,
|
data/include/prism/version.h
CHANGED
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* The minor version of the Prism library as an int.
|
|
16
16
|
*/
|
|
17
|
-
#define PRISM_VERSION_MINOR
|
|
17
|
+
#define PRISM_VERSION_MINOR 8
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The patch version of the Prism library as an int.
|
|
21
21
|
*/
|
|
22
|
-
#define PRISM_VERSION_PATCH
|
|
22
|
+
#define PRISM_VERSION_PATCH 1
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The version of the Prism library as a constant string.
|
|
26
26
|
*/
|
|
27
|
-
#define PRISM_VERSION "1.
|
|
27
|
+
#define PRISM_VERSION "1.8.1"
|
|
28
28
|
|
|
29
29
|
#endif
|