jruby-prism-parser 0.24.0-java → 1.4.0-java
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/BSDmakefile +58 -0
- data/CHANGELOG.md +269 -1
- data/CONTRIBUTING.md +0 -4
- data/Makefile +25 -18
- data/README.md +57 -6
- data/config.yml +1724 -140
- data/docs/build_system.md +39 -11
- data/docs/configuration.md +4 -0
- data/docs/cruby_compilation.md +1 -1
- data/docs/fuzzing.md +1 -1
- data/docs/parser_translation.md +14 -9
- data/docs/parsing_rules.md +4 -1
- data/docs/releasing.md +8 -10
- data/docs/relocation.md +34 -0
- data/docs/ripper_translation.md +72 -0
- data/docs/ruby_api.md +2 -1
- data/docs/serialization.md +29 -5
- data/ext/prism/api_node.c +3395 -1999
- data/ext/prism/api_pack.c +9 -0
- data/ext/prism/extconf.rb +55 -34
- data/ext/prism/extension.c +597 -346
- data/ext/prism/extension.h +6 -5
- data/include/prism/ast.h +2612 -455
- data/include/prism/defines.h +160 -2
- data/include/prism/diagnostic.h +188 -76
- data/include/prism/encoding.h +22 -4
- data/include/prism/node.h +89 -17
- data/include/prism/options.h +224 -12
- data/include/prism/pack.h +11 -0
- data/include/prism/parser.h +267 -66
- data/include/prism/prettyprint.h +8 -0
- data/include/prism/regexp.h +18 -8
- data/include/prism/static_literals.h +121 -0
- data/include/prism/util/pm_buffer.h +75 -2
- data/include/prism/util/pm_char.h +1 -2
- data/include/prism/util/pm_constant_pool.h +18 -9
- data/include/prism/util/pm_integer.h +126 -0
- data/include/prism/util/pm_list.h +1 -1
- data/include/prism/util/pm_newline_list.h +19 -0
- data/include/prism/util/pm_string.h +48 -8
- data/include/prism/version.h +3 -3
- data/include/prism.h +99 -5
- data/jruby-prism.jar +0 -0
- data/lib/prism/compiler.rb +11 -1
- data/lib/prism/desugar_compiler.rb +113 -74
- data/lib/prism/dispatcher.rb +45 -1
- data/lib/prism/dot_visitor.rb +201 -77
- data/lib/prism/dsl.rb +673 -461
- data/lib/prism/ffi.rb +233 -45
- data/lib/prism/inspect_visitor.rb +2389 -0
- data/lib/prism/lex_compat.rb +35 -16
- data/lib/prism/mutation_compiler.rb +24 -8
- data/lib/prism/node.rb +7731 -8460
- data/lib/prism/node_ext.rb +328 -32
- data/lib/prism/pack.rb +4 -0
- data/lib/prism/parse_result/comments.rb +34 -24
- data/lib/prism/parse_result/errors.rb +65 -0
- data/lib/prism/parse_result/newlines.rb +102 -12
- data/lib/prism/parse_result.rb +448 -44
- data/lib/prism/pattern.rb +28 -10
- data/lib/prism/polyfill/append_as_bytes.rb +15 -0
- data/lib/prism/polyfill/byteindex.rb +13 -0
- data/lib/prism/polyfill/unpack1.rb +14 -0
- data/lib/prism/reflection.rb +413 -0
- data/lib/prism/relocation.rb +504 -0
- data/lib/prism/serialize.rb +1940 -1198
- data/lib/prism/string_query.rb +30 -0
- data/lib/prism/translation/parser/builder.rb +61 -0
- data/lib/prism/translation/parser/compiler.rb +569 -195
- data/lib/prism/translation/parser/lexer.rb +516 -39
- data/lib/prism/translation/parser.rb +177 -12
- data/lib/prism/translation/parser33.rb +1 -1
- data/lib/prism/translation/parser34.rb +1 -1
- data/lib/prism/translation/parser35.rb +12 -0
- data/lib/prism/translation/ripper/sexp.rb +125 -0
- data/lib/prism/translation/ripper/shim.rb +5 -0
- data/lib/prism/translation/ripper.rb +3224 -462
- data/lib/prism/translation/ruby_parser.rb +194 -69
- data/lib/prism/translation.rb +4 -1
- data/lib/prism/version.rb +1 -1
- data/lib/prism/visitor.rb +13 -0
- data/lib/prism.rb +17 -27
- data/prism.gemspec +57 -17
- data/rbi/prism/compiler.rbi +12 -0
- data/rbi/prism/dsl.rbi +524 -0
- data/rbi/prism/inspect_visitor.rbi +12 -0
- data/rbi/prism/node.rbi +8722 -0
- data/rbi/prism/node_ext.rbi +107 -0
- data/rbi/prism/parse_result.rbi +404 -0
- data/rbi/prism/reflection.rbi +58 -0
- data/rbi/prism/string_query.rbi +12 -0
- data/rbi/prism/translation/parser.rbi +11 -0
- data/rbi/prism/translation/parser33.rbi +6 -0
- data/rbi/prism/translation/parser34.rbi +6 -0
- data/rbi/prism/translation/parser35.rbi +6 -0
- data/rbi/prism/translation/ripper.rbi +15 -0
- data/rbi/prism/visitor.rbi +473 -0
- data/rbi/prism.rbi +44 -7745
- data/sig/prism/compiler.rbs +9 -0
- data/sig/prism/dispatcher.rbs +16 -0
- data/sig/prism/dot_visitor.rbs +6 -0
- data/sig/prism/dsl.rbs +351 -0
- data/sig/prism/inspect_visitor.rbs +22 -0
- data/sig/prism/lex_compat.rbs +10 -0
- data/sig/prism/mutation_compiler.rbs +159 -0
- data/sig/prism/node.rbs +3614 -0
- data/sig/prism/node_ext.rbs +82 -0
- data/sig/prism/pack.rbs +43 -0
- data/sig/prism/parse_result.rbs +192 -0
- data/sig/prism/pattern.rbs +13 -0
- data/sig/prism/reflection.rbs +50 -0
- data/sig/prism/relocation.rbs +185 -0
- data/sig/prism/serialize.rbs +8 -0
- data/sig/prism/string_query.rbs +11 -0
- data/sig/prism/visitor.rbs +169 -0
- data/sig/prism.rbs +248 -4767
- data/src/diagnostic.c +672 -230
- data/src/encoding.c +211 -108
- data/src/node.c +7541 -1653
- data/src/options.c +135 -20
- data/src/pack.c +33 -17
- data/src/prettyprint.c +1543 -1485
- data/src/prism.c +7813 -3050
- data/src/regexp.c +225 -73
- data/src/serialize.c +101 -77
- data/src/static_literals.c +617 -0
- data/src/token_type.c +14 -13
- data/src/util/pm_buffer.c +187 -20
- data/src/util/pm_char.c +5 -5
- data/src/util/pm_constant_pool.c +39 -19
- data/src/util/pm_integer.c +670 -0
- data/src/util/pm_list.c +1 -1
- data/src/util/pm_newline_list.c +43 -5
- data/src/util/pm_string.c +213 -33
- data/src/util/pm_strncasecmp.c +13 -1
- data/src/util/pm_strpbrk.c +32 -6
- metadata +55 -19
- data/docs/ripper.md +0 -36
- data/include/prism/util/pm_state_stack.h +0 -42
- data/include/prism/util/pm_string_list.h +0 -44
- data/lib/prism/debug.rb +0 -206
- data/lib/prism/node_inspector.rb +0 -68
- data/lib/prism/translation/parser/rubocop.rb +0 -45
- data/rbi/prism_static.rbi +0 -207
- data/sig/prism_static.rbs +0 -201
- data/src/util/pm_state_stack.c +0 -25
- data/src/util/pm_string_list.c +0 -28
data/prism.gemspec
CHANGED
@@ -13,12 +13,13 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/jruby/jruby-prism"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.required_ruby_version = ">=
|
16
|
+
spec.required_ruby_version = ">= 3.4.0"
|
17
17
|
|
18
18
|
spec.requirements << "jar org.jruby, jruby-prism, #{Prism::VERSION}, :scope => :runtime"
|
19
19
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
spec.files = [
|
22
|
+
"BSDmakefile",
|
22
23
|
"CHANGELOG.md",
|
23
24
|
"CODE_OF_CONDUCT.md",
|
24
25
|
"CONTRIBUTING.md",
|
@@ -39,7 +40,8 @@ Gem::Specification.new do |spec|
|
|
39
40
|
"docs/parser_translation.md",
|
40
41
|
"docs/parsing_rules.md",
|
41
42
|
"docs/releasing.md",
|
42
|
-
"docs/
|
43
|
+
"docs/relocation.md",
|
44
|
+
"docs/ripper_translation.md",
|
43
45
|
"docs/ruby_api.md",
|
44
46
|
"docs/ruby_parser_translation.md",
|
45
47
|
"docs/serialization.md",
|
@@ -59,74 +61,112 @@ Gem::Specification.new do |spec|
|
|
59
61
|
"include/prism/parser.h",
|
60
62
|
"include/prism/prettyprint.h",
|
61
63
|
"include/prism/regexp.h",
|
64
|
+
"include/prism/static_literals.h",
|
62
65
|
"include/prism/util/pm_buffer.h",
|
63
66
|
"include/prism/util/pm_char.h",
|
64
67
|
"include/prism/util/pm_constant_pool.h",
|
68
|
+
"include/prism/util/pm_integer.h",
|
65
69
|
"include/prism/util/pm_list.h",
|
66
70
|
"include/prism/util/pm_memchr.h",
|
67
71
|
"include/prism/util/pm_newline_list.h",
|
68
|
-
"include/prism/util/pm_state_stack.h",
|
69
72
|
"include/prism/util/pm_strncasecmp.h",
|
70
73
|
"include/prism/util/pm_string.h",
|
71
|
-
"include/prism/util/pm_string_list.h",
|
72
74
|
"include/prism/util/pm_strpbrk.h",
|
73
75
|
"include/prism/version.h",
|
74
76
|
"lib/prism.rb",
|
75
77
|
"lib/prism/compiler.rb",
|
76
|
-
"lib/prism/debug.rb",
|
77
78
|
"lib/prism/desugar_compiler.rb",
|
78
79
|
"lib/prism/dispatcher.rb",
|
79
80
|
"lib/prism/dot_visitor.rb",
|
80
81
|
"lib/prism/dsl.rb",
|
81
82
|
"lib/prism/ffi.rb",
|
83
|
+
"lib/prism/inspect_visitor.rb",
|
82
84
|
"lib/prism/lex_compat.rb",
|
83
85
|
"lib/prism/mutation_compiler.rb",
|
84
86
|
"lib/prism/node_ext.rb",
|
85
|
-
"lib/prism/node_inspector.rb",
|
86
87
|
"lib/prism/node.rb",
|
87
88
|
"lib/prism/pack.rb",
|
88
89
|
"lib/prism/parse_result.rb",
|
89
90
|
"lib/prism/parse_result/comments.rb",
|
91
|
+
"lib/prism/parse_result/errors.rb",
|
90
92
|
"lib/prism/parse_result/newlines.rb",
|
91
93
|
"lib/prism/pattern.rb",
|
94
|
+
"lib/prism/polyfill/append_as_bytes.rb",
|
95
|
+
"lib/prism/polyfill/byteindex.rb",
|
96
|
+
"lib/prism/polyfill/unpack1.rb",
|
97
|
+
"lib/prism/reflection.rb",
|
98
|
+
"lib/prism/relocation.rb",
|
92
99
|
"lib/prism/serialize.rb",
|
100
|
+
"lib/prism/string_query.rb",
|
93
101
|
"lib/prism/translation.rb",
|
94
102
|
"lib/prism/translation/parser.rb",
|
95
103
|
"lib/prism/translation/parser33.rb",
|
96
104
|
"lib/prism/translation/parser34.rb",
|
105
|
+
"lib/prism/translation/parser35.rb",
|
106
|
+
"lib/prism/translation/parser/builder.rb",
|
97
107
|
"lib/prism/translation/parser/compiler.rb",
|
98
108
|
"lib/prism/translation/parser/lexer.rb",
|
99
|
-
"lib/prism/translation/parser/rubocop.rb",
|
100
109
|
"lib/prism/translation/ripper.rb",
|
110
|
+
"lib/prism/translation/ripper/sexp.rb",
|
111
|
+
"lib/prism/translation/ripper/shim.rb",
|
101
112
|
"lib/prism/translation/ruby_parser.rb",
|
113
|
+
"lib/prism/version.rb",
|
102
114
|
"lib/prism/visitor.rb",
|
115
|
+
"prism.gemspec",
|
116
|
+
"rbi/prism.rbi",
|
117
|
+
"rbi/prism/compiler.rbi",
|
118
|
+
"rbi/prism/dsl.rbi",
|
119
|
+
"rbi/prism/inspect_visitor.rbi",
|
120
|
+
"rbi/prism/node_ext.rbi",
|
121
|
+
"rbi/prism/node.rbi",
|
122
|
+
"rbi/prism/parse_result.rbi",
|
123
|
+
"rbi/prism/reflection.rbi",
|
124
|
+
"rbi/prism/string_query.rbi",
|
125
|
+
"rbi/prism/translation/parser.rbi",
|
126
|
+
"rbi/prism/translation/parser33.rbi",
|
127
|
+
"rbi/prism/translation/parser34.rbi",
|
128
|
+
"rbi/prism/translation/parser35.rbi",
|
129
|
+
"rbi/prism/translation/ripper.rbi",
|
130
|
+
"rbi/prism/visitor.rbi",
|
131
|
+
"sig/prism.rbs",
|
132
|
+
"sig/prism/compiler.rbs",
|
133
|
+
"sig/prism/dispatcher.rbs",
|
134
|
+
"sig/prism/dot_visitor.rbs",
|
135
|
+
"sig/prism/dsl.rbs",
|
136
|
+
"sig/prism/inspect_visitor.rbs",
|
137
|
+
"sig/prism/lex_compat.rbs",
|
138
|
+
"sig/prism/mutation_compiler.rbs",
|
139
|
+
"sig/prism/node_ext.rbs",
|
140
|
+
"sig/prism/node.rbs",
|
141
|
+
"sig/prism/pack.rbs",
|
142
|
+
"sig/prism/parse_result.rbs",
|
143
|
+
"sig/prism/pattern.rbs",
|
144
|
+
"sig/prism/reflection.rbs",
|
145
|
+
"sig/prism/relocation.rbs",
|
146
|
+
"sig/prism/serialize.rbs",
|
147
|
+
"sig/prism/string_query.rbs",
|
148
|
+
"sig/prism/visitor.rbs",
|
103
149
|
"src/diagnostic.c",
|
104
150
|
"src/encoding.c",
|
105
151
|
"src/node.c",
|
152
|
+
"src/options.c",
|
106
153
|
"src/pack.c",
|
107
154
|
"src/prettyprint.c",
|
155
|
+
"src/prism.c",
|
108
156
|
"src/regexp.c",
|
109
157
|
"src/serialize.c",
|
158
|
+
"src/static_literals.c",
|
110
159
|
"src/token_type.c",
|
111
160
|
"src/util/pm_buffer.c",
|
112
161
|
"src/util/pm_char.c",
|
113
162
|
"src/util/pm_constant_pool.c",
|
163
|
+
"src/util/pm_integer.c",
|
114
164
|
"src/util/pm_list.c",
|
115
165
|
"src/util/pm_memchr.c",
|
116
166
|
"src/util/pm_newline_list.c",
|
117
|
-
"src/util/pm_state_stack.c",
|
118
167
|
"src/util/pm_string.c",
|
119
|
-
"src/util/pm_string_list.c",
|
120
168
|
"src/util/pm_strncasecmp.c",
|
121
169
|
"src/util/pm_strpbrk.c",
|
122
|
-
"src/options.c",
|
123
|
-
"src/prism.c",
|
124
|
-
"prism.gemspec",
|
125
|
-
"sig/prism.rbs",
|
126
|
-
"sig/prism_static.rbs",
|
127
|
-
"rbi/prism.rbi",
|
128
|
-
"rbi/prism_static.rbi",
|
129
|
-
"lib/prism/version.rb",
|
130
170
|
"jruby-prism.jar"
|
131
171
|
]
|
132
172
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# typed: strict
|
2
|
+
|
3
|
+
class Prism::Compiler
|
4
|
+
sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) }
|
5
|
+
def visit(node); end
|
6
|
+
|
7
|
+
sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) }
|
8
|
+
def visit_all(nodes); end
|
9
|
+
|
10
|
+
sig { params(node: Prism::Node).returns(T::Array[T.untyped]) }
|
11
|
+
def visit_child_nodes(node); end
|
12
|
+
end
|