prism 1.4.0 → 1.7.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 +73 -1
- data/Makefile +7 -5
- data/README.md +3 -1
- data/config.yml +294 -41
- data/docs/build_system.md +2 -2
- data/docs/cruby_compilation.md +1 -1
- data/docs/design.md +2 -2
- data/docs/parser_translation.md +8 -23
- data/docs/releasing.md +6 -25
- data/docs/ripper_translation.md +1 -1
- data/ext/prism/api_node.c +9 -3
- data/ext/prism/extconf.rb +1 -1
- data/ext/prism/extension.c +24 -3
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +360 -70
- data/include/prism/diagnostic.h +7 -0
- data/include/prism/options.h +49 -3
- data/include/prism/parser.h +3 -0
- data/include/prism/regexp.h +2 -2
- data/include/prism/util/pm_buffer.h +8 -0
- data/include/prism/util/pm_integer.h +4 -0
- data/include/prism/util/pm_list.h +6 -0
- data/include/prism/util/pm_string.h +12 -2
- data/include/prism/version.h +2 -2
- data/include/prism.h +40 -15
- data/lib/prism/compiler.rb +456 -151
- data/lib/prism/desugar_compiler.rb +1 -0
- data/lib/prism/dispatcher.rb +16 -0
- data/lib/prism/dot_visitor.rb +10 -1
- data/lib/prism/dsl.rb +5 -2
- data/lib/prism/ffi.rb +28 -10
- data/lib/prism/inspect_visitor.rb +4 -0
- data/lib/prism/lex_compat.rb +1 -0
- data/lib/prism/mutation_compiler.rb +3 -0
- data/lib/prism/node.rb +559 -349
- data/lib/prism/node_ext.rb +4 -1
- data/lib/prism/pack.rb +2 -0
- data/lib/prism/parse_result/comments.rb +1 -0
- data/lib/prism/parse_result/errors.rb +1 -0
- data/lib/prism/parse_result/newlines.rb +1 -0
- data/lib/prism/parse_result.rb +3 -15
- data/lib/prism/pattern.rb +1 -0
- data/lib/prism/polyfill/scan_byte.rb +14 -0
- data/lib/prism/polyfill/warn.rb +36 -0
- data/lib/prism/reflection.rb +4 -1
- data/lib/prism/relocation.rb +1 -0
- data/lib/prism/serialize.rb +30 -22
- data/lib/prism/string_query.rb +1 -0
- data/lib/prism/translation/parser/builder.rb +1 -0
- data/lib/prism/translation/parser/compiler.rb +63 -41
- data/lib/prism/translation/parser/lexer.rb +29 -21
- data/lib/prism/translation/parser.rb +25 -4
- data/lib/prism/translation/parser33.rb +1 -0
- data/lib/prism/translation/parser34.rb +1 -0
- data/lib/prism/translation/parser35.rb +2 -6
- data/lib/prism/translation/parser40.rb +13 -0
- data/lib/prism/translation/parser41.rb +13 -0
- data/lib/prism/translation/parser_current.rb +26 -0
- data/lib/prism/translation/ripper/sexp.rb +1 -0
- data/lib/prism/translation/ripper.rb +19 -3
- data/lib/prism/translation/ruby_parser.rb +340 -22
- data/lib/prism/translation.rb +4 -0
- data/lib/prism/visitor.rb +457 -152
- data/lib/prism.rb +22 -0
- data/prism.gemspec +9 -1
- data/rbi/prism/dsl.rbi +6 -6
- data/rbi/prism/node.rbi +42 -17
- data/rbi/prism/translation/parser35.rbi +0 -2
- data/rbi/prism/translation/parser40.rbi +6 -0
- data/rbi/prism/translation/parser41.rbi +6 -0
- data/sig/prism/dispatcher.rbs +3 -0
- data/sig/prism/dsl.rbs +5 -5
- data/sig/prism/node.rbs +462 -38
- data/sig/prism/node_ext.rbs +84 -17
- data/sig/prism/parse_result/comments.rbs +38 -0
- data/sig/prism/parse_result.rbs +4 -0
- data/sig/prism/reflection.rbs +1 -1
- data/sig/prism.rbs +4 -0
- data/src/diagnostic.c +13 -1
- data/src/encoding.c +172 -67
- data/src/node.c +11 -0
- data/src/options.c +17 -7
- data/src/prettyprint.c +18 -0
- data/src/prism.c +1495 -2021
- data/src/serialize.c +9 -1
- data/src/token_type.c +38 -36
- data/src/util/pm_constant_pool.c +1 -1
- data/src/util/pm_string.c +6 -8
- metadata +11 -3
data/include/prism/ast.h
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* :markup: markdown */
|
|
2
|
+
|
|
1
3
|
/*----------------------------------------------------------------------------*/
|
|
2
4
|
/* This file is generated by the templates/template.rb script and should not */
|
|
3
5
|
/* be modified manually. See */
|
|
@@ -10,6 +12,8 @@
|
|
|
10
12
|
* @file ast.h
|
|
11
13
|
*
|
|
12
14
|
* The abstract syntax tree.
|
|
15
|
+
*
|
|
16
|
+
* --
|
|
13
17
|
*/
|
|
14
18
|
#ifndef PRISM_AST_H
|
|
15
19
|
#define PRISM_AST_H
|
|
@@ -30,11 +34,53 @@ typedef enum pm_token_type {
|
|
|
30
34
|
/** final token in the file */
|
|
31
35
|
PM_TOKEN_EOF = 1,
|
|
32
36
|
|
|
33
|
-
/**
|
|
34
|
-
|
|
37
|
+
/** } */
|
|
38
|
+
PM_TOKEN_BRACE_RIGHT,
|
|
35
39
|
|
|
36
|
-
/**
|
|
37
|
-
|
|
40
|
+
/** , */
|
|
41
|
+
PM_TOKEN_COMMA,
|
|
42
|
+
|
|
43
|
+
/** } */
|
|
44
|
+
PM_TOKEN_EMBEXPR_END,
|
|
45
|
+
|
|
46
|
+
/** do */
|
|
47
|
+
PM_TOKEN_KEYWORD_DO,
|
|
48
|
+
|
|
49
|
+
/** else */
|
|
50
|
+
PM_TOKEN_KEYWORD_ELSE,
|
|
51
|
+
|
|
52
|
+
/** elsif */
|
|
53
|
+
PM_TOKEN_KEYWORD_ELSIF,
|
|
54
|
+
|
|
55
|
+
/** end */
|
|
56
|
+
PM_TOKEN_KEYWORD_END,
|
|
57
|
+
|
|
58
|
+
/** ensure */
|
|
59
|
+
PM_TOKEN_KEYWORD_ENSURE,
|
|
60
|
+
|
|
61
|
+
/** in */
|
|
62
|
+
PM_TOKEN_KEYWORD_IN,
|
|
63
|
+
|
|
64
|
+
/** rescue */
|
|
65
|
+
PM_TOKEN_KEYWORD_RESCUE,
|
|
66
|
+
|
|
67
|
+
/** then */
|
|
68
|
+
PM_TOKEN_KEYWORD_THEN,
|
|
69
|
+
|
|
70
|
+
/** when */
|
|
71
|
+
PM_TOKEN_KEYWORD_WHEN,
|
|
72
|
+
|
|
73
|
+
/** a newline character outside of other tokens */
|
|
74
|
+
PM_TOKEN_NEWLINE,
|
|
75
|
+
|
|
76
|
+
/** ) */
|
|
77
|
+
PM_TOKEN_PARENTHESIS_RIGHT,
|
|
78
|
+
|
|
79
|
+
/** | */
|
|
80
|
+
PM_TOKEN_PIPE,
|
|
81
|
+
|
|
82
|
+
/** ; */
|
|
83
|
+
PM_TOKEN_SEMICOLON,
|
|
38
84
|
|
|
39
85
|
/** & */
|
|
40
86
|
PM_TOKEN_AMPERSAND,
|
|
@@ -69,9 +115,6 @@ typedef enum pm_token_type {
|
|
|
69
115
|
/** { */
|
|
70
116
|
PM_TOKEN_BRACE_LEFT,
|
|
71
117
|
|
|
72
|
-
/** } */
|
|
73
|
-
PM_TOKEN_BRACE_RIGHT,
|
|
74
|
-
|
|
75
118
|
/** [ */
|
|
76
119
|
PM_TOKEN_BRACKET_LEFT,
|
|
77
120
|
|
|
@@ -105,9 +148,6 @@ typedef enum pm_token_type {
|
|
|
105
148
|
/** :: */
|
|
106
149
|
PM_TOKEN_COLON_COLON,
|
|
107
150
|
|
|
108
|
-
/** , */
|
|
109
|
-
PM_TOKEN_COMMA,
|
|
110
|
-
|
|
111
151
|
/** a comment */
|
|
112
152
|
PM_TOKEN_COMMENT,
|
|
113
153
|
|
|
@@ -135,9 +175,6 @@ typedef enum pm_token_type {
|
|
|
135
175
|
/** #{ */
|
|
136
176
|
PM_TOKEN_EMBEXPR_BEGIN,
|
|
137
177
|
|
|
138
|
-
/** } */
|
|
139
|
-
PM_TOKEN_EMBEXPR_END,
|
|
140
|
-
|
|
141
178
|
/** # */
|
|
142
179
|
PM_TOKEN_EMBVAR,
|
|
143
180
|
|
|
@@ -237,27 +274,12 @@ typedef enum pm_token_type {
|
|
|
237
274
|
/** defined? */
|
|
238
275
|
PM_TOKEN_KEYWORD_DEFINED,
|
|
239
276
|
|
|
240
|
-
/** do */
|
|
241
|
-
PM_TOKEN_KEYWORD_DO,
|
|
242
|
-
|
|
243
277
|
/** do keyword for a predicate in a while, until, or for loop */
|
|
244
278
|
PM_TOKEN_KEYWORD_DO_LOOP,
|
|
245
279
|
|
|
246
|
-
/** else */
|
|
247
|
-
PM_TOKEN_KEYWORD_ELSE,
|
|
248
|
-
|
|
249
|
-
/** elsif */
|
|
250
|
-
PM_TOKEN_KEYWORD_ELSIF,
|
|
251
|
-
|
|
252
|
-
/** end */
|
|
253
|
-
PM_TOKEN_KEYWORD_END,
|
|
254
|
-
|
|
255
280
|
/** END */
|
|
256
281
|
PM_TOKEN_KEYWORD_END_UPCASE,
|
|
257
282
|
|
|
258
|
-
/** ensure */
|
|
259
|
-
PM_TOKEN_KEYWORD_ENSURE,
|
|
260
|
-
|
|
261
283
|
/** false */
|
|
262
284
|
PM_TOKEN_KEYWORD_FALSE,
|
|
263
285
|
|
|
@@ -270,9 +292,6 @@ typedef enum pm_token_type {
|
|
|
270
292
|
/** if in the modifier form */
|
|
271
293
|
PM_TOKEN_KEYWORD_IF_MODIFIER,
|
|
272
294
|
|
|
273
|
-
/** in */
|
|
274
|
-
PM_TOKEN_KEYWORD_IN,
|
|
275
|
-
|
|
276
295
|
/** module */
|
|
277
296
|
PM_TOKEN_KEYWORD_MODULE,
|
|
278
297
|
|
|
@@ -291,9 +310,6 @@ typedef enum pm_token_type {
|
|
|
291
310
|
/** redo */
|
|
292
311
|
PM_TOKEN_KEYWORD_REDO,
|
|
293
312
|
|
|
294
|
-
/** rescue */
|
|
295
|
-
PM_TOKEN_KEYWORD_RESCUE,
|
|
296
|
-
|
|
297
313
|
/** rescue in the modifier form */
|
|
298
314
|
PM_TOKEN_KEYWORD_RESCUE_MODIFIER,
|
|
299
315
|
|
|
@@ -309,9 +325,6 @@ typedef enum pm_token_type {
|
|
|
309
325
|
/** super */
|
|
310
326
|
PM_TOKEN_KEYWORD_SUPER,
|
|
311
327
|
|
|
312
|
-
/** then */
|
|
313
|
-
PM_TOKEN_KEYWORD_THEN,
|
|
314
|
-
|
|
315
328
|
/** true */
|
|
316
329
|
PM_TOKEN_KEYWORD_TRUE,
|
|
317
330
|
|
|
@@ -330,9 +343,6 @@ typedef enum pm_token_type {
|
|
|
330
343
|
/** until in the modifier form */
|
|
331
344
|
PM_TOKEN_KEYWORD_UNTIL_MODIFIER,
|
|
332
345
|
|
|
333
|
-
/** when */
|
|
334
|
-
PM_TOKEN_KEYWORD_WHEN,
|
|
335
|
-
|
|
336
346
|
/** while */
|
|
337
347
|
PM_TOKEN_KEYWORD_WHILE,
|
|
338
348
|
|
|
@@ -387,9 +397,6 @@ typedef enum pm_token_type {
|
|
|
387
397
|
/** -> */
|
|
388
398
|
PM_TOKEN_MINUS_GREATER,
|
|
389
399
|
|
|
390
|
-
/** a newline character outside of other tokens */
|
|
391
|
-
PM_TOKEN_NEWLINE,
|
|
392
|
-
|
|
393
400
|
/** a numbered reference to a capture group in the previous regular expression match */
|
|
394
401
|
PM_TOKEN_NUMBERED_REFERENCE,
|
|
395
402
|
|
|
@@ -399,9 +406,6 @@ typedef enum pm_token_type {
|
|
|
399
406
|
/** ( for a parentheses node */
|
|
400
407
|
PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES,
|
|
401
408
|
|
|
402
|
-
/** ) */
|
|
403
|
-
PM_TOKEN_PARENTHESIS_RIGHT,
|
|
404
|
-
|
|
405
409
|
/** % */
|
|
406
410
|
PM_TOKEN_PERCENT,
|
|
407
411
|
|
|
@@ -423,9 +427,6 @@ typedef enum pm_token_type {
|
|
|
423
427
|
/** %W */
|
|
424
428
|
PM_TOKEN_PERCENT_UPPER_W,
|
|
425
429
|
|
|
426
|
-
/** | */
|
|
427
|
-
PM_TOKEN_PIPE,
|
|
428
|
-
|
|
429
430
|
/** |= */
|
|
430
431
|
PM_TOKEN_PIPE_EQUAL,
|
|
431
432
|
|
|
@@ -450,9 +451,6 @@ typedef enum pm_token_type {
|
|
|
450
451
|
/** the end of a regular expression */
|
|
451
452
|
PM_TOKEN_REGEXP_END,
|
|
452
453
|
|
|
453
|
-
/** ; */
|
|
454
|
-
PM_TOKEN_SEMICOLON,
|
|
455
|
-
|
|
456
454
|
/** / */
|
|
457
455
|
PM_TOKEN_SLASH,
|
|
458
456
|
|
|
@@ -519,6 +517,12 @@ typedef enum pm_token_type {
|
|
|
519
517
|
/** marker for the point in the file at which the parser should stop */
|
|
520
518
|
PM_TOKEN___END__,
|
|
521
519
|
|
|
520
|
+
/** a token that was expected but not found */
|
|
521
|
+
PM_TOKEN_MISSING,
|
|
522
|
+
|
|
523
|
+
/** a token that was not present but it is okay */
|
|
524
|
+
PM_TOKEN_NOT_PROVIDED,
|
|
525
|
+
|
|
522
526
|
/** The maximum token value. */
|
|
523
527
|
PM_TOKEN_MAXIMUM,
|
|
524
528
|
} pm_token_type_t;
|
|
@@ -1046,22 +1050,6 @@ typedef uint16_t pm_node_flags_t;
|
|
|
1046
1050
|
static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = 0x1;
|
|
1047
1051
|
static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = 0x2;
|
|
1048
1052
|
|
|
1049
|
-
/**
|
|
1050
|
-
* Cast the type to an enum to allow the compiler to provide exhaustiveness
|
|
1051
|
-
* checking.
|
|
1052
|
-
*/
|
|
1053
|
-
#define PM_NODE_TYPE(node) ((enum pm_node_type) (node)->type)
|
|
1054
|
-
|
|
1055
|
-
/**
|
|
1056
|
-
* Return true if the type of the given node matches the given type.
|
|
1057
|
-
*/
|
|
1058
|
-
#define PM_NODE_TYPE_P(node, type) (PM_NODE_TYPE(node) == (type))
|
|
1059
|
-
|
|
1060
|
-
/**
|
|
1061
|
-
* Return true if the given flag is set on the given node.
|
|
1062
|
-
*/
|
|
1063
|
-
#define PM_NODE_FLAG_P(node, flag) ((((pm_node_t *)(node))->flags & (flag)) != 0)
|
|
1064
|
-
|
|
1065
1053
|
/**
|
|
1066
1054
|
* This is the base structure that represents a node in the syntax tree. It is
|
|
1067
1055
|
* embedded into every node type.
|
|
@@ -1092,6 +1080,32 @@ typedef struct pm_node {
|
|
|
1092
1080
|
pm_location_t location;
|
|
1093
1081
|
} pm_node_t;
|
|
1094
1082
|
|
|
1083
|
+
/**
|
|
1084
|
+
* Cast the given node to the base pm_node_t type.
|
|
1085
|
+
*/
|
|
1086
|
+
#define PM_NODE_UPCAST(node_) ((pm_node_t *) (node_))
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Cast the type to an enum to allow the compiler to provide exhaustiveness
|
|
1090
|
+
* checking.
|
|
1091
|
+
*/
|
|
1092
|
+
#define PM_NODE_TYPE(node_) ((enum pm_node_type) (node_)->type)
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Return true if the type of the given node matches the given type.
|
|
1096
|
+
*/
|
|
1097
|
+
#define PM_NODE_TYPE_P(node_, type_) (PM_NODE_TYPE(node_) == (type_))
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Return the flags associated with the given node.
|
|
1101
|
+
*/
|
|
1102
|
+
#define PM_NODE_FLAGS(node_) (PM_NODE_UPCAST(node_)->flags)
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Return true if the given flag is set on the given node.
|
|
1106
|
+
*/
|
|
1107
|
+
#define PM_NODE_FLAG_P(node_, flag_) ((PM_NODE_FLAGS(node_) & (flag_)) != 0)
|
|
1108
|
+
|
|
1095
1109
|
/**
|
|
1096
1110
|
* AliasGlobalVariableNode
|
|
1097
1111
|
*
|
|
@@ -1420,6 +1434,17 @@ typedef struct pm_array_pattern_node {
|
|
|
1420
1434
|
|
|
1421
1435
|
/**
|
|
1422
1436
|
* ArrayPatternNode#constant
|
|
1437
|
+
*
|
|
1438
|
+
* Represents the optional constant preceding the Array
|
|
1439
|
+
*
|
|
1440
|
+
* foo in Bar[]
|
|
1441
|
+
* ^^^
|
|
1442
|
+
*
|
|
1443
|
+
* foo in Bar[1, 2, 3]
|
|
1444
|
+
* ^^^
|
|
1445
|
+
*
|
|
1446
|
+
* foo in Bar::Baz[1, 2, 3]
|
|
1447
|
+
* ^^^^^^^^
|
|
1423
1448
|
*/
|
|
1424
1449
|
struct pm_node *constant;
|
|
1425
1450
|
|
|
@@ -2199,6 +2224,19 @@ typedef struct pm_call_node {
|
|
|
2199
2224
|
*/
|
|
2200
2225
|
pm_location_t closing_loc;
|
|
2201
2226
|
|
|
2227
|
+
/**
|
|
2228
|
+
* CallNode#equal_loc
|
|
2229
|
+
*
|
|
2230
|
+
* Represents the location of the equal sign, in the case that this is an attribute write.
|
|
2231
|
+
*
|
|
2232
|
+
* foo.bar = value
|
|
2233
|
+
* ^
|
|
2234
|
+
*
|
|
2235
|
+
* foo[bar] = value
|
|
2236
|
+
* ^
|
|
2237
|
+
*/
|
|
2238
|
+
pm_location_t equal_loc;
|
|
2239
|
+
|
|
2202
2240
|
/**
|
|
2203
2241
|
* CallNode#block
|
|
2204
2242
|
*
|
|
@@ -2623,7 +2661,7 @@ typedef struct pm_case_node {
|
|
|
2623
2661
|
* Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
|
|
2624
2662
|
*
|
|
2625
2663
|
* case true; when false; end
|
|
2626
|
-
*
|
|
2664
|
+
* ^^^^
|
|
2627
2665
|
*/
|
|
2628
2666
|
struct pm_node *predicate;
|
|
2629
2667
|
|
|
@@ -2692,6 +2730,11 @@ typedef struct pm_class_node {
|
|
|
2692
2730
|
|
|
2693
2731
|
/**
|
|
2694
2732
|
* ClassNode#class_keyword_loc
|
|
2733
|
+
*
|
|
2734
|
+
* Represents the location of the `class` keyword.
|
|
2735
|
+
*
|
|
2736
|
+
* class Foo end
|
|
2737
|
+
* ^^^^^
|
|
2695
2738
|
*/
|
|
2696
2739
|
pm_location_t class_keyword_loc;
|
|
2697
2740
|
|
|
@@ -2702,26 +2745,51 @@ typedef struct pm_class_node {
|
|
|
2702
2745
|
|
|
2703
2746
|
/**
|
|
2704
2747
|
* ClassNode#inheritance_operator_loc
|
|
2748
|
+
*
|
|
2749
|
+
* Represents the location of the `<` operator.
|
|
2750
|
+
*
|
|
2751
|
+
* class Foo < Bar
|
|
2752
|
+
* ^
|
|
2705
2753
|
*/
|
|
2706
2754
|
pm_location_t inheritance_operator_loc;
|
|
2707
2755
|
|
|
2708
2756
|
/**
|
|
2709
2757
|
* ClassNode#superclass
|
|
2758
|
+
*
|
|
2759
|
+
* Represents the superclass of the class.
|
|
2760
|
+
*
|
|
2761
|
+
* class Foo < Bar
|
|
2762
|
+
* ^^^
|
|
2710
2763
|
*/
|
|
2711
2764
|
struct pm_node *superclass;
|
|
2712
2765
|
|
|
2713
2766
|
/**
|
|
2714
2767
|
* ClassNode#body
|
|
2768
|
+
*
|
|
2769
|
+
* Represents the body of the class.
|
|
2770
|
+
*
|
|
2771
|
+
* class Foo
|
|
2772
|
+
* foo
|
|
2773
|
+
* ^^^
|
|
2715
2774
|
*/
|
|
2716
2775
|
struct pm_node *body;
|
|
2717
2776
|
|
|
2718
2777
|
/**
|
|
2719
2778
|
* ClassNode#end_keyword_loc
|
|
2779
|
+
*
|
|
2780
|
+
* Represents the location of the `end` keyword.
|
|
2781
|
+
*
|
|
2782
|
+
* class Foo end
|
|
2783
|
+
* ^^^
|
|
2720
2784
|
*/
|
|
2721
2785
|
pm_location_t end_keyword_loc;
|
|
2722
2786
|
|
|
2723
2787
|
/**
|
|
2724
2788
|
* ClassNode#name
|
|
2789
|
+
*
|
|
2790
|
+
* The name of the class.
|
|
2791
|
+
*
|
|
2792
|
+
* class Foo end # name `:Foo`
|
|
2725
2793
|
*/
|
|
2726
2794
|
pm_constant_id_t name;
|
|
2727
2795
|
} pm_class_node_t;
|
|
@@ -3758,6 +3826,9 @@ typedef struct pm_false_node {
|
|
|
3758
3826
|
* foo in Foo(*bar, baz, *qux)
|
|
3759
3827
|
* ^^^^^^^^^^^^^^^^^^^^
|
|
3760
3828
|
*
|
|
3829
|
+
* foo => *bar, baz, *qux
|
|
3830
|
+
* ^^^^^^^^^^^^^^^
|
|
3831
|
+
*
|
|
3761
3832
|
* Type: ::PM_FIND_PATTERN_NODE
|
|
3762
3833
|
*
|
|
3763
3834
|
* @extends pm_node_t
|
|
@@ -3769,31 +3840,76 @@ typedef struct pm_find_pattern_node {
|
|
|
3769
3840
|
|
|
3770
3841
|
/**
|
|
3771
3842
|
* FindPatternNode#constant
|
|
3843
|
+
*
|
|
3844
|
+
* Represents the optional constant preceding the pattern
|
|
3845
|
+
*
|
|
3846
|
+
* foo in Foo(*bar, baz, *qux)
|
|
3847
|
+
* ^^^
|
|
3772
3848
|
*/
|
|
3773
3849
|
struct pm_node *constant;
|
|
3774
3850
|
|
|
3775
3851
|
/**
|
|
3776
3852
|
* FindPatternNode#left
|
|
3853
|
+
*
|
|
3854
|
+
* Represents the first wildcard node in the pattern.
|
|
3855
|
+
*
|
|
3856
|
+
* foo in *bar, baz, *qux
|
|
3857
|
+
* ^^^^
|
|
3858
|
+
*
|
|
3859
|
+
* foo in Foo(*bar, baz, *qux)
|
|
3860
|
+
* ^^^^
|
|
3777
3861
|
*/
|
|
3778
3862
|
struct pm_splat_node *left;
|
|
3779
3863
|
|
|
3780
3864
|
/**
|
|
3781
3865
|
* FindPatternNode#requireds
|
|
3866
|
+
*
|
|
3867
|
+
* Represents the nodes in between the wildcards.
|
|
3868
|
+
*
|
|
3869
|
+
* foo in *bar, baz, *qux
|
|
3870
|
+
* ^^^
|
|
3871
|
+
*
|
|
3872
|
+
* foo in Foo(*bar, baz, 1, *qux)
|
|
3873
|
+
* ^^^^^^
|
|
3782
3874
|
*/
|
|
3783
3875
|
struct pm_node_list requireds;
|
|
3784
3876
|
|
|
3785
3877
|
/**
|
|
3786
3878
|
* FindPatternNode#right
|
|
3879
|
+
*
|
|
3880
|
+
* Represents the second wildcard node in the pattern.
|
|
3881
|
+
*
|
|
3882
|
+
* foo in *bar, baz, *qux
|
|
3883
|
+
* ^^^^
|
|
3884
|
+
*
|
|
3885
|
+
* foo in Foo(*bar, baz, *qux)
|
|
3886
|
+
* ^^^^
|
|
3787
3887
|
*/
|
|
3788
3888
|
struct pm_node *right;
|
|
3789
3889
|
|
|
3790
3890
|
/**
|
|
3791
3891
|
* FindPatternNode#opening_loc
|
|
3892
|
+
*
|
|
3893
|
+
* The location of the opening brace.
|
|
3894
|
+
*
|
|
3895
|
+
* foo in [*bar, baz, *qux]
|
|
3896
|
+
* ^
|
|
3897
|
+
*
|
|
3898
|
+
* foo in Foo(*bar, baz, *qux)
|
|
3899
|
+
* ^
|
|
3792
3900
|
*/
|
|
3793
3901
|
pm_location_t opening_loc;
|
|
3794
3902
|
|
|
3795
3903
|
/**
|
|
3796
3904
|
* FindPatternNode#closing_loc
|
|
3905
|
+
*
|
|
3906
|
+
* The location of the closing brace.
|
|
3907
|
+
*
|
|
3908
|
+
* foo in [*bar, baz, *qux]
|
|
3909
|
+
* ^
|
|
3910
|
+
*
|
|
3911
|
+
* foo in Foo(*bar, baz, *qux)
|
|
3912
|
+
* ^
|
|
3797
3913
|
*/
|
|
3798
3914
|
pm_location_t closing_loc;
|
|
3799
3915
|
} pm_find_pattern_node_t;
|
|
@@ -3991,11 +4107,16 @@ typedef struct pm_forwarding_parameter_node {
|
|
|
3991
4107
|
/**
|
|
3992
4108
|
* ForwardingSuperNode
|
|
3993
4109
|
*
|
|
3994
|
-
* Represents the use of the `super` keyword without parentheses or arguments.
|
|
4110
|
+
* Represents the use of the `super` keyword without parentheses or arguments, but which might have a block.
|
|
3995
4111
|
*
|
|
3996
4112
|
* super
|
|
3997
4113
|
* ^^^^^
|
|
3998
4114
|
*
|
|
4115
|
+
* super { 123 }
|
|
4116
|
+
* ^^^^^^^^^^^^^
|
|
4117
|
+
*
|
|
4118
|
+
* If it has any other arguments, it would be a `SuperNode` instead.
|
|
4119
|
+
*
|
|
3999
4120
|
* Type: ::PM_FORWARDING_SUPER_NODE
|
|
4000
4121
|
*
|
|
4001
4122
|
* @extends pm_node_t
|
|
@@ -4007,6 +4128,8 @@ typedef struct pm_forwarding_super_node {
|
|
|
4007
4128
|
|
|
4008
4129
|
/**
|
|
4009
4130
|
* ForwardingSuperNode#block
|
|
4131
|
+
*
|
|
4132
|
+
* All other arguments are forwarded as normal, except the original block is replaced with the new block.
|
|
4010
4133
|
*/
|
|
4011
4134
|
struct pm_block_node *block;
|
|
4012
4135
|
} pm_forwarding_super_node_t;
|
|
@@ -4306,6 +4429,12 @@ typedef struct pm_hash_node {
|
|
|
4306
4429
|
* foo => { a: 1, b: 2, **c }
|
|
4307
4430
|
* ^^^^^^^^^^^^^^^^^^^
|
|
4308
4431
|
*
|
|
4432
|
+
* foo => Bar[a: 1, b: 2]
|
|
4433
|
+
* ^^^^^^^^^^^^^^^
|
|
4434
|
+
*
|
|
4435
|
+
* foo in { a: 1, b: 2 }
|
|
4436
|
+
* ^^^^^^^^^^^^^^
|
|
4437
|
+
*
|
|
4309
4438
|
* Type: ::PM_HASH_PATTERN_NODE
|
|
4310
4439
|
*
|
|
4311
4440
|
* @extends pm_node_t
|
|
@@ -4317,26 +4446,66 @@ typedef struct pm_hash_pattern_node {
|
|
|
4317
4446
|
|
|
4318
4447
|
/**
|
|
4319
4448
|
* HashPatternNode#constant
|
|
4449
|
+
*
|
|
4450
|
+
* Represents the optional constant preceding the Hash.
|
|
4451
|
+
*
|
|
4452
|
+
* foo => Bar[a: 1, b: 2]
|
|
4453
|
+
* ^^^
|
|
4454
|
+
*
|
|
4455
|
+
* foo => Bar::Baz[a: 1, b: 2]
|
|
4456
|
+
* ^^^^^^^^
|
|
4320
4457
|
*/
|
|
4321
4458
|
struct pm_node *constant;
|
|
4322
4459
|
|
|
4323
4460
|
/**
|
|
4324
4461
|
* HashPatternNode#elements
|
|
4462
|
+
*
|
|
4463
|
+
* Represents the explicit named hash keys and values.
|
|
4464
|
+
*
|
|
4465
|
+
* foo => { a: 1, b:, ** }
|
|
4466
|
+
* ^^^^^^^^
|
|
4325
4467
|
*/
|
|
4326
4468
|
struct pm_node_list elements;
|
|
4327
4469
|
|
|
4328
4470
|
/**
|
|
4329
4471
|
* HashPatternNode#rest
|
|
4472
|
+
*
|
|
4473
|
+
* Represents the rest of the Hash keys and values. This can be named, unnamed, or explicitly forbidden via `**nil`, this last one results in a `NoKeywordsParameterNode`.
|
|
4474
|
+
*
|
|
4475
|
+
* foo => { a: 1, b:, **c }
|
|
4476
|
+
* ^^^
|
|
4477
|
+
*
|
|
4478
|
+
* foo => { a: 1, b:, ** }
|
|
4479
|
+
* ^^
|
|
4480
|
+
*
|
|
4481
|
+
* foo => { a: 1, b:, **nil }
|
|
4482
|
+
* ^^^^^
|
|
4330
4483
|
*/
|
|
4331
4484
|
struct pm_node *rest;
|
|
4332
4485
|
|
|
4333
4486
|
/**
|
|
4334
4487
|
* HashPatternNode#opening_loc
|
|
4488
|
+
*
|
|
4489
|
+
* The location of the opening brace.
|
|
4490
|
+
*
|
|
4491
|
+
* foo => { a: 1 }
|
|
4492
|
+
* ^
|
|
4493
|
+
*
|
|
4494
|
+
* foo => Bar[a: 1]
|
|
4495
|
+
* ^
|
|
4335
4496
|
*/
|
|
4336
4497
|
pm_location_t opening_loc;
|
|
4337
4498
|
|
|
4338
4499
|
/**
|
|
4339
4500
|
* HashPatternNode#closing_loc
|
|
4501
|
+
*
|
|
4502
|
+
* The location of the closing brace.
|
|
4503
|
+
*
|
|
4504
|
+
* foo => { a: 1 }
|
|
4505
|
+
* ^
|
|
4506
|
+
*
|
|
4507
|
+
* foo => Bar[a: 1]
|
|
4508
|
+
* ^
|
|
4340
4509
|
*/
|
|
4341
4510
|
pm_location_t closing_loc;
|
|
4342
4511
|
} pm_hash_pattern_node_t;
|
|
@@ -5618,6 +5787,9 @@ typedef struct pm_local_variable_read_node {
|
|
|
5618
5787
|
* foo, bar = baz
|
|
5619
5788
|
* ^^^ ^^^
|
|
5620
5789
|
*
|
|
5790
|
+
* foo => baz
|
|
5791
|
+
* ^^^
|
|
5792
|
+
*
|
|
5621
5793
|
* Type: ::PM_LOCAL_VARIABLE_TARGET_NODE
|
|
5622
5794
|
*
|
|
5623
5795
|
* @extends pm_node_t
|
|
@@ -5820,16 +5992,70 @@ typedef struct pm_match_required_node {
|
|
|
5820
5992
|
|
|
5821
5993
|
/**
|
|
5822
5994
|
* MatchRequiredNode#value
|
|
5995
|
+
*
|
|
5996
|
+
* Represents the left-hand side of the operator.
|
|
5997
|
+
*
|
|
5998
|
+
* foo => bar
|
|
5999
|
+
* ^^^
|
|
5823
6000
|
*/
|
|
5824
6001
|
struct pm_node *value;
|
|
5825
6002
|
|
|
5826
6003
|
/**
|
|
5827
6004
|
* MatchRequiredNode#pattern
|
|
6005
|
+
*
|
|
6006
|
+
* Represents the right-hand side of the operator. The type of the node depends on the expression.
|
|
6007
|
+
*
|
|
6008
|
+
* Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`.
|
|
6009
|
+
*
|
|
6010
|
+
* foo => a # This is equivalent to writing `a = foo`
|
|
6011
|
+
* ^
|
|
6012
|
+
*
|
|
6013
|
+
* Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant.
|
|
6014
|
+
*
|
|
6015
|
+
* foo => [a]
|
|
6016
|
+
* ^^^
|
|
6017
|
+
*
|
|
6018
|
+
* foo => a, b
|
|
6019
|
+
* ^^^^
|
|
6020
|
+
*
|
|
6021
|
+
* foo => Bar[a, b]
|
|
6022
|
+
* ^^^^^^^^^
|
|
6023
|
+
*
|
|
6024
|
+
* If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead.
|
|
6025
|
+
*
|
|
6026
|
+
* foo => *, 1, *a
|
|
6027
|
+
* ^^^^^
|
|
6028
|
+
*
|
|
6029
|
+
* Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`.
|
|
6030
|
+
*
|
|
6031
|
+
* foo => { a: 1, b: }
|
|
6032
|
+
*
|
|
6033
|
+
* foo => Bar[a: 1, b:]
|
|
6034
|
+
*
|
|
6035
|
+
* foo => Bar[**]
|
|
6036
|
+
*
|
|
6037
|
+
* To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode`
|
|
6038
|
+
*
|
|
6039
|
+
* foo => ^a
|
|
6040
|
+
* ^^
|
|
6041
|
+
*
|
|
6042
|
+
* Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`.
|
|
6043
|
+
*
|
|
6044
|
+
* foo => ^(a + 1)
|
|
6045
|
+
*
|
|
6046
|
+
* Anything else will result in the regular node for that expression, for example a `ConstantReadNode`.
|
|
6047
|
+
*
|
|
6048
|
+
* foo => CONST
|
|
5828
6049
|
*/
|
|
5829
6050
|
struct pm_node *pattern;
|
|
5830
6051
|
|
|
5831
6052
|
/**
|
|
5832
6053
|
* MatchRequiredNode#operator_loc
|
|
6054
|
+
*
|
|
6055
|
+
* The location of the operator.
|
|
6056
|
+
*
|
|
6057
|
+
* foo => bar
|
|
6058
|
+
* ^^
|
|
5833
6059
|
*/
|
|
5834
6060
|
pm_location_t operator_loc;
|
|
5835
6061
|
} pm_match_required_node_t;
|
|
@@ -6487,21 +6713,41 @@ typedef struct pm_pinned_expression_node {
|
|
|
6487
6713
|
|
|
6488
6714
|
/**
|
|
6489
6715
|
* PinnedExpressionNode#expression
|
|
6716
|
+
*
|
|
6717
|
+
* The expression used in the pinned expression
|
|
6718
|
+
*
|
|
6719
|
+
* foo in ^(bar)
|
|
6720
|
+
* ^^^
|
|
6490
6721
|
*/
|
|
6491
6722
|
struct pm_node *expression;
|
|
6492
6723
|
|
|
6493
6724
|
/**
|
|
6494
6725
|
* PinnedExpressionNode#operator_loc
|
|
6726
|
+
*
|
|
6727
|
+
* The location of the `^` operator
|
|
6728
|
+
*
|
|
6729
|
+
* foo in ^(bar)
|
|
6730
|
+
* ^
|
|
6495
6731
|
*/
|
|
6496
6732
|
pm_location_t operator_loc;
|
|
6497
6733
|
|
|
6498
6734
|
/**
|
|
6499
6735
|
* PinnedExpressionNode#lparen_loc
|
|
6736
|
+
*
|
|
6737
|
+
* The location of the opening parenthesis.
|
|
6738
|
+
*
|
|
6739
|
+
* foo in ^(bar)
|
|
6740
|
+
* ^
|
|
6500
6741
|
*/
|
|
6501
6742
|
pm_location_t lparen_loc;
|
|
6502
6743
|
|
|
6503
6744
|
/**
|
|
6504
6745
|
* PinnedExpressionNode#rparen_loc
|
|
6746
|
+
*
|
|
6747
|
+
* The location of the closing parenthesis.
|
|
6748
|
+
*
|
|
6749
|
+
* foo in ^(bar)
|
|
6750
|
+
* ^
|
|
6505
6751
|
*/
|
|
6506
6752
|
pm_location_t rparen_loc;
|
|
6507
6753
|
} pm_pinned_expression_node_t;
|
|
@@ -6525,11 +6771,21 @@ typedef struct pm_pinned_variable_node {
|
|
|
6525
6771
|
|
|
6526
6772
|
/**
|
|
6527
6773
|
* PinnedVariableNode#variable
|
|
6774
|
+
*
|
|
6775
|
+
* The variable used in the pinned expression
|
|
6776
|
+
*
|
|
6777
|
+
* foo in ^bar
|
|
6778
|
+
* ^^^
|
|
6528
6779
|
*/
|
|
6529
6780
|
struct pm_node *variable;
|
|
6530
6781
|
|
|
6531
6782
|
/**
|
|
6532
6783
|
* PinnedVariableNode#operator_loc
|
|
6784
|
+
*
|
|
6785
|
+
* The location of the `^` operator
|
|
6786
|
+
*
|
|
6787
|
+
* foo in ^bar
|
|
6788
|
+
* ^
|
|
6533
6789
|
*/
|
|
6534
6790
|
pm_location_t operator_loc;
|
|
6535
6791
|
} pm_pinned_variable_node_t;
|
|
@@ -7313,6 +7569,8 @@ typedef struct pm_string_node {
|
|
|
7313
7569
|
* super foo, bar
|
|
7314
7570
|
* ^^^^^^^^^^^^^^
|
|
7315
7571
|
*
|
|
7572
|
+
* If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead.
|
|
7573
|
+
*
|
|
7316
7574
|
* Type: ::PM_SUPER_NODE
|
|
7317
7575
|
*
|
|
7318
7576
|
* @extends pm_node_t
|
|
@@ -7334,6 +7592,8 @@ typedef struct pm_super_node {
|
|
|
7334
7592
|
|
|
7335
7593
|
/**
|
|
7336
7594
|
* SuperNode#arguments
|
|
7595
|
+
*
|
|
7596
|
+
* Can be only `nil` when there are empty parentheses, like `super()`.
|
|
7337
7597
|
*/
|
|
7338
7598
|
struct pm_arguments_node *arguments;
|
|
7339
7599
|
|
|
@@ -7764,6 +8024,8 @@ typedef enum pm_arguments_node_flags {
|
|
|
7764
8024
|
|
|
7765
8025
|
/** if the arguments contain multiple splats */
|
|
7766
8026
|
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS = 64,
|
|
8027
|
+
|
|
8028
|
+
PM_ARGUMENTS_NODE_FLAGS_LAST,
|
|
7767
8029
|
} pm_arguments_node_flags_t;
|
|
7768
8030
|
|
|
7769
8031
|
/**
|
|
@@ -7772,6 +8034,8 @@ typedef enum pm_arguments_node_flags {
|
|
|
7772
8034
|
typedef enum pm_array_node_flags {
|
|
7773
8035
|
/** if array contains splat nodes */
|
|
7774
8036
|
PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT = 4,
|
|
8037
|
+
|
|
8038
|
+
PM_ARRAY_NODE_FLAGS_LAST,
|
|
7775
8039
|
} pm_array_node_flags_t;
|
|
7776
8040
|
|
|
7777
8041
|
/**
|
|
@@ -7789,6 +8053,8 @@ typedef enum pm_call_node_flags {
|
|
|
7789
8053
|
|
|
7790
8054
|
/** a call that ignores method visibility */
|
|
7791
8055
|
PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY = 32,
|
|
8056
|
+
|
|
8057
|
+
PM_CALL_NODE_FLAGS_LAST,
|
|
7792
8058
|
} pm_call_node_flags_t;
|
|
7793
8059
|
|
|
7794
8060
|
/**
|
|
@@ -7800,6 +8066,8 @@ typedef enum pm_encoding_flags {
|
|
|
7800
8066
|
|
|
7801
8067
|
/** internal bytes forced the encoding to binary */
|
|
7802
8068
|
PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING = 8,
|
|
8069
|
+
|
|
8070
|
+
PM_ENCODING_FLAGS_LAST,
|
|
7803
8071
|
} pm_encoding_flags_t;
|
|
7804
8072
|
|
|
7805
8073
|
/**
|
|
@@ -7817,6 +8085,8 @@ typedef enum pm_integer_base_flags {
|
|
|
7817
8085
|
|
|
7818
8086
|
/** 0x prefix */
|
|
7819
8087
|
PM_INTEGER_BASE_FLAGS_HEXADECIMAL = 32,
|
|
8088
|
+
|
|
8089
|
+
PM_INTEGER_BASE_FLAGS_LAST,
|
|
7820
8090
|
} pm_integer_base_flags_t;
|
|
7821
8091
|
|
|
7822
8092
|
/**
|
|
@@ -7828,6 +8098,8 @@ typedef enum pm_interpolated_string_node_flags {
|
|
|
7828
8098
|
|
|
7829
8099
|
/** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'` */
|
|
7830
8100
|
PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE = 8,
|
|
8101
|
+
|
|
8102
|
+
PM_INTERPOLATED_STRING_NODE_FLAGS_LAST,
|
|
7831
8103
|
} pm_interpolated_string_node_flags_t;
|
|
7832
8104
|
|
|
7833
8105
|
/**
|
|
@@ -7836,6 +8108,8 @@ typedef enum pm_interpolated_string_node_flags {
|
|
|
7836
8108
|
typedef enum pm_keyword_hash_node_flags {
|
|
7837
8109
|
/** a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments */
|
|
7838
8110
|
PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS = 4,
|
|
8111
|
+
|
|
8112
|
+
PM_KEYWORD_HASH_NODE_FLAGS_LAST,
|
|
7839
8113
|
} pm_keyword_hash_node_flags_t;
|
|
7840
8114
|
|
|
7841
8115
|
/**
|
|
@@ -7844,6 +8118,8 @@ typedef enum pm_keyword_hash_node_flags {
|
|
|
7844
8118
|
typedef enum pm_loop_flags {
|
|
7845
8119
|
/** a loop after a begin statement, so the body is executed first before the condition */
|
|
7846
8120
|
PM_LOOP_FLAGS_BEGIN_MODIFIER = 4,
|
|
8121
|
+
|
|
8122
|
+
PM_LOOP_FLAGS_LAST,
|
|
7847
8123
|
} pm_loop_flags_t;
|
|
7848
8124
|
|
|
7849
8125
|
/**
|
|
@@ -7852,6 +8128,8 @@ typedef enum pm_loop_flags {
|
|
|
7852
8128
|
typedef enum pm_parameter_flags {
|
|
7853
8129
|
/** a parameter name that has been repeated in the method signature */
|
|
7854
8130
|
PM_PARAMETER_FLAGS_REPEATED_PARAMETER = 4,
|
|
8131
|
+
|
|
8132
|
+
PM_PARAMETER_FLAGS_LAST,
|
|
7855
8133
|
} pm_parameter_flags_t;
|
|
7856
8134
|
|
|
7857
8135
|
/**
|
|
@@ -7860,6 +8138,8 @@ typedef enum pm_parameter_flags {
|
|
|
7860
8138
|
typedef enum pm_parentheses_node_flags {
|
|
7861
8139
|
/** parentheses that contain multiple potentially void statements */
|
|
7862
8140
|
PM_PARENTHESES_NODE_FLAGS_MULTIPLE_STATEMENTS = 4,
|
|
8141
|
+
|
|
8142
|
+
PM_PARENTHESES_NODE_FLAGS_LAST,
|
|
7863
8143
|
} pm_parentheses_node_flags_t;
|
|
7864
8144
|
|
|
7865
8145
|
/**
|
|
@@ -7868,6 +8148,8 @@ typedef enum pm_parentheses_node_flags {
|
|
|
7868
8148
|
typedef enum pm_range_flags {
|
|
7869
8149
|
/** ... operator */
|
|
7870
8150
|
PM_RANGE_FLAGS_EXCLUDE_END = 4,
|
|
8151
|
+
|
|
8152
|
+
PM_RANGE_FLAGS_LAST,
|
|
7871
8153
|
} pm_range_flags_t;
|
|
7872
8154
|
|
|
7873
8155
|
/**
|
|
@@ -7906,6 +8188,8 @@ typedef enum pm_regular_expression_flags {
|
|
|
7906
8188
|
|
|
7907
8189
|
/** internal bytes forced the encoding to US-ASCII */
|
|
7908
8190
|
PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING = 4096,
|
|
8191
|
+
|
|
8192
|
+
PM_REGULAR_EXPRESSION_FLAGS_LAST,
|
|
7909
8193
|
} pm_regular_expression_flags_t;
|
|
7910
8194
|
|
|
7911
8195
|
/**
|
|
@@ -7920,6 +8204,8 @@ typedef enum pm_shareable_constant_node_flags {
|
|
|
7920
8204
|
|
|
7921
8205
|
/** constant writes that should be modified with shareable constant value experimental copy */
|
|
7922
8206
|
PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY = 16,
|
|
8207
|
+
|
|
8208
|
+
PM_SHAREABLE_CONSTANT_NODE_FLAGS_LAST,
|
|
7923
8209
|
} pm_shareable_constant_node_flags_t;
|
|
7924
8210
|
|
|
7925
8211
|
/**
|
|
@@ -7937,6 +8223,8 @@ typedef enum pm_string_flags {
|
|
|
7937
8223
|
|
|
7938
8224
|
/** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal` */
|
|
7939
8225
|
PM_STRING_FLAGS_MUTABLE = 32,
|
|
8226
|
+
|
|
8227
|
+
PM_STRING_FLAGS_LAST,
|
|
7940
8228
|
} pm_string_flags_t;
|
|
7941
8229
|
|
|
7942
8230
|
/**
|
|
@@ -7951,6 +8239,8 @@ typedef enum pm_symbol_flags {
|
|
|
7951
8239
|
|
|
7952
8240
|
/** internal bytes forced the encoding to US-ASCII */
|
|
7953
8241
|
PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING = 16,
|
|
8242
|
+
|
|
8243
|
+
PM_SYMBOL_FLAGS_LAST,
|
|
7954
8244
|
} pm_symbol_flags_t;
|
|
7955
8245
|
|
|
7956
8246
|
/**
|