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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34ddf7552f6698f496fba09232eac5bcfb053d0455cdac655d81d4a9e5c60d96
4
- data.tar.gz: 248141836d3f2502508f3374586bfd6590d1457dd0508494588a8905c56aea91
3
+ metadata.gz: 2344922b08aa30076aab32c5a92e0d7f21a05f03bb85d089cc69e228a71e3b20
4
+ data.tar.gz: 7a44533dd2827ec9f6c31fc69c533c9f90b88520aef71219a348aa61fa460fbd
5
5
  SHA512:
6
- metadata.gz: 6e46578f5a2dd28f487bd4ffbdc7cd34bf15f230118f53bf932bea0ccff22cc4fcd000804f9a7bc27fd3399099bbd368f9ac89b6408df7de766ad1aef24a3cda
7
- data.tar.gz: 7e25c7caf0fbf963e7c7aadaf35535f3c770c1813e0b9cfd3f8d4623d2d47c5a1d8e2e487d59d75a711871b9bdf5dca92c9e85af0dd4d3f513e86d3d7a66e37d
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.7.0...HEAD
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/ $(DEBUG_FLAGS) -DPRISM_EXPORT_SYMBOLS -D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(CFLAGS) -Wl,--export-all -Wl,--no-entry -mexec-model=reactor -o $@ $(SOURCES)
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
- docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/4.0/Gemfile" ruby:4.0.0-preview2 bundle update
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
@@ -1,7 +1,7 @@
1
1
  #ifndef PRISM_EXT_NODE_H
2
2
  #define PRISM_EXT_NODE_H
3
3
 
4
- #define EXPECTED_PRISM_VERSION "1.7.0"
4
+ #define EXPECTED_PRISM_VERSION "1.8.0"
5
5
 
6
6
  #include <ruby.h>
7
7
  #include <ruby/encoding.h>
@@ -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 7
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.7.0"
27
+ #define PRISM_VERSION "1.8.0"
28
28
 
29
29
  #endif