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
@@ -0,0 +1,169 @@
|
|
1
|
+
# This file is generated by the templates/template.rb script and should not be
|
2
|
+
# modified manually. See templates/sig/prism/visitor.rbs.erb
|
3
|
+
# if you are looking to modify the template
|
4
|
+
|
5
|
+
module Prism
|
6
|
+
class BasicVisitor
|
7
|
+
def visit: (Prism::node?) -> void
|
8
|
+
def visit_all: (Array[Prism::node?]) -> void
|
9
|
+
def visit_child_nodes: (Prism::node) -> void
|
10
|
+
end
|
11
|
+
|
12
|
+
interface _Visitor
|
13
|
+
def visit_alias_global_variable_node: (AliasGlobalVariableNode) -> void
|
14
|
+
def visit_alias_method_node: (AliasMethodNode) -> void
|
15
|
+
def visit_alternation_pattern_node: (AlternationPatternNode) -> void
|
16
|
+
def visit_and_node: (AndNode) -> void
|
17
|
+
def visit_arguments_node: (ArgumentsNode) -> void
|
18
|
+
def visit_array_node: (ArrayNode) -> void
|
19
|
+
def visit_array_pattern_node: (ArrayPatternNode) -> void
|
20
|
+
def visit_assoc_node: (AssocNode) -> void
|
21
|
+
def visit_assoc_splat_node: (AssocSplatNode) -> void
|
22
|
+
def visit_back_reference_read_node: (BackReferenceReadNode) -> void
|
23
|
+
def visit_begin_node: (BeginNode) -> void
|
24
|
+
def visit_block_argument_node: (BlockArgumentNode) -> void
|
25
|
+
def visit_block_local_variable_node: (BlockLocalVariableNode) -> void
|
26
|
+
def visit_block_node: (BlockNode) -> void
|
27
|
+
def visit_block_parameter_node: (BlockParameterNode) -> void
|
28
|
+
def visit_block_parameters_node: (BlockParametersNode) -> void
|
29
|
+
def visit_break_node: (BreakNode) -> void
|
30
|
+
def visit_call_and_write_node: (CallAndWriteNode) -> void
|
31
|
+
def visit_call_node: (CallNode) -> void
|
32
|
+
def visit_call_operator_write_node: (CallOperatorWriteNode) -> void
|
33
|
+
def visit_call_or_write_node: (CallOrWriteNode) -> void
|
34
|
+
def visit_call_target_node: (CallTargetNode) -> void
|
35
|
+
def visit_capture_pattern_node: (CapturePatternNode) -> void
|
36
|
+
def visit_case_match_node: (CaseMatchNode) -> void
|
37
|
+
def visit_case_node: (CaseNode) -> void
|
38
|
+
def visit_class_node: (ClassNode) -> void
|
39
|
+
def visit_class_variable_and_write_node: (ClassVariableAndWriteNode) -> void
|
40
|
+
def visit_class_variable_operator_write_node: (ClassVariableOperatorWriteNode) -> void
|
41
|
+
def visit_class_variable_or_write_node: (ClassVariableOrWriteNode) -> void
|
42
|
+
def visit_class_variable_read_node: (ClassVariableReadNode) -> void
|
43
|
+
def visit_class_variable_target_node: (ClassVariableTargetNode) -> void
|
44
|
+
def visit_class_variable_write_node: (ClassVariableWriteNode) -> void
|
45
|
+
def visit_constant_and_write_node: (ConstantAndWriteNode) -> void
|
46
|
+
def visit_constant_operator_write_node: (ConstantOperatorWriteNode) -> void
|
47
|
+
def visit_constant_or_write_node: (ConstantOrWriteNode) -> void
|
48
|
+
def visit_constant_path_and_write_node: (ConstantPathAndWriteNode) -> void
|
49
|
+
def visit_constant_path_node: (ConstantPathNode) -> void
|
50
|
+
def visit_constant_path_operator_write_node: (ConstantPathOperatorWriteNode) -> void
|
51
|
+
def visit_constant_path_or_write_node: (ConstantPathOrWriteNode) -> void
|
52
|
+
def visit_constant_path_target_node: (ConstantPathTargetNode) -> void
|
53
|
+
def visit_constant_path_write_node: (ConstantPathWriteNode) -> void
|
54
|
+
def visit_constant_read_node: (ConstantReadNode) -> void
|
55
|
+
def visit_constant_target_node: (ConstantTargetNode) -> void
|
56
|
+
def visit_constant_write_node: (ConstantWriteNode) -> void
|
57
|
+
def visit_def_node: (DefNode) -> void
|
58
|
+
def visit_defined_node: (DefinedNode) -> void
|
59
|
+
def visit_else_node: (ElseNode) -> void
|
60
|
+
def visit_embedded_statements_node: (EmbeddedStatementsNode) -> void
|
61
|
+
def visit_embedded_variable_node: (EmbeddedVariableNode) -> void
|
62
|
+
def visit_ensure_node: (EnsureNode) -> void
|
63
|
+
def visit_false_node: (FalseNode) -> void
|
64
|
+
def visit_find_pattern_node: (FindPatternNode) -> void
|
65
|
+
def visit_flip_flop_node: (FlipFlopNode) -> void
|
66
|
+
def visit_float_node: (FloatNode) -> void
|
67
|
+
def visit_for_node: (ForNode) -> void
|
68
|
+
def visit_forwarding_arguments_node: (ForwardingArgumentsNode) -> void
|
69
|
+
def visit_forwarding_parameter_node: (ForwardingParameterNode) -> void
|
70
|
+
def visit_forwarding_super_node: (ForwardingSuperNode) -> void
|
71
|
+
def visit_global_variable_and_write_node: (GlobalVariableAndWriteNode) -> void
|
72
|
+
def visit_global_variable_operator_write_node: (GlobalVariableOperatorWriteNode) -> void
|
73
|
+
def visit_global_variable_or_write_node: (GlobalVariableOrWriteNode) -> void
|
74
|
+
def visit_global_variable_read_node: (GlobalVariableReadNode) -> void
|
75
|
+
def visit_global_variable_target_node: (GlobalVariableTargetNode) -> void
|
76
|
+
def visit_global_variable_write_node: (GlobalVariableWriteNode) -> void
|
77
|
+
def visit_hash_node: (HashNode) -> void
|
78
|
+
def visit_hash_pattern_node: (HashPatternNode) -> void
|
79
|
+
def visit_if_node: (IfNode) -> void
|
80
|
+
def visit_imaginary_node: (ImaginaryNode) -> void
|
81
|
+
def visit_implicit_node: (ImplicitNode) -> void
|
82
|
+
def visit_implicit_rest_node: (ImplicitRestNode) -> void
|
83
|
+
def visit_in_node: (InNode) -> void
|
84
|
+
def visit_index_and_write_node: (IndexAndWriteNode) -> void
|
85
|
+
def visit_index_operator_write_node: (IndexOperatorWriteNode) -> void
|
86
|
+
def visit_index_or_write_node: (IndexOrWriteNode) -> void
|
87
|
+
def visit_index_target_node: (IndexTargetNode) -> void
|
88
|
+
def visit_instance_variable_and_write_node: (InstanceVariableAndWriteNode) -> void
|
89
|
+
def visit_instance_variable_operator_write_node: (InstanceVariableOperatorWriteNode) -> void
|
90
|
+
def visit_instance_variable_or_write_node: (InstanceVariableOrWriteNode) -> void
|
91
|
+
def visit_instance_variable_read_node: (InstanceVariableReadNode) -> void
|
92
|
+
def visit_instance_variable_target_node: (InstanceVariableTargetNode) -> void
|
93
|
+
def visit_instance_variable_write_node: (InstanceVariableWriteNode) -> void
|
94
|
+
def visit_integer_node: (IntegerNode) -> void
|
95
|
+
def visit_interpolated_match_last_line_node: (InterpolatedMatchLastLineNode) -> void
|
96
|
+
def visit_interpolated_regular_expression_node: (InterpolatedRegularExpressionNode) -> void
|
97
|
+
def visit_interpolated_string_node: (InterpolatedStringNode) -> void
|
98
|
+
def visit_interpolated_symbol_node: (InterpolatedSymbolNode) -> void
|
99
|
+
def visit_interpolated_x_string_node: (InterpolatedXStringNode) -> void
|
100
|
+
def visit_it_local_variable_read_node: (ItLocalVariableReadNode) -> void
|
101
|
+
def visit_it_parameters_node: (ItParametersNode) -> void
|
102
|
+
def visit_keyword_hash_node: (KeywordHashNode) -> void
|
103
|
+
def visit_keyword_rest_parameter_node: (KeywordRestParameterNode) -> void
|
104
|
+
def visit_lambda_node: (LambdaNode) -> void
|
105
|
+
def visit_local_variable_and_write_node: (LocalVariableAndWriteNode) -> void
|
106
|
+
def visit_local_variable_operator_write_node: (LocalVariableOperatorWriteNode) -> void
|
107
|
+
def visit_local_variable_or_write_node: (LocalVariableOrWriteNode) -> void
|
108
|
+
def visit_local_variable_read_node: (LocalVariableReadNode) -> void
|
109
|
+
def visit_local_variable_target_node: (LocalVariableTargetNode) -> void
|
110
|
+
def visit_local_variable_write_node: (LocalVariableWriteNode) -> void
|
111
|
+
def visit_match_last_line_node: (MatchLastLineNode) -> void
|
112
|
+
def visit_match_predicate_node: (MatchPredicateNode) -> void
|
113
|
+
def visit_match_required_node: (MatchRequiredNode) -> void
|
114
|
+
def visit_match_write_node: (MatchWriteNode) -> void
|
115
|
+
def visit_missing_node: (MissingNode) -> void
|
116
|
+
def visit_module_node: (ModuleNode) -> void
|
117
|
+
def visit_multi_target_node: (MultiTargetNode) -> void
|
118
|
+
def visit_multi_write_node: (MultiWriteNode) -> void
|
119
|
+
def visit_next_node: (NextNode) -> void
|
120
|
+
def visit_nil_node: (NilNode) -> void
|
121
|
+
def visit_no_keywords_parameter_node: (NoKeywordsParameterNode) -> void
|
122
|
+
def visit_numbered_parameters_node: (NumberedParametersNode) -> void
|
123
|
+
def visit_numbered_reference_read_node: (NumberedReferenceReadNode) -> void
|
124
|
+
def visit_optional_keyword_parameter_node: (OptionalKeywordParameterNode) -> void
|
125
|
+
def visit_optional_parameter_node: (OptionalParameterNode) -> void
|
126
|
+
def visit_or_node: (OrNode) -> void
|
127
|
+
def visit_parameters_node: (ParametersNode) -> void
|
128
|
+
def visit_parentheses_node: (ParenthesesNode) -> void
|
129
|
+
def visit_pinned_expression_node: (PinnedExpressionNode) -> void
|
130
|
+
def visit_pinned_variable_node: (PinnedVariableNode) -> void
|
131
|
+
def visit_post_execution_node: (PostExecutionNode) -> void
|
132
|
+
def visit_pre_execution_node: (PreExecutionNode) -> void
|
133
|
+
def visit_program_node: (ProgramNode) -> void
|
134
|
+
def visit_range_node: (RangeNode) -> void
|
135
|
+
def visit_rational_node: (RationalNode) -> void
|
136
|
+
def visit_redo_node: (RedoNode) -> void
|
137
|
+
def visit_regular_expression_node: (RegularExpressionNode) -> void
|
138
|
+
def visit_required_keyword_parameter_node: (RequiredKeywordParameterNode) -> void
|
139
|
+
def visit_required_parameter_node: (RequiredParameterNode) -> void
|
140
|
+
def visit_rescue_modifier_node: (RescueModifierNode) -> void
|
141
|
+
def visit_rescue_node: (RescueNode) -> void
|
142
|
+
def visit_rest_parameter_node: (RestParameterNode) -> void
|
143
|
+
def visit_retry_node: (RetryNode) -> void
|
144
|
+
def visit_return_node: (ReturnNode) -> void
|
145
|
+
def visit_self_node: (SelfNode) -> void
|
146
|
+
def visit_shareable_constant_node: (ShareableConstantNode) -> void
|
147
|
+
def visit_singleton_class_node: (SingletonClassNode) -> void
|
148
|
+
def visit_source_encoding_node: (SourceEncodingNode) -> void
|
149
|
+
def visit_source_file_node: (SourceFileNode) -> void
|
150
|
+
def visit_source_line_node: (SourceLineNode) -> void
|
151
|
+
def visit_splat_node: (SplatNode) -> void
|
152
|
+
def visit_statements_node: (StatementsNode) -> void
|
153
|
+
def visit_string_node: (StringNode) -> void
|
154
|
+
def visit_super_node: (SuperNode) -> void
|
155
|
+
def visit_symbol_node: (SymbolNode) -> void
|
156
|
+
def visit_true_node: (TrueNode) -> void
|
157
|
+
def visit_undef_node: (UndefNode) -> void
|
158
|
+
def visit_unless_node: (UnlessNode) -> void
|
159
|
+
def visit_until_node: (UntilNode) -> void
|
160
|
+
def visit_when_node: (WhenNode) -> void
|
161
|
+
def visit_while_node: (WhileNode) -> void
|
162
|
+
def visit_x_string_node: (XStringNode) -> void
|
163
|
+
def visit_yield_node: (YieldNode) -> void
|
164
|
+
end
|
165
|
+
|
166
|
+
class Visitor < BasicVisitor
|
167
|
+
include _Visitor
|
168
|
+
end
|
169
|
+
end
|