prism 1.7.0 → 1.8.0
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 +17 -1
- data/Makefile +7 -1
- data/docs/releasing.md +2 -4
- data/docs/ruby_api.md +1 -0
- data/ext/prism/extension.h +1 -1
- data/include/prism/version.h +2 -2
- 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 +1 -1
- 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/prism.c +48 -27
- 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: 2344922b08aa30076aab32c5a92e0d7f21a05f03bb85d089cc69e228a71e3b20
|
|
4
|
+
data.tar.gz: 7a44533dd2827ec9f6c31fc69c533c9f90b88520aef71219a348aa61fa460fbd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c278e7b881b89f51150850df09062d9a9bd5e5076746e4b86ab199729a588f8aa346e12b6ba9b95dc0cf53592866bf216977bbb7da10cef6bd8a018681e9f45f
|
|
7
|
+
data.tar.gz: '009dee7695d1f7d58adb68d3829f97ecff445cc0eb8509526979f938932e553abdc2ba601049df67b8b29a75b7d542a9fb06d4c1984131d6f60e2ac9e3cf83c2'
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.8.0] - 2026-01-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Optimize ruby visitor.
|
|
12
|
+
- Report unterminated construct errors at opening token.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Correctly expose ripper state.
|
|
17
|
+
- Use one file for versioned parser classes.
|
|
18
|
+
- Fix denominator of rational float literal.
|
|
19
|
+
- Decouple ripper translator from ripper library.
|
|
20
|
+
- Sync Prism::Translation::ParserCurrent with Ruby 4.0.
|
|
21
|
+
|
|
7
22
|
## [Unreleased]
|
|
8
23
|
|
|
9
24
|
## [1.7.0] - 2025-12-18
|
|
@@ -716,7 +731,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
716
731
|
|
|
717
732
|
- 🎉 Initial release! 🎉
|
|
718
733
|
|
|
719
|
-
[unreleased]: https://github.com/ruby/prism/compare/v1.
|
|
734
|
+
[unreleased]: https://github.com/ruby/prism/compare/v1.8.0...HEAD
|
|
735
|
+
[1.8.0]: https://github.com/ruby/prism/compare/v1.7.0...v1.8.0
|
|
720
736
|
[1.7.0]: https://github.com/ruby/prism/compare/v1.6.0...v1.7.0
|
|
721
737
|
[1.6.0]: https://github.com/ruby/prism/compare/v1.5.2...v1.6.0
|
|
722
738
|
[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/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/version.h
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
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.
|
|
@@ -24,6 +24,6 @@
|
|
|
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.0"
|
|
28
28
|
|
|
29
29
|
#endif
|