prism 0.19.0 → 0.21.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 +48 -1
- data/Makefile +5 -0
- data/README.md +8 -6
- data/config.yml +236 -38
- data/docs/build_system.md +19 -2
- data/docs/cruby_compilation.md +27 -0
- data/docs/parser_translation.md +34 -0
- data/docs/parsing_rules.md +19 -0
- data/docs/releasing.md +3 -3
- data/docs/ruby_api.md +1 -1
- data/docs/serialization.md +17 -5
- data/ext/prism/api_node.c +101 -81
- data/ext/prism/extension.c +74 -11
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +1700 -505
- data/include/prism/defines.h +8 -0
- data/include/prism/diagnostic.h +39 -2
- data/include/prism/encoding.h +10 -0
- data/include/prism/options.h +40 -14
- data/include/prism/parser.h +34 -18
- data/include/prism/util/pm_buffer.h +9 -0
- data/include/prism/util/pm_constant_pool.h +18 -0
- data/include/prism/util/pm_newline_list.h +0 -11
- data/include/prism/version.h +2 -2
- data/include/prism.h +19 -2
- data/lib/prism/debug.rb +11 -5
- data/lib/prism/dot_visitor.rb +36 -14
- data/lib/prism/dsl.rb +22 -22
- data/lib/prism/ffi.rb +2 -2
- data/lib/prism/node.rb +1020 -737
- data/lib/prism/node_ext.rb +2 -2
- data/lib/prism/parse_result.rb +17 -9
- data/lib/prism/serialize.rb +53 -29
- data/lib/prism/translation/parser/compiler.rb +1828 -0
- data/lib/prism/translation/parser/lexer.rb +335 -0
- data/lib/prism/translation/parser/rubocop.rb +37 -0
- data/lib/prism/translation/parser.rb +171 -0
- data/lib/prism/translation.rb +11 -0
- data/lib/prism.rb +1 -0
- data/prism.gemspec +12 -5
- data/rbi/prism.rbi +150 -88
- data/rbi/prism_static.rbi +15 -3
- data/sig/prism.rbs +996 -961
- data/sig/prism_static.rbs +123 -46
- data/src/diagnostic.c +259 -219
- data/src/encoding.c +5 -9
- data/src/node.c +2 -6
- data/src/options.c +24 -5
- data/src/prettyprint.c +174 -42
- data/src/prism.c +1344 -479
- data/src/serialize.c +12 -9
- data/src/token_type.c +353 -4
- data/src/util/pm_buffer.c +11 -0
- data/src/util/pm_constant_pool.c +37 -11
- data/src/util/pm_newline_list.c +2 -14
- metadata +10 -3
- data/docs/building.md +0 -29
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prism
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -26,8 +26,8 @@ files:
|
|
26
26
|
- README.md
|
27
27
|
- config.yml
|
28
28
|
- docs/build_system.md
|
29
|
-
- docs/building.md
|
30
29
|
- docs/configuration.md
|
30
|
+
- docs/cruby_compilation.md
|
31
31
|
- docs/design.md
|
32
32
|
- docs/encoding.md
|
33
33
|
- docs/fuzzing.md
|
@@ -35,6 +35,8 @@ files:
|
|
35
35
|
- docs/javascript.md
|
36
36
|
- docs/local_variable_depth.md
|
37
37
|
- docs/mapping.md
|
38
|
+
- docs/parser_translation.md
|
39
|
+
- docs/parsing_rules.md
|
38
40
|
- docs/releasing.md
|
39
41
|
- docs/ripper.md
|
40
42
|
- docs/ruby_api.md
|
@@ -88,6 +90,11 @@ files:
|
|
88
90
|
- lib/prism/pattern.rb
|
89
91
|
- lib/prism/ripper_compat.rb
|
90
92
|
- lib/prism/serialize.rb
|
93
|
+
- lib/prism/translation.rb
|
94
|
+
- lib/prism/translation/parser.rb
|
95
|
+
- lib/prism/translation/parser/compiler.rb
|
96
|
+
- lib/prism/translation/parser/lexer.rb
|
97
|
+
- lib/prism/translation/parser/rubocop.rb
|
91
98
|
- lib/prism/visitor.rb
|
92
99
|
- prism.gemspec
|
93
100
|
- rbi/prism.rbi
|
data/docs/building.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Building
|
2
|
-
|
3
|
-
The following describes how to build prism from source. This comes directly from the [Makefile](../Makefile).
|
4
|
-
|
5
|
-
## Common
|
6
|
-
|
7
|
-
All of the source files match `src/**/*.c` and all of the headers match `include/**/*.h`.
|
8
|
-
|
9
|
-
The following flags should be used to compile prism:
|
10
|
-
|
11
|
-
* `-std=c99` - Use the C99 standard
|
12
|
-
* `-Wall -Wconversion -Wextra -Wpedantic -Wundef -Wno-missing-braces` - Enable the warnings we care about
|
13
|
-
* `-Werror` - Treat warnings as errors
|
14
|
-
* `-fvisibility=hidden` - Hide all symbols by default
|
15
|
-
|
16
|
-
## Shared
|
17
|
-
|
18
|
-
If you want to build prism as a shared library and link against it, you should compile with:
|
19
|
-
|
20
|
-
* `-fPIC -shared` - Compile as a shared library
|
21
|
-
* `-DPRISM_EXPORT_SYMBOLS` - Export the symbols (by default nothing is exported)
|
22
|
-
|
23
|
-
## Flags
|
24
|
-
|
25
|
-
`make` respects the `MAKEFLAGS` environment variable. As such, to speed up the build you can run:
|
26
|
-
|
27
|
-
```
|
28
|
-
MAKEFLAGS="-j10" bundle exec rake compile
|
29
|
-
```
|