prism 1.1.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 +39 -1
- data/Makefile +1 -1
- data/config.yml +422 -3
- 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 +427 -3
- data/include/prism/defines.h +22 -7
- data/include/prism/diagnostic.h +1 -0
- data/include/prism/parser.h +25 -12
- 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 +1839 -96
- data/lib/prism/parse_result/errors.rb +1 -1
- data/lib/prism/parse_result.rb +140 -3
- data/lib/prism/reflection.rb +2 -2
- data/lib/prism/relocation.rb +504 -0
- data/lib/prism/serialize.rb +17 -5
- data/lib/prism/string_query.rb +30 -0
- data/lib/prism/translation/parser/compiler.rb +36 -26
- data/lib/prism/translation/parser.rb +3 -3
- data/lib/prism/translation/ripper.rb +1 -5
- data/lib/prism/translation/ruby_parser.rb +14 -5
- data/lib/prism.rb +6 -4
- data/prism.gemspec +7 -1
- data/rbi/prism/dsl.rbi +4 -4
- data/rbi/prism/node.rbi +5118 -1030
- data/rbi/prism/parse_result.rbi +29 -0
- data/rbi/prism/string_query.rbi +12 -0
- data/rbi/prism.rbi +34 -34
- data/sig/prism/dsl.rbs +2 -2
- data/sig/prism/node.rbs +13 -98
- data/sig/prism/parse_result.rbs +20 -0
- data/sig/prism/relocation.rbs +185 -0
- data/sig/prism/string_query.rbs +11 -0
- data/src/diagnostic.c +3 -1
- data/src/node.c +18 -0
- data/src/prettyprint.c +32 -0
- data/src/prism.c +586 -195
- 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,42 @@ 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
|
+
|
30
|
+
## [1.2.0] - 2024-10-10
|
31
|
+
|
32
|
+
### Added
|
33
|
+
|
34
|
+
- Introduce `Prism::CodeUnitsCache`.
|
35
|
+
|
36
|
+
### Changed
|
37
|
+
|
38
|
+
- Properly handle lexing global variables that begin with `$-`.
|
39
|
+
- Properly reject invalid multi writes within parentheses.
|
40
|
+
- Fix unary `*` binding power.
|
41
|
+
- Set `contains_keywords` flag for implicit `gets` calls when `-p` is used.
|
42
|
+
- Properly reject invalid non-associative operator patterns.
|
43
|
+
- Do not warn about unused variables declared on negative lines.
|
44
|
+
|
9
45
|
## [1.1.0] - 2024-10-02
|
10
46
|
|
11
47
|
### Added
|
@@ -591,7 +627,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
591
627
|
|
592
628
|
- 🎉 Initial release! 🎉
|
593
629
|
|
594
|
-
[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
|
632
|
+
[1.2.0]: https://github.com/ruby/prism/compare/v1.1.0...v1.2.0
|
595
633
|
[1.1.0]: https://github.com/ruby/prism/compare/v1.0.0...v1.1.0
|
596
634
|
[1.0.0]: https://github.com/ruby/prism/compare/v0.30.0...v1.0.0
|
597
635
|
[0.30.0]: https://github.com/ruby/prism/compare/v0.29.0...v0.30.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
|