prism 1.2.0 → 1.3.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 +23 -1
- data/Makefile +1 -1
- data/config.yml +420 -2
- data/docs/build_system.md +8 -11
- data/docs/relocation.md +34 -0
- data/ext/prism/api_node.c +18 -10
- data/ext/prism/extconf.rb +13 -36
- data/ext/prism/extension.c +68 -0
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +426 -2
- data/include/prism/defines.h +22 -7
- data/include/prism/version.h +2 -2
- data/include/prism.h +47 -0
- data/lib/prism/dot_visitor.rb +10 -0
- data/lib/prism/dsl.rb +4 -4
- data/lib/prism/ffi.rb +49 -2
- data/lib/prism/inspect_visitor.rb +2 -0
- data/lib/prism/node.rb +1838 -95
- data/lib/prism/parse_result/errors.rb +1 -1
- data/lib/prism/parse_result.rb +2 -2
- data/lib/prism/reflection.rb +2 -2
- data/lib/prism/relocation.rb +504 -0
- data/lib/prism/serialize.rb +5 -5
- data/lib/prism/string_query.rb +30 -0
- data/lib/prism/translation/parser/compiler.rb +36 -26
- data/lib/prism/translation/ruby_parser.rb +12 -3
- data/lib/prism.rb +6 -4
- data/prism.gemspec +7 -1
- data/rbi/prism/dsl.rbi +4 -4
- data/rbi/prism/node.rbi +22 -10
- data/rbi/prism/string_query.rbi +12 -0
- data/sig/prism/dsl.rbs +2 -2
- data/sig/prism/node.rbs +12 -8
- data/sig/prism/relocation.rbs +185 -0
- data/sig/prism/string_query.rbs +11 -0
- data/src/node.c +18 -0
- data/src/prettyprint.c +32 -0
- data/src/prism.c +364 -81
- data/src/regexp.c +7 -3
- data/src/serialize.c +12 -0
- data/src/static_literals.c +1 -1
- data/src/util/pm_char.c +1 -1
- data/src/util/pm_string.c +1 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc945a81285247ae139110607116e5ad0211e008f8e69d76002238755deca5dc
|
4
|
+
data.tar.gz: 81703e9b86fd950af63fbea201f8cd9ddec3a3a330d24c80aba7461782bb347b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39fb25eec8d603cd26f31ce75281e3cf257f8f21451e6687eda11d14e090013651284b1f7b35612004b0603105883d0e1d8de1d82b192ce5238843e03203e9fa
|
7
|
+
data.tar.gz: 4544a22d735276ca60cf3dd4e7b91ce64aa60539d555466d73d3eebb91502a0a357232bd1c0722232f3745481e554ba6ab2eb7a23f05a25e5d0c114f9077dc52
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,27 @@ 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.3.0] - 2024-12-21
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Introduce `Prism::StringQuery`.
|
14
|
+
- Introduce `Prism::Relocation`.
|
15
|
+
- Track `do` keyword for `WhileNode` and `UntilNode`.
|
16
|
+
- Change the way the gem is built to rely on `mkmf` instead of `make`.
|
17
|
+
- Lots more documentation on node fields.
|
18
|
+
|
19
|
+
### Changed
|
20
|
+
|
21
|
+
- Properly add an error for `def @foo; end`.
|
22
|
+
- Properly add an error for `foo(**, *)`.
|
23
|
+
- Fix up regression in string parsing in `RubyParser` translation.
|
24
|
+
- Reject invalid dot method call after match expression.
|
25
|
+
- Reject invalid operator after match expression.
|
26
|
+
- Fix up %-literals delimited by newlines.
|
27
|
+
- Properly add an error for `-> { _1; -> { _1 } }`.
|
28
|
+
- Reject blocks and keywords in index writes.
|
29
|
+
|
9
30
|
## [1.2.0] - 2024-10-10
|
10
31
|
|
11
32
|
### Added
|
@@ -606,7 +627,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
606
627
|
|
607
628
|
- 🎉 Initial release! 🎉
|
608
629
|
|
609
|
-
[unreleased]: https://github.com/ruby/prism/compare/v1.
|
630
|
+
[unreleased]: https://github.com/ruby/prism/compare/v1.3.0...HEAD
|
631
|
+
[1.3.0]: https://github.com/ruby/prism/compare/v1.2.0...v1.3.0
|
610
632
|
[1.2.0]: https://github.com/ruby/prism/compare/v1.1.0...v1.2.0
|
611
633
|
[1.1.0]: https://github.com/ruby/prism/compare/v1.0.0...v1.1.0
|
612
634
|
[1.0.0]: https://github.com/ruby/prism/compare/v0.30.0...v1.0.0
|
data/Makefile
CHANGED
@@ -11,7 +11,7 @@ FUZZ_OUTPUT_DIR = $(CURDIR)/fuzz/output
|
|
11
11
|
SOEXT ?= $(shell ruby -e 'puts RbConfig::CONFIG["SOEXT"]')
|
12
12
|
|
13
13
|
CPPFLAGS := -Iinclude $(CPPFLAGS)
|
14
|
-
CFLAGS := -g -O2 -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -Wno-missing-braces -fPIC -fvisibility=hidden $(CFLAGS)
|
14
|
+
CFLAGS := -g -O2 -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -Wno-missing-braces -fPIC -fvisibility=hidden -Wimplicit-fallthrough $(CFLAGS)
|
15
15
|
CC ?= cc
|
16
16
|
AR ?= ar
|
17
17
|
WASI_SDK_PATH := /opt/wasi-sdk
|