prism 0.15.1 → 0.17.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 +35 -1
- data/Makefile +12 -0
- data/README.md +3 -1
- data/config.yml +66 -50
- data/docs/configuration.md +2 -0
- data/docs/fuzzing.md +1 -1
- data/docs/javascript.md +90 -0
- data/docs/releasing.md +27 -0
- data/docs/ruby_api.md +2 -0
- data/docs/serialization.md +28 -29
- data/ext/prism/api_node.c +856 -826
- data/ext/prism/api_pack.c +20 -9
- data/ext/prism/extension.c +494 -119
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +3157 -747
- data/include/prism/defines.h +40 -8
- data/include/prism/diagnostic.h +36 -3
- data/include/prism/enc/pm_encoding.h +119 -28
- data/include/prism/node.h +38 -30
- data/include/prism/options.h +204 -0
- data/include/prism/pack.h +44 -33
- data/include/prism/parser.h +445 -199
- data/include/prism/prettyprint.h +26 -0
- data/include/prism/regexp.h +16 -2
- data/include/prism/util/pm_buffer.h +102 -18
- data/include/prism/util/pm_char.h +162 -48
- data/include/prism/util/pm_constant_pool.h +128 -34
- data/include/prism/util/pm_list.h +68 -38
- data/include/prism/util/pm_memchr.h +18 -3
- data/include/prism/util/pm_newline_list.h +71 -28
- data/include/prism/util/pm_state_stack.h +25 -7
- data/include/prism/util/pm_string.h +115 -27
- data/include/prism/util/pm_string_list.h +25 -6
- data/include/prism/util/pm_strncasecmp.h +32 -0
- data/include/prism/util/pm_strpbrk.h +31 -17
- data/include/prism/version.h +28 -3
- data/include/prism.h +229 -36
- data/lib/prism/compiler.rb +5 -5
- data/lib/prism/debug.rb +43 -13
- data/lib/prism/desugar_compiler.rb +1 -1
- data/lib/prism/dispatcher.rb +27 -26
- data/lib/prism/dsl.rb +16 -16
- data/lib/prism/ffi.rb +138 -61
- data/lib/prism/lex_compat.rb +26 -16
- data/lib/prism/mutation_compiler.rb +11 -11
- data/lib/prism/node.rb +426 -227
- data/lib/prism/node_ext.rb +23 -16
- data/lib/prism/node_inspector.rb +1 -1
- data/lib/prism/pack.rb +79 -40
- data/lib/prism/parse_result/comments.rb +7 -2
- data/lib/prism/parse_result/newlines.rb +4 -0
- data/lib/prism/parse_result.rb +157 -21
- data/lib/prism/pattern.rb +14 -3
- data/lib/prism/ripper_compat.rb +28 -10
- data/lib/prism/serialize.rb +935 -307
- data/lib/prism/visitor.rb +9 -5
- data/lib/prism.rb +20 -2
- data/prism.gemspec +11 -2
- data/rbi/prism.rbi +7305 -0
- data/rbi/prism_static.rbi +196 -0
- data/sig/prism.rbs +4468 -0
- data/sig/prism_static.rbs +123 -0
- data/src/diagnostic.c +56 -53
- data/src/enc/pm_big5.c +1 -0
- data/src/enc/pm_euc_jp.c +1 -0
- data/src/enc/pm_gbk.c +1 -0
- data/src/enc/pm_shift_jis.c +1 -0
- data/src/enc/pm_tables.c +316 -80
- data/src/enc/pm_unicode.c +54 -9
- data/src/enc/pm_windows_31j.c +1 -0
- data/src/node.c +357 -345
- data/src/options.c +170 -0
- data/src/prettyprint.c +7697 -1643
- data/src/prism.c +1964 -1125
- data/src/regexp.c +153 -95
- data/src/serialize.c +432 -397
- data/src/token_type.c +3 -1
- data/src/util/pm_buffer.c +88 -23
- data/src/util/pm_char.c +103 -57
- data/src/util/pm_constant_pool.c +52 -22
- data/src/util/pm_list.c +12 -4
- data/src/util/pm_memchr.c +5 -3
- data/src/util/pm_newline_list.c +25 -63
- data/src/util/pm_state_stack.c +9 -3
- data/src/util/pm_string.c +95 -85
- data/src/util/pm_string_list.c +14 -15
- data/src/util/pm_strncasecmp.c +10 -3
- data/src/util/pm_strpbrk.c +25 -19
- metadata +12 -3
- data/docs/prism.png +0 -0
data/include/prism/ast.h
CHANGED
@@ -5,6 +5,11 @@
|
|
5
5
|
/* if you are looking to modify the */
|
6
6
|
/* template */
|
7
7
|
/******************************************************************************/
|
8
|
+
/**
|
9
|
+
* @file ast.h
|
10
|
+
*
|
11
|
+
* The abstract syntax tree.
|
12
|
+
*/
|
8
13
|
#ifndef PRISM_AST_H
|
9
14
|
#define PRISM_AST_H
|
10
15
|
|
@@ -16,1969 +21,4374 @@
|
|
16
21
|
#include <stddef.h>
|
17
22
|
#include <stdint.h>
|
18
23
|
|
19
|
-
|
24
|
+
/**
|
25
|
+
* This enum represents every type of token in the Ruby source.
|
26
|
+
*/
|
20
27
|
typedef enum pm_token_type {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
28
|
+
/** final token in the file */
|
29
|
+
PM_TOKEN_EOF = 1,
|
30
|
+
|
31
|
+
/** a token that was expected but not found */
|
32
|
+
PM_TOKEN_MISSING,
|
33
|
+
|
34
|
+
/** a token that was not present but it is okay */
|
35
|
+
PM_TOKEN_NOT_PROVIDED,
|
36
|
+
|
37
|
+
/** & */
|
38
|
+
PM_TOKEN_AMPERSAND,
|
39
|
+
|
40
|
+
/** && */
|
41
|
+
PM_TOKEN_AMPERSAND_AMPERSAND,
|
42
|
+
|
43
|
+
/** &&= */
|
44
|
+
PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL,
|
45
|
+
|
46
|
+
/** &. */
|
47
|
+
PM_TOKEN_AMPERSAND_DOT,
|
48
|
+
|
49
|
+
/** &= */
|
50
|
+
PM_TOKEN_AMPERSAND_EQUAL,
|
51
|
+
|
52
|
+
/** ` */
|
53
|
+
PM_TOKEN_BACKTICK,
|
54
|
+
|
55
|
+
/** a back reference */
|
56
|
+
PM_TOKEN_BACK_REFERENCE,
|
57
|
+
|
58
|
+
/** ! or !@ */
|
59
|
+
PM_TOKEN_BANG,
|
60
|
+
|
61
|
+
/** != */
|
62
|
+
PM_TOKEN_BANG_EQUAL,
|
63
|
+
|
64
|
+
/** !~ */
|
65
|
+
PM_TOKEN_BANG_TILDE,
|
66
|
+
|
67
|
+
/** { */
|
68
|
+
PM_TOKEN_BRACE_LEFT,
|
69
|
+
|
70
|
+
/** } */
|
71
|
+
PM_TOKEN_BRACE_RIGHT,
|
72
|
+
|
73
|
+
/** [ */
|
74
|
+
PM_TOKEN_BRACKET_LEFT,
|
75
|
+
|
76
|
+
/** [ for the beginning of an array */
|
77
|
+
PM_TOKEN_BRACKET_LEFT_ARRAY,
|
78
|
+
|
79
|
+
/** [] */
|
80
|
+
PM_TOKEN_BRACKET_LEFT_RIGHT,
|
81
|
+
|
82
|
+
/** []= */
|
83
|
+
PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL,
|
84
|
+
|
85
|
+
/** ] */
|
86
|
+
PM_TOKEN_BRACKET_RIGHT,
|
87
|
+
|
88
|
+
/** ^ */
|
89
|
+
PM_TOKEN_CARET,
|
90
|
+
|
91
|
+
/** ^= */
|
92
|
+
PM_TOKEN_CARET_EQUAL,
|
93
|
+
|
94
|
+
/** a character literal */
|
95
|
+
PM_TOKEN_CHARACTER_LITERAL,
|
96
|
+
|
97
|
+
/** a class variable */
|
98
|
+
PM_TOKEN_CLASS_VARIABLE,
|
99
|
+
|
100
|
+
/** : */
|
101
|
+
PM_TOKEN_COLON,
|
102
|
+
|
103
|
+
/** :: */
|
104
|
+
PM_TOKEN_COLON_COLON,
|
105
|
+
|
106
|
+
/** , */
|
107
|
+
PM_TOKEN_COMMA,
|
108
|
+
|
109
|
+
/** a comment */
|
110
|
+
PM_TOKEN_COMMENT,
|
111
|
+
|
112
|
+
/** a constant */
|
113
|
+
PM_TOKEN_CONSTANT,
|
114
|
+
|
115
|
+
/** the . call operator */
|
116
|
+
PM_TOKEN_DOT,
|
117
|
+
|
118
|
+
/** the .. range operator */
|
119
|
+
PM_TOKEN_DOT_DOT,
|
120
|
+
|
121
|
+
/** the ... range operator or forwarding parameter */
|
122
|
+
PM_TOKEN_DOT_DOT_DOT,
|
123
|
+
|
124
|
+
/** =begin */
|
125
|
+
PM_TOKEN_EMBDOC_BEGIN,
|
126
|
+
|
127
|
+
/** =end */
|
128
|
+
PM_TOKEN_EMBDOC_END,
|
129
|
+
|
130
|
+
/** a line inside of embedded documentation */
|
131
|
+
PM_TOKEN_EMBDOC_LINE,
|
132
|
+
|
133
|
+
/** #{ */
|
134
|
+
PM_TOKEN_EMBEXPR_BEGIN,
|
135
|
+
|
136
|
+
/** } */
|
137
|
+
PM_TOKEN_EMBEXPR_END,
|
138
|
+
|
139
|
+
/** # */
|
140
|
+
PM_TOKEN_EMBVAR,
|
141
|
+
|
142
|
+
/** = */
|
143
|
+
PM_TOKEN_EQUAL,
|
144
|
+
|
145
|
+
/** == */
|
146
|
+
PM_TOKEN_EQUAL_EQUAL,
|
147
|
+
|
148
|
+
/** === */
|
149
|
+
PM_TOKEN_EQUAL_EQUAL_EQUAL,
|
150
|
+
|
151
|
+
/** => */
|
152
|
+
PM_TOKEN_EQUAL_GREATER,
|
153
|
+
|
154
|
+
/** =~ */
|
155
|
+
PM_TOKEN_EQUAL_TILDE,
|
156
|
+
|
157
|
+
/** a floating point number */
|
158
|
+
PM_TOKEN_FLOAT,
|
159
|
+
|
160
|
+
/** a floating pointer number with an imaginary suffix */
|
161
|
+
PM_TOKEN_FLOAT_IMAGINARY,
|
162
|
+
|
163
|
+
/** a floating pointer number with a rational suffix */
|
164
|
+
PM_TOKEN_FLOAT_RATIONAL,
|
165
|
+
|
166
|
+
/** a floating pointer number with a rational and imaginary suffix */
|
167
|
+
PM_TOKEN_FLOAT_RATIONAL_IMAGINARY,
|
168
|
+
|
169
|
+
/** a global variable */
|
170
|
+
PM_TOKEN_GLOBAL_VARIABLE,
|
171
|
+
|
172
|
+
/** > */
|
173
|
+
PM_TOKEN_GREATER,
|
174
|
+
|
175
|
+
/** >= */
|
176
|
+
PM_TOKEN_GREATER_EQUAL,
|
177
|
+
|
178
|
+
/** >> */
|
179
|
+
PM_TOKEN_GREATER_GREATER,
|
180
|
+
|
181
|
+
/** >>= */
|
182
|
+
PM_TOKEN_GREATER_GREATER_EQUAL,
|
183
|
+
|
184
|
+
/** the end of a heredoc */
|
185
|
+
PM_TOKEN_HEREDOC_END,
|
186
|
+
|
187
|
+
/** the start of a heredoc */
|
188
|
+
PM_TOKEN_HEREDOC_START,
|
189
|
+
|
190
|
+
/** an identifier */
|
191
|
+
PM_TOKEN_IDENTIFIER,
|
192
|
+
|
193
|
+
/** an ignored newline */
|
194
|
+
PM_TOKEN_IGNORED_NEWLINE,
|
195
|
+
|
196
|
+
/** an instance variable */
|
197
|
+
PM_TOKEN_INSTANCE_VARIABLE,
|
198
|
+
|
199
|
+
/** an integer (any base) */
|
200
|
+
PM_TOKEN_INTEGER,
|
201
|
+
|
202
|
+
/** an integer with an imaginary suffix */
|
203
|
+
PM_TOKEN_INTEGER_IMAGINARY,
|
204
|
+
|
205
|
+
/** an integer with a rational suffix */
|
206
|
+
PM_TOKEN_INTEGER_RATIONAL,
|
207
|
+
|
208
|
+
/** an integer with a rational and imaginary suffix */
|
209
|
+
PM_TOKEN_INTEGER_RATIONAL_IMAGINARY,
|
210
|
+
|
211
|
+
/** alias */
|
212
|
+
PM_TOKEN_KEYWORD_ALIAS,
|
213
|
+
|
214
|
+
/** and */
|
215
|
+
PM_TOKEN_KEYWORD_AND,
|
216
|
+
|
217
|
+
/** begin */
|
218
|
+
PM_TOKEN_KEYWORD_BEGIN,
|
219
|
+
|
220
|
+
/** BEGIN */
|
221
|
+
PM_TOKEN_KEYWORD_BEGIN_UPCASE,
|
222
|
+
|
223
|
+
/** break */
|
224
|
+
PM_TOKEN_KEYWORD_BREAK,
|
225
|
+
|
226
|
+
/** case */
|
227
|
+
PM_TOKEN_KEYWORD_CASE,
|
228
|
+
|
229
|
+
/** class */
|
230
|
+
PM_TOKEN_KEYWORD_CLASS,
|
231
|
+
|
232
|
+
/** def */
|
233
|
+
PM_TOKEN_KEYWORD_DEF,
|
234
|
+
|
235
|
+
/** defined? */
|
236
|
+
PM_TOKEN_KEYWORD_DEFINED,
|
237
|
+
|
238
|
+
/** do */
|
239
|
+
PM_TOKEN_KEYWORD_DO,
|
240
|
+
|
241
|
+
/** do keyword for a predicate in a while, until, or for loop */
|
242
|
+
PM_TOKEN_KEYWORD_DO_LOOP,
|
243
|
+
|
244
|
+
/** else */
|
245
|
+
PM_TOKEN_KEYWORD_ELSE,
|
246
|
+
|
247
|
+
/** elsif */
|
248
|
+
PM_TOKEN_KEYWORD_ELSIF,
|
249
|
+
|
250
|
+
/** end */
|
251
|
+
PM_TOKEN_KEYWORD_END,
|
252
|
+
|
253
|
+
/** END */
|
254
|
+
PM_TOKEN_KEYWORD_END_UPCASE,
|
255
|
+
|
256
|
+
/** ensure */
|
257
|
+
PM_TOKEN_KEYWORD_ENSURE,
|
258
|
+
|
259
|
+
/** false */
|
260
|
+
PM_TOKEN_KEYWORD_FALSE,
|
261
|
+
|
262
|
+
/** for */
|
263
|
+
PM_TOKEN_KEYWORD_FOR,
|
264
|
+
|
265
|
+
/** if */
|
266
|
+
PM_TOKEN_KEYWORD_IF,
|
267
|
+
|
268
|
+
/** if in the modifier form */
|
269
|
+
PM_TOKEN_KEYWORD_IF_MODIFIER,
|
270
|
+
|
271
|
+
/** in */
|
272
|
+
PM_TOKEN_KEYWORD_IN,
|
273
|
+
|
274
|
+
/** module */
|
275
|
+
PM_TOKEN_KEYWORD_MODULE,
|
276
|
+
|
277
|
+
/** next */
|
278
|
+
PM_TOKEN_KEYWORD_NEXT,
|
279
|
+
|
280
|
+
/** nil */
|
281
|
+
PM_TOKEN_KEYWORD_NIL,
|
282
|
+
|
283
|
+
/** not */
|
284
|
+
PM_TOKEN_KEYWORD_NOT,
|
285
|
+
|
286
|
+
/** or */
|
287
|
+
PM_TOKEN_KEYWORD_OR,
|
288
|
+
|
289
|
+
/** redo */
|
290
|
+
PM_TOKEN_KEYWORD_REDO,
|
291
|
+
|
292
|
+
/** rescue */
|
293
|
+
PM_TOKEN_KEYWORD_RESCUE,
|
294
|
+
|
295
|
+
/** rescue in the modifier form */
|
296
|
+
PM_TOKEN_KEYWORD_RESCUE_MODIFIER,
|
297
|
+
|
298
|
+
/** retry */
|
299
|
+
PM_TOKEN_KEYWORD_RETRY,
|
300
|
+
|
301
|
+
/** return */
|
302
|
+
PM_TOKEN_KEYWORD_RETURN,
|
303
|
+
|
304
|
+
/** self */
|
305
|
+
PM_TOKEN_KEYWORD_SELF,
|
306
|
+
|
307
|
+
/** super */
|
308
|
+
PM_TOKEN_KEYWORD_SUPER,
|
309
|
+
|
310
|
+
/** then */
|
311
|
+
PM_TOKEN_KEYWORD_THEN,
|
312
|
+
|
313
|
+
/** true */
|
314
|
+
PM_TOKEN_KEYWORD_TRUE,
|
315
|
+
|
316
|
+
/** undef */
|
317
|
+
PM_TOKEN_KEYWORD_UNDEF,
|
318
|
+
|
319
|
+
/** unless */
|
320
|
+
PM_TOKEN_KEYWORD_UNLESS,
|
321
|
+
|
322
|
+
/** unless in the modifier form */
|
323
|
+
PM_TOKEN_KEYWORD_UNLESS_MODIFIER,
|
324
|
+
|
325
|
+
/** until */
|
326
|
+
PM_TOKEN_KEYWORD_UNTIL,
|
327
|
+
|
328
|
+
/** until in the modifier form */
|
329
|
+
PM_TOKEN_KEYWORD_UNTIL_MODIFIER,
|
330
|
+
|
331
|
+
/** when */
|
332
|
+
PM_TOKEN_KEYWORD_WHEN,
|
333
|
+
|
334
|
+
/** while */
|
335
|
+
PM_TOKEN_KEYWORD_WHILE,
|
336
|
+
|
337
|
+
/** while in the modifier form */
|
338
|
+
PM_TOKEN_KEYWORD_WHILE_MODIFIER,
|
339
|
+
|
340
|
+
/** yield */
|
341
|
+
PM_TOKEN_KEYWORD_YIELD,
|
342
|
+
|
343
|
+
/** __ENCODING__ */
|
344
|
+
PM_TOKEN_KEYWORD___ENCODING__,
|
345
|
+
|
346
|
+
/** __FILE__ */
|
347
|
+
PM_TOKEN_KEYWORD___FILE__,
|
348
|
+
|
349
|
+
/** __LINE__ */
|
350
|
+
PM_TOKEN_KEYWORD___LINE__,
|
351
|
+
|
352
|
+
/** a label */
|
353
|
+
PM_TOKEN_LABEL,
|
354
|
+
|
355
|
+
/** the end of a label */
|
356
|
+
PM_TOKEN_LABEL_END,
|
357
|
+
|
358
|
+
/** { */
|
359
|
+
PM_TOKEN_LAMBDA_BEGIN,
|
360
|
+
|
361
|
+
/** < */
|
362
|
+
PM_TOKEN_LESS,
|
363
|
+
|
364
|
+
/** <= */
|
365
|
+
PM_TOKEN_LESS_EQUAL,
|
366
|
+
|
367
|
+
/** <=> */
|
368
|
+
PM_TOKEN_LESS_EQUAL_GREATER,
|
369
|
+
|
370
|
+
/** << */
|
371
|
+
PM_TOKEN_LESS_LESS,
|
372
|
+
|
373
|
+
/** <<= */
|
374
|
+
PM_TOKEN_LESS_LESS_EQUAL,
|
375
|
+
|
376
|
+
/** a method name */
|
377
|
+
PM_TOKEN_METHOD_NAME,
|
378
|
+
|
379
|
+
/** - */
|
380
|
+
PM_TOKEN_MINUS,
|
381
|
+
|
382
|
+
/** -= */
|
383
|
+
PM_TOKEN_MINUS_EQUAL,
|
384
|
+
|
385
|
+
/** -> */
|
386
|
+
PM_TOKEN_MINUS_GREATER,
|
387
|
+
|
388
|
+
/** a newline character outside of other tokens */
|
389
|
+
PM_TOKEN_NEWLINE,
|
390
|
+
|
391
|
+
/** a numbered reference to a capture group in the previous regular expression match */
|
392
|
+
PM_TOKEN_NUMBERED_REFERENCE,
|
393
|
+
|
394
|
+
/** ( */
|
395
|
+
PM_TOKEN_PARENTHESIS_LEFT,
|
396
|
+
|
397
|
+
/** ( for a parentheses node */
|
398
|
+
PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES,
|
399
|
+
|
400
|
+
/** ) */
|
401
|
+
PM_TOKEN_PARENTHESIS_RIGHT,
|
402
|
+
|
403
|
+
/** % */
|
404
|
+
PM_TOKEN_PERCENT,
|
405
|
+
|
406
|
+
/** %= */
|
407
|
+
PM_TOKEN_PERCENT_EQUAL,
|
408
|
+
|
409
|
+
/** %i */
|
410
|
+
PM_TOKEN_PERCENT_LOWER_I,
|
411
|
+
|
412
|
+
/** %w */
|
413
|
+
PM_TOKEN_PERCENT_LOWER_W,
|
414
|
+
|
415
|
+
/** %x */
|
416
|
+
PM_TOKEN_PERCENT_LOWER_X,
|
417
|
+
|
418
|
+
/** %I */
|
419
|
+
PM_TOKEN_PERCENT_UPPER_I,
|
420
|
+
|
421
|
+
/** %W */
|
422
|
+
PM_TOKEN_PERCENT_UPPER_W,
|
423
|
+
|
424
|
+
/** | */
|
425
|
+
PM_TOKEN_PIPE,
|
426
|
+
|
427
|
+
/** |= */
|
428
|
+
PM_TOKEN_PIPE_EQUAL,
|
429
|
+
|
430
|
+
/** || */
|
431
|
+
PM_TOKEN_PIPE_PIPE,
|
432
|
+
|
433
|
+
/** ||= */
|
434
|
+
PM_TOKEN_PIPE_PIPE_EQUAL,
|
435
|
+
|
436
|
+
/** + */
|
437
|
+
PM_TOKEN_PLUS,
|
438
|
+
|
439
|
+
/** += */
|
440
|
+
PM_TOKEN_PLUS_EQUAL,
|
441
|
+
|
442
|
+
/** ? */
|
443
|
+
PM_TOKEN_QUESTION_MARK,
|
444
|
+
|
445
|
+
/** the beginning of a regular expression */
|
446
|
+
PM_TOKEN_REGEXP_BEGIN,
|
447
|
+
|
448
|
+
/** the end of a regular expression */
|
449
|
+
PM_TOKEN_REGEXP_END,
|
450
|
+
|
451
|
+
/** ; */
|
452
|
+
PM_TOKEN_SEMICOLON,
|
453
|
+
|
454
|
+
/** / */
|
455
|
+
PM_TOKEN_SLASH,
|
456
|
+
|
457
|
+
/** /= */
|
458
|
+
PM_TOKEN_SLASH_EQUAL,
|
459
|
+
|
460
|
+
/** * */
|
461
|
+
PM_TOKEN_STAR,
|
462
|
+
|
463
|
+
/** *= */
|
464
|
+
PM_TOKEN_STAR_EQUAL,
|
465
|
+
|
466
|
+
/** ** */
|
467
|
+
PM_TOKEN_STAR_STAR,
|
468
|
+
|
469
|
+
/** **= */
|
470
|
+
PM_TOKEN_STAR_STAR_EQUAL,
|
471
|
+
|
472
|
+
/** the beginning of a string */
|
473
|
+
PM_TOKEN_STRING_BEGIN,
|
474
|
+
|
475
|
+
/** the contents of a string */
|
476
|
+
PM_TOKEN_STRING_CONTENT,
|
477
|
+
|
478
|
+
/** the end of a string */
|
479
|
+
PM_TOKEN_STRING_END,
|
480
|
+
|
481
|
+
/** the beginning of a symbol */
|
482
|
+
PM_TOKEN_SYMBOL_BEGIN,
|
483
|
+
|
484
|
+
/** ~ or ~@ */
|
485
|
+
PM_TOKEN_TILDE,
|
486
|
+
|
487
|
+
/** unary & */
|
488
|
+
PM_TOKEN_UAMPERSAND,
|
489
|
+
|
490
|
+
/** unary :: */
|
491
|
+
PM_TOKEN_UCOLON_COLON,
|
492
|
+
|
493
|
+
/** unary .. operator */
|
494
|
+
PM_TOKEN_UDOT_DOT,
|
495
|
+
|
496
|
+
/** unary ... operator */
|
497
|
+
PM_TOKEN_UDOT_DOT_DOT,
|
498
|
+
|
499
|
+
/** -@ */
|
500
|
+
PM_TOKEN_UMINUS,
|
501
|
+
|
502
|
+
/** -@ for a number */
|
503
|
+
PM_TOKEN_UMINUS_NUM,
|
504
|
+
|
505
|
+
/** +@ */
|
506
|
+
PM_TOKEN_UPLUS,
|
507
|
+
|
508
|
+
/** unary * */
|
509
|
+
PM_TOKEN_USTAR,
|
510
|
+
|
511
|
+
/** unary ** */
|
512
|
+
PM_TOKEN_USTAR_STAR,
|
513
|
+
|
514
|
+
/** a separator between words in a list */
|
515
|
+
PM_TOKEN_WORDS_SEP,
|
516
|
+
|
517
|
+
/** marker for the point in the file at which the parser should stop */
|
518
|
+
PM_TOKEN___END__,
|
519
|
+
|
520
|
+
/** The maximum token value. */
|
521
|
+
PM_TOKEN_MAXIMUM,
|
186
522
|
} pm_token_type_t;
|
187
523
|
|
188
|
-
|
189
|
-
|
524
|
+
/**
|
525
|
+
* This struct represents a token in the Ruby source. We use it to track both
|
526
|
+
* type and location information.
|
527
|
+
*/
|
190
528
|
typedef struct {
|
529
|
+
/** The type of the token. */
|
191
530
|
pm_token_type_t type;
|
531
|
+
|
532
|
+
/** A pointer to the start location of the token in the source. */
|
192
533
|
const uint8_t *start;
|
534
|
+
|
535
|
+
/** A pointer to the end location of the token in the source. */
|
193
536
|
const uint8_t *end;
|
194
537
|
} pm_token_t;
|
195
538
|
|
196
|
-
|
197
|
-
|
539
|
+
/**
|
540
|
+
* This represents a range of bytes in the source string to which a node or
|
541
|
+
* token corresponds.
|
542
|
+
*/
|
198
543
|
typedef struct {
|
544
|
+
/** A pointer to the start location of the range in the source. */
|
199
545
|
const uint8_t *start;
|
546
|
+
|
547
|
+
/** A pointer to the end location of the range in the source. */
|
200
548
|
const uint8_t *end;
|
201
549
|
} pm_location_t;
|
202
550
|
|
203
551
|
struct pm_node;
|
204
552
|
|
553
|
+
/**
|
554
|
+
* A list of nodes in the source, most often used for lists of children.
|
555
|
+
*/
|
205
556
|
typedef struct pm_node_list {
|
206
|
-
|
557
|
+
/** The number of nodes in the list. */
|
207
558
|
size_t size;
|
559
|
+
|
560
|
+
/** The capacity of the list that has been allocated. */
|
208
561
|
size_t capacity;
|
562
|
+
|
563
|
+
/** The nodes in the list. */
|
564
|
+
struct pm_node **nodes;
|
209
565
|
} pm_node_list_t;
|
210
566
|
|
567
|
+
/**
|
568
|
+
* This enum represents every type of node in the Ruby syntax tree.
|
569
|
+
*/
|
211
570
|
enum pm_node_type {
|
571
|
+
/** AliasGlobalVariableNode */
|
212
572
|
PM_ALIAS_GLOBAL_VARIABLE_NODE = 1,
|
573
|
+
|
574
|
+
/** AliasMethodNode */
|
213
575
|
PM_ALIAS_METHOD_NODE = 2,
|
576
|
+
|
577
|
+
/** AlternationPatternNode */
|
214
578
|
PM_ALTERNATION_PATTERN_NODE = 3,
|
579
|
+
|
580
|
+
/** AndNode */
|
215
581
|
PM_AND_NODE = 4,
|
582
|
+
|
583
|
+
/** ArgumentsNode */
|
216
584
|
PM_ARGUMENTS_NODE = 5,
|
585
|
+
|
586
|
+
/** ArrayNode */
|
217
587
|
PM_ARRAY_NODE = 6,
|
588
|
+
|
589
|
+
/** ArrayPatternNode */
|
218
590
|
PM_ARRAY_PATTERN_NODE = 7,
|
591
|
+
|
592
|
+
/** AssocNode */
|
219
593
|
PM_ASSOC_NODE = 8,
|
594
|
+
|
595
|
+
/** AssocSplatNode */
|
220
596
|
PM_ASSOC_SPLAT_NODE = 9,
|
597
|
+
|
598
|
+
/** BackReferenceReadNode */
|
221
599
|
PM_BACK_REFERENCE_READ_NODE = 10,
|
600
|
+
|
601
|
+
/** BeginNode */
|
222
602
|
PM_BEGIN_NODE = 11,
|
603
|
+
|
604
|
+
/** BlockArgumentNode */
|
223
605
|
PM_BLOCK_ARGUMENT_NODE = 12,
|
606
|
+
|
607
|
+
/** BlockLocalVariableNode */
|
224
608
|
PM_BLOCK_LOCAL_VARIABLE_NODE = 13,
|
609
|
+
|
610
|
+
/** BlockNode */
|
225
611
|
PM_BLOCK_NODE = 14,
|
612
|
+
|
613
|
+
/** BlockParameterNode */
|
226
614
|
PM_BLOCK_PARAMETER_NODE = 15,
|
615
|
+
|
616
|
+
/** BlockParametersNode */
|
227
617
|
PM_BLOCK_PARAMETERS_NODE = 16,
|
618
|
+
|
619
|
+
/** BreakNode */
|
228
620
|
PM_BREAK_NODE = 17,
|
621
|
+
|
622
|
+
/** CallAndWriteNode */
|
229
623
|
PM_CALL_AND_WRITE_NODE = 18,
|
624
|
+
|
625
|
+
/** CallNode */
|
230
626
|
PM_CALL_NODE = 19,
|
627
|
+
|
628
|
+
/** CallOperatorWriteNode */
|
231
629
|
PM_CALL_OPERATOR_WRITE_NODE = 20,
|
630
|
+
|
631
|
+
/** CallOrWriteNode */
|
232
632
|
PM_CALL_OR_WRITE_NODE = 21,
|
633
|
+
|
634
|
+
/** CapturePatternNode */
|
233
635
|
PM_CAPTURE_PATTERN_NODE = 22,
|
636
|
+
|
637
|
+
/** CaseNode */
|
234
638
|
PM_CASE_NODE = 23,
|
639
|
+
|
640
|
+
/** ClassNode */
|
235
641
|
PM_CLASS_NODE = 24,
|
642
|
+
|
643
|
+
/** ClassVariableAndWriteNode */
|
236
644
|
PM_CLASS_VARIABLE_AND_WRITE_NODE = 25,
|
645
|
+
|
646
|
+
/** ClassVariableOperatorWriteNode */
|
237
647
|
PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE = 26,
|
648
|
+
|
649
|
+
/** ClassVariableOrWriteNode */
|
238
650
|
PM_CLASS_VARIABLE_OR_WRITE_NODE = 27,
|
651
|
+
|
652
|
+
/** ClassVariableReadNode */
|
239
653
|
PM_CLASS_VARIABLE_READ_NODE = 28,
|
654
|
+
|
655
|
+
/** ClassVariableTargetNode */
|
240
656
|
PM_CLASS_VARIABLE_TARGET_NODE = 29,
|
657
|
+
|
658
|
+
/** ClassVariableWriteNode */
|
241
659
|
PM_CLASS_VARIABLE_WRITE_NODE = 30,
|
660
|
+
|
661
|
+
/** ConstantAndWriteNode */
|
242
662
|
PM_CONSTANT_AND_WRITE_NODE = 31,
|
663
|
+
|
664
|
+
/** ConstantOperatorWriteNode */
|
243
665
|
PM_CONSTANT_OPERATOR_WRITE_NODE = 32,
|
666
|
+
|
667
|
+
/** ConstantOrWriteNode */
|
244
668
|
PM_CONSTANT_OR_WRITE_NODE = 33,
|
669
|
+
|
670
|
+
/** ConstantPathAndWriteNode */
|
245
671
|
PM_CONSTANT_PATH_AND_WRITE_NODE = 34,
|
672
|
+
|
673
|
+
/** ConstantPathNode */
|
246
674
|
PM_CONSTANT_PATH_NODE = 35,
|
675
|
+
|
676
|
+
/** ConstantPathOperatorWriteNode */
|
247
677
|
PM_CONSTANT_PATH_OPERATOR_WRITE_NODE = 36,
|
678
|
+
|
679
|
+
/** ConstantPathOrWriteNode */
|
248
680
|
PM_CONSTANT_PATH_OR_WRITE_NODE = 37,
|
681
|
+
|
682
|
+
/** ConstantPathTargetNode */
|
249
683
|
PM_CONSTANT_PATH_TARGET_NODE = 38,
|
684
|
+
|
685
|
+
/** ConstantPathWriteNode */
|
250
686
|
PM_CONSTANT_PATH_WRITE_NODE = 39,
|
687
|
+
|
688
|
+
/** ConstantReadNode */
|
251
689
|
PM_CONSTANT_READ_NODE = 40,
|
690
|
+
|
691
|
+
/** ConstantTargetNode */
|
252
692
|
PM_CONSTANT_TARGET_NODE = 41,
|
693
|
+
|
694
|
+
/** ConstantWriteNode */
|
253
695
|
PM_CONSTANT_WRITE_NODE = 42,
|
696
|
+
|
697
|
+
/** DefNode */
|
254
698
|
PM_DEF_NODE = 43,
|
699
|
+
|
700
|
+
/** DefinedNode */
|
255
701
|
PM_DEFINED_NODE = 44,
|
702
|
+
|
703
|
+
/** ElseNode */
|
256
704
|
PM_ELSE_NODE = 45,
|
705
|
+
|
706
|
+
/** EmbeddedStatementsNode */
|
257
707
|
PM_EMBEDDED_STATEMENTS_NODE = 46,
|
708
|
+
|
709
|
+
/** EmbeddedVariableNode */
|
258
710
|
PM_EMBEDDED_VARIABLE_NODE = 47,
|
711
|
+
|
712
|
+
/** EnsureNode */
|
259
713
|
PM_ENSURE_NODE = 48,
|
714
|
+
|
715
|
+
/** FalseNode */
|
260
716
|
PM_FALSE_NODE = 49,
|
717
|
+
|
718
|
+
/** FindPatternNode */
|
261
719
|
PM_FIND_PATTERN_NODE = 50,
|
720
|
+
|
721
|
+
/** FlipFlopNode */
|
262
722
|
PM_FLIP_FLOP_NODE = 51,
|
723
|
+
|
724
|
+
/** FloatNode */
|
263
725
|
PM_FLOAT_NODE = 52,
|
726
|
+
|
727
|
+
/** ForNode */
|
264
728
|
PM_FOR_NODE = 53,
|
729
|
+
|
730
|
+
/** ForwardingArgumentsNode */
|
265
731
|
PM_FORWARDING_ARGUMENTS_NODE = 54,
|
732
|
+
|
733
|
+
/** ForwardingParameterNode */
|
266
734
|
PM_FORWARDING_PARAMETER_NODE = 55,
|
735
|
+
|
736
|
+
/** ForwardingSuperNode */
|
267
737
|
PM_FORWARDING_SUPER_NODE = 56,
|
738
|
+
|
739
|
+
/** GlobalVariableAndWriteNode */
|
268
740
|
PM_GLOBAL_VARIABLE_AND_WRITE_NODE = 57,
|
741
|
+
|
742
|
+
/** GlobalVariableOperatorWriteNode */
|
269
743
|
PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE = 58,
|
744
|
+
|
745
|
+
/** GlobalVariableOrWriteNode */
|
270
746
|
PM_GLOBAL_VARIABLE_OR_WRITE_NODE = 59,
|
747
|
+
|
748
|
+
/** GlobalVariableReadNode */
|
271
749
|
PM_GLOBAL_VARIABLE_READ_NODE = 60,
|
750
|
+
|
751
|
+
/** GlobalVariableTargetNode */
|
272
752
|
PM_GLOBAL_VARIABLE_TARGET_NODE = 61,
|
753
|
+
|
754
|
+
/** GlobalVariableWriteNode */
|
273
755
|
PM_GLOBAL_VARIABLE_WRITE_NODE = 62,
|
756
|
+
|
757
|
+
/** HashNode */
|
274
758
|
PM_HASH_NODE = 63,
|
759
|
+
|
760
|
+
/** HashPatternNode */
|
275
761
|
PM_HASH_PATTERN_NODE = 64,
|
762
|
+
|
763
|
+
/** IfNode */
|
276
764
|
PM_IF_NODE = 65,
|
765
|
+
|
766
|
+
/** ImaginaryNode */
|
277
767
|
PM_IMAGINARY_NODE = 66,
|
768
|
+
|
769
|
+
/** ImplicitNode */
|
278
770
|
PM_IMPLICIT_NODE = 67,
|
771
|
+
|
772
|
+
/** InNode */
|
279
773
|
PM_IN_NODE = 68,
|
774
|
+
|
775
|
+
/** IndexAndWriteNode */
|
280
776
|
PM_INDEX_AND_WRITE_NODE = 69,
|
777
|
+
|
778
|
+
/** IndexOperatorWriteNode */
|
281
779
|
PM_INDEX_OPERATOR_WRITE_NODE = 70,
|
780
|
+
|
781
|
+
/** IndexOrWriteNode */
|
282
782
|
PM_INDEX_OR_WRITE_NODE = 71,
|
783
|
+
|
784
|
+
/** InstanceVariableAndWriteNode */
|
283
785
|
PM_INSTANCE_VARIABLE_AND_WRITE_NODE = 72,
|
786
|
+
|
787
|
+
/** InstanceVariableOperatorWriteNode */
|
284
788
|
PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE = 73,
|
789
|
+
|
790
|
+
/** InstanceVariableOrWriteNode */
|
285
791
|
PM_INSTANCE_VARIABLE_OR_WRITE_NODE = 74,
|
792
|
+
|
793
|
+
/** InstanceVariableReadNode */
|
286
794
|
PM_INSTANCE_VARIABLE_READ_NODE = 75,
|
795
|
+
|
796
|
+
/** InstanceVariableTargetNode */
|
287
797
|
PM_INSTANCE_VARIABLE_TARGET_NODE = 76,
|
798
|
+
|
799
|
+
/** InstanceVariableWriteNode */
|
288
800
|
PM_INSTANCE_VARIABLE_WRITE_NODE = 77,
|
801
|
+
|
802
|
+
/** IntegerNode */
|
289
803
|
PM_INTEGER_NODE = 78,
|
804
|
+
|
805
|
+
/** InterpolatedMatchLastLineNode */
|
290
806
|
PM_INTERPOLATED_MATCH_LAST_LINE_NODE = 79,
|
807
|
+
|
808
|
+
/** InterpolatedRegularExpressionNode */
|
291
809
|
PM_INTERPOLATED_REGULAR_EXPRESSION_NODE = 80,
|
810
|
+
|
811
|
+
/** InterpolatedStringNode */
|
292
812
|
PM_INTERPOLATED_STRING_NODE = 81,
|
813
|
+
|
814
|
+
/** InterpolatedSymbolNode */
|
293
815
|
PM_INTERPOLATED_SYMBOL_NODE = 82,
|
816
|
+
|
817
|
+
/** InterpolatedXStringNode */
|
294
818
|
PM_INTERPOLATED_X_STRING_NODE = 83,
|
819
|
+
|
820
|
+
/** KeywordHashNode */
|
295
821
|
PM_KEYWORD_HASH_NODE = 84,
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
822
|
+
|
823
|
+
/** KeywordRestParameterNode */
|
824
|
+
PM_KEYWORD_REST_PARAMETER_NODE = 85,
|
825
|
+
|
826
|
+
/** LambdaNode */
|
827
|
+
PM_LAMBDA_NODE = 86,
|
828
|
+
|
829
|
+
/** LocalVariableAndWriteNode */
|
830
|
+
PM_LOCAL_VARIABLE_AND_WRITE_NODE = 87,
|
831
|
+
|
832
|
+
/** LocalVariableOperatorWriteNode */
|
833
|
+
PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE = 88,
|
834
|
+
|
835
|
+
/** LocalVariableOrWriteNode */
|
836
|
+
PM_LOCAL_VARIABLE_OR_WRITE_NODE = 89,
|
837
|
+
|
838
|
+
/** LocalVariableReadNode */
|
839
|
+
PM_LOCAL_VARIABLE_READ_NODE = 90,
|
840
|
+
|
841
|
+
/** LocalVariableTargetNode */
|
842
|
+
PM_LOCAL_VARIABLE_TARGET_NODE = 91,
|
843
|
+
|
844
|
+
/** LocalVariableWriteNode */
|
845
|
+
PM_LOCAL_VARIABLE_WRITE_NODE = 92,
|
846
|
+
|
847
|
+
/** MatchLastLineNode */
|
848
|
+
PM_MATCH_LAST_LINE_NODE = 93,
|
849
|
+
|
850
|
+
/** MatchPredicateNode */
|
851
|
+
PM_MATCH_PREDICATE_NODE = 94,
|
852
|
+
|
853
|
+
/** MatchRequiredNode */
|
854
|
+
PM_MATCH_REQUIRED_NODE = 95,
|
855
|
+
|
856
|
+
/** MatchWriteNode */
|
857
|
+
PM_MATCH_WRITE_NODE = 96,
|
858
|
+
|
859
|
+
/** MissingNode */
|
860
|
+
PM_MISSING_NODE = 97,
|
861
|
+
|
862
|
+
/** ModuleNode */
|
863
|
+
PM_MODULE_NODE = 98,
|
864
|
+
|
865
|
+
/** MultiTargetNode */
|
866
|
+
PM_MULTI_TARGET_NODE = 99,
|
867
|
+
|
868
|
+
/** MultiWriteNode */
|
869
|
+
PM_MULTI_WRITE_NODE = 100,
|
870
|
+
|
871
|
+
/** NextNode */
|
872
|
+
PM_NEXT_NODE = 101,
|
873
|
+
|
874
|
+
/** NilNode */
|
875
|
+
PM_NIL_NODE = 102,
|
876
|
+
|
877
|
+
/** NoKeywordsParameterNode */
|
878
|
+
PM_NO_KEYWORDS_PARAMETER_NODE = 103,
|
879
|
+
|
880
|
+
/** NumberedReferenceReadNode */
|
881
|
+
PM_NUMBERED_REFERENCE_READ_NODE = 104,
|
882
|
+
|
883
|
+
/** OptionalKeywordParameterNode */
|
884
|
+
PM_OPTIONAL_KEYWORD_PARAMETER_NODE = 105,
|
885
|
+
|
886
|
+
/** OptionalParameterNode */
|
317
887
|
PM_OPTIONAL_PARAMETER_NODE = 106,
|
888
|
+
|
889
|
+
/** OrNode */
|
318
890
|
PM_OR_NODE = 107,
|
891
|
+
|
892
|
+
/** ParametersNode */
|
319
893
|
PM_PARAMETERS_NODE = 108,
|
894
|
+
|
895
|
+
/** ParenthesesNode */
|
320
896
|
PM_PARENTHESES_NODE = 109,
|
897
|
+
|
898
|
+
/** PinnedExpressionNode */
|
321
899
|
PM_PINNED_EXPRESSION_NODE = 110,
|
900
|
+
|
901
|
+
/** PinnedVariableNode */
|
322
902
|
PM_PINNED_VARIABLE_NODE = 111,
|
903
|
+
|
904
|
+
/** PostExecutionNode */
|
323
905
|
PM_POST_EXECUTION_NODE = 112,
|
906
|
+
|
907
|
+
/** PreExecutionNode */
|
324
908
|
PM_PRE_EXECUTION_NODE = 113,
|
909
|
+
|
910
|
+
/** ProgramNode */
|
325
911
|
PM_PROGRAM_NODE = 114,
|
912
|
+
|
913
|
+
/** RangeNode */
|
326
914
|
PM_RANGE_NODE = 115,
|
915
|
+
|
916
|
+
/** RationalNode */
|
327
917
|
PM_RATIONAL_NODE = 116,
|
918
|
+
|
919
|
+
/** RedoNode */
|
328
920
|
PM_REDO_NODE = 117,
|
921
|
+
|
922
|
+
/** RegularExpressionNode */
|
329
923
|
PM_REGULAR_EXPRESSION_NODE = 118,
|
330
|
-
|
924
|
+
|
925
|
+
/** RequiredKeywordParameterNode */
|
926
|
+
PM_REQUIRED_KEYWORD_PARAMETER_NODE = 119,
|
927
|
+
|
928
|
+
/** RequiredParameterNode */
|
331
929
|
PM_REQUIRED_PARAMETER_NODE = 120,
|
930
|
+
|
931
|
+
/** RescueModifierNode */
|
332
932
|
PM_RESCUE_MODIFIER_NODE = 121,
|
933
|
+
|
934
|
+
/** RescueNode */
|
333
935
|
PM_RESCUE_NODE = 122,
|
936
|
+
|
937
|
+
/** RestParameterNode */
|
334
938
|
PM_REST_PARAMETER_NODE = 123,
|
939
|
+
|
940
|
+
/** RetryNode */
|
335
941
|
PM_RETRY_NODE = 124,
|
942
|
+
|
943
|
+
/** ReturnNode */
|
336
944
|
PM_RETURN_NODE = 125,
|
945
|
+
|
946
|
+
/** SelfNode */
|
337
947
|
PM_SELF_NODE = 126,
|
948
|
+
|
949
|
+
/** SingletonClassNode */
|
338
950
|
PM_SINGLETON_CLASS_NODE = 127,
|
951
|
+
|
952
|
+
/** SourceEncodingNode */
|
339
953
|
PM_SOURCE_ENCODING_NODE = 128,
|
954
|
+
|
955
|
+
/** SourceFileNode */
|
340
956
|
PM_SOURCE_FILE_NODE = 129,
|
957
|
+
|
958
|
+
/** SourceLineNode */
|
341
959
|
PM_SOURCE_LINE_NODE = 130,
|
960
|
+
|
961
|
+
/** SplatNode */
|
342
962
|
PM_SPLAT_NODE = 131,
|
963
|
+
|
964
|
+
/** StatementsNode */
|
343
965
|
PM_STATEMENTS_NODE = 132,
|
966
|
+
|
967
|
+
/** StringConcatNode */
|
344
968
|
PM_STRING_CONCAT_NODE = 133,
|
969
|
+
|
970
|
+
/** StringNode */
|
345
971
|
PM_STRING_NODE = 134,
|
972
|
+
|
973
|
+
/** SuperNode */
|
346
974
|
PM_SUPER_NODE = 135,
|
975
|
+
|
976
|
+
/** SymbolNode */
|
347
977
|
PM_SYMBOL_NODE = 136,
|
978
|
+
|
979
|
+
/** TrueNode */
|
348
980
|
PM_TRUE_NODE = 137,
|
981
|
+
|
982
|
+
/** UndefNode */
|
349
983
|
PM_UNDEF_NODE = 138,
|
984
|
+
|
985
|
+
/** UnlessNode */
|
350
986
|
PM_UNLESS_NODE = 139,
|
987
|
+
|
988
|
+
/** UntilNode */
|
351
989
|
PM_UNTIL_NODE = 140,
|
990
|
+
|
991
|
+
/** WhenNode */
|
352
992
|
PM_WHEN_NODE = 141,
|
993
|
+
|
994
|
+
/** WhileNode */
|
353
995
|
PM_WHILE_NODE = 142,
|
996
|
+
|
997
|
+
/** XStringNode */
|
354
998
|
PM_X_STRING_NODE = 143,
|
999
|
+
|
1000
|
+
/** YieldNode */
|
355
1001
|
PM_YIELD_NODE = 144,
|
1002
|
+
|
1003
|
+
/** A special kind of node used for compilation. */
|
356
1004
|
PM_SCOPE_NODE
|
357
1005
|
};
|
358
1006
|
|
1007
|
+
/**
|
1008
|
+
* This is the type of node embedded in the node struct. We explicitly control
|
1009
|
+
* the size of it here to avoid having the variable-width enum.
|
1010
|
+
*/
|
359
1011
|
typedef uint16_t pm_node_type_t;
|
1012
|
+
|
1013
|
+
/**
|
1014
|
+
* These are the flags embedded in the node struct. We explicitly control the
|
1015
|
+
* size of it here to avoid having the variable-width enum.
|
1016
|
+
*/
|
360
1017
|
typedef uint16_t pm_node_flags_t;
|
361
1018
|
|
362
|
-
|
363
|
-
|
1019
|
+
/**
|
1020
|
+
* We store the flags enum in every node in the tree. Some flags are common to
|
1021
|
+
* all nodes (the ones listed below). Others are specific to certain node types.
|
1022
|
+
*/
|
364
1023
|
#define PM_NODE_FLAG_BITS (sizeof(pm_node_flags_t) * 8)
|
1024
|
+
|
365
1025
|
static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = (1 << (PM_NODE_FLAG_BITS - 1));
|
366
1026
|
static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = (1 << (PM_NODE_FLAG_BITS - 2));
|
367
1027
|
static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = (1 << (PM_NODE_FLAG_BITS - 1)) | (1 << (PM_NODE_FLAG_BITS - 2));
|
368
1028
|
|
369
|
-
|
370
|
-
|
1029
|
+
/**
|
1030
|
+
* Cast the type to an enum to allow the compiler to provide exhaustiveness
|
1031
|
+
* checking.
|
1032
|
+
*/
|
1033
|
+
#define PM_NODE_TYPE(node) ((enum pm_node_type) node->type)
|
1034
|
+
|
1035
|
+
/**
|
1036
|
+
* Return true if the type of the given node matches the given type.
|
1037
|
+
*/
|
371
1038
|
#define PM_NODE_TYPE_P(node, type) (PM_NODE_TYPE(node) == (type))
|
372
1039
|
|
373
|
-
|
1040
|
+
/**
|
1041
|
+
* This is the base structure that represents a node in the syntax tree. It is
|
1042
|
+
* embedded into every node type.
|
1043
|
+
*/
|
374
1044
|
typedef struct pm_node {
|
375
|
-
|
376
|
-
|
1045
|
+
/**
|
1046
|
+
* This represents the type of the node. It somewhat maps to the nodes that
|
1047
|
+
* existed in the original grammar and ripper, but it's not a 1:1 mapping.
|
1048
|
+
*/
|
377
1049
|
pm_node_type_t type;
|
378
1050
|
|
379
|
-
|
1051
|
+
/**
|
1052
|
+
* This represents any flags on the node. Some are common to all nodes, and
|
1053
|
+
* some are specific to the type of node.
|
1054
|
+
*/
|
380
1055
|
pm_node_flags_t flags;
|
381
1056
|
|
382
|
-
|
383
|
-
|
1057
|
+
/**
|
1058
|
+
* This is the location of the node in the source. It's a range of bytes
|
1059
|
+
* containing a start and an end.
|
1060
|
+
*/
|
384
1061
|
pm_location_t location;
|
385
1062
|
} pm_node_t;
|
386
1063
|
|
387
|
-
|
388
|
-
|
389
|
-
|
1064
|
+
/**
|
1065
|
+
* AliasGlobalVariableNode
|
1066
|
+
*
|
1067
|
+
* Type: PM_ALIAS_GLOBAL_VARIABLE_NODE
|
1068
|
+
*
|
1069
|
+
* @extends pm_node_t
|
1070
|
+
*/
|
390
1071
|
typedef struct pm_alias_global_variable_node {
|
1072
|
+
/** The embedded base node. */
|
391
1073
|
pm_node_t base;
|
1074
|
+
|
1075
|
+
/** AliasGlobalVariableNode#new_name */
|
392
1076
|
struct pm_node *new_name;
|
1077
|
+
|
1078
|
+
/** AliasGlobalVariableNode#old_name */
|
393
1079
|
struct pm_node *old_name;
|
1080
|
+
|
1081
|
+
/** AliasGlobalVariableNode#keyword_loc */
|
394
1082
|
pm_location_t keyword_loc;
|
395
1083
|
} pm_alias_global_variable_node_t;
|
396
1084
|
|
397
|
-
|
398
|
-
|
399
|
-
|
1085
|
+
/**
|
1086
|
+
* AliasMethodNode
|
1087
|
+
*
|
1088
|
+
* Type: PM_ALIAS_METHOD_NODE
|
1089
|
+
*
|
1090
|
+
* @extends pm_node_t
|
1091
|
+
*/
|
400
1092
|
typedef struct pm_alias_method_node {
|
1093
|
+
/** The embedded base node. */
|
401
1094
|
pm_node_t base;
|
1095
|
+
|
1096
|
+
/** AliasMethodNode#new_name */
|
402
1097
|
struct pm_node *new_name;
|
1098
|
+
|
1099
|
+
/** AliasMethodNode#old_name */
|
403
1100
|
struct pm_node *old_name;
|
1101
|
+
|
1102
|
+
/** AliasMethodNode#keyword_loc */
|
404
1103
|
pm_location_t keyword_loc;
|
405
1104
|
} pm_alias_method_node_t;
|
406
1105
|
|
407
|
-
|
408
|
-
|
409
|
-
|
1106
|
+
/**
|
1107
|
+
* AlternationPatternNode
|
1108
|
+
*
|
1109
|
+
* Type: PM_ALTERNATION_PATTERN_NODE
|
1110
|
+
*
|
1111
|
+
* @extends pm_node_t
|
1112
|
+
*/
|
410
1113
|
typedef struct pm_alternation_pattern_node {
|
1114
|
+
/** The embedded base node. */
|
411
1115
|
pm_node_t base;
|
1116
|
+
|
1117
|
+
/** AlternationPatternNode#left */
|
412
1118
|
struct pm_node *left;
|
1119
|
+
|
1120
|
+
/** AlternationPatternNode#right */
|
413
1121
|
struct pm_node *right;
|
1122
|
+
|
1123
|
+
/** AlternationPatternNode#operator_loc */
|
414
1124
|
pm_location_t operator_loc;
|
415
1125
|
} pm_alternation_pattern_node_t;
|
416
1126
|
|
417
|
-
|
418
|
-
|
419
|
-
|
1127
|
+
/**
|
1128
|
+
* AndNode
|
1129
|
+
*
|
1130
|
+
* Type: PM_AND_NODE
|
1131
|
+
*
|
1132
|
+
* @extends pm_node_t
|
1133
|
+
*/
|
420
1134
|
typedef struct pm_and_node {
|
1135
|
+
/** The embedded base node. */
|
421
1136
|
pm_node_t base;
|
1137
|
+
|
1138
|
+
/** AndNode#left */
|
422
1139
|
struct pm_node *left;
|
1140
|
+
|
1141
|
+
/** AndNode#right */
|
423
1142
|
struct pm_node *right;
|
1143
|
+
|
1144
|
+
/** AndNode#operator_loc */
|
424
1145
|
pm_location_t operator_loc;
|
425
1146
|
} pm_and_node_t;
|
426
1147
|
|
427
|
-
|
428
|
-
|
429
|
-
|
1148
|
+
/**
|
1149
|
+
* ArgumentsNode
|
1150
|
+
*
|
1151
|
+
* Type: PM_ARGUMENTS_NODE
|
1152
|
+
* Flags:
|
1153
|
+
* PM_ARGUMENTS_NODE_FLAGS_KEYWORD_SPLAT
|
1154
|
+
*
|
1155
|
+
* @extends pm_node_t
|
1156
|
+
*/
|
430
1157
|
typedef struct pm_arguments_node {
|
1158
|
+
/** The embedded base node. */
|
431
1159
|
pm_node_t base;
|
1160
|
+
|
1161
|
+
/** ArgumentsNode#arguments */
|
432
1162
|
struct pm_node_list arguments;
|
433
1163
|
} pm_arguments_node_t;
|
434
1164
|
|
435
|
-
|
436
|
-
|
437
|
-
|
1165
|
+
/**
|
1166
|
+
* ArrayNode
|
1167
|
+
*
|
1168
|
+
* Type: PM_ARRAY_NODE
|
1169
|
+
*
|
1170
|
+
* @extends pm_node_t
|
1171
|
+
*/
|
438
1172
|
typedef struct pm_array_node {
|
1173
|
+
/** The embedded base node. */
|
439
1174
|
pm_node_t base;
|
1175
|
+
|
1176
|
+
/** ArrayNode#elements */
|
440
1177
|
struct pm_node_list elements;
|
1178
|
+
|
1179
|
+
/** ArrayNode#opening_loc */
|
441
1180
|
pm_location_t opening_loc;
|
1181
|
+
|
1182
|
+
/** ArrayNode#closing_loc */
|
442
1183
|
pm_location_t closing_loc;
|
443
1184
|
} pm_array_node_t;
|
444
1185
|
|
445
|
-
|
446
|
-
|
447
|
-
|
1186
|
+
/**
|
1187
|
+
* ArrayPatternNode
|
1188
|
+
*
|
1189
|
+
* Type: PM_ARRAY_PATTERN_NODE
|
1190
|
+
*
|
1191
|
+
* @extends pm_node_t
|
1192
|
+
*/
|
448
1193
|
typedef struct pm_array_pattern_node {
|
1194
|
+
/** The embedded base node. */
|
449
1195
|
pm_node_t base;
|
1196
|
+
|
1197
|
+
/** ArrayPatternNode#constant */
|
450
1198
|
struct pm_node *constant;
|
1199
|
+
|
1200
|
+
/** ArrayPatternNode#requireds */
|
451
1201
|
struct pm_node_list requireds;
|
1202
|
+
|
1203
|
+
/** ArrayPatternNode#rest */
|
452
1204
|
struct pm_node *rest;
|
1205
|
+
|
1206
|
+
/** ArrayPatternNode#posts */
|
453
1207
|
struct pm_node_list posts;
|
1208
|
+
|
1209
|
+
/** ArrayPatternNode#opening_loc */
|
454
1210
|
pm_location_t opening_loc;
|
1211
|
+
|
1212
|
+
/** ArrayPatternNode#closing_loc */
|
455
1213
|
pm_location_t closing_loc;
|
456
1214
|
} pm_array_pattern_node_t;
|
457
1215
|
|
458
|
-
|
459
|
-
|
460
|
-
|
1216
|
+
/**
|
1217
|
+
* AssocNode
|
1218
|
+
*
|
1219
|
+
* Type: PM_ASSOC_NODE
|
1220
|
+
*
|
1221
|
+
* @extends pm_node_t
|
1222
|
+
*/
|
461
1223
|
typedef struct pm_assoc_node {
|
1224
|
+
/** The embedded base node. */
|
462
1225
|
pm_node_t base;
|
1226
|
+
|
1227
|
+
/** AssocNode#key */
|
463
1228
|
struct pm_node *key;
|
1229
|
+
|
1230
|
+
/** AssocNode#value */
|
464
1231
|
struct pm_node *value;
|
1232
|
+
|
1233
|
+
/** AssocNode#operator_loc */
|
465
1234
|
pm_location_t operator_loc;
|
466
1235
|
} pm_assoc_node_t;
|
467
1236
|
|
468
|
-
|
469
|
-
|
470
|
-
|
1237
|
+
/**
|
1238
|
+
* AssocSplatNode
|
1239
|
+
*
|
1240
|
+
* Type: PM_ASSOC_SPLAT_NODE
|
1241
|
+
*
|
1242
|
+
* @extends pm_node_t
|
1243
|
+
*/
|
471
1244
|
typedef struct pm_assoc_splat_node {
|
1245
|
+
/** The embedded base node. */
|
472
1246
|
pm_node_t base;
|
1247
|
+
|
1248
|
+
/** AssocSplatNode#value */
|
473
1249
|
struct pm_node *value;
|
1250
|
+
|
1251
|
+
/** AssocSplatNode#operator_loc */
|
474
1252
|
pm_location_t operator_loc;
|
475
1253
|
} pm_assoc_splat_node_t;
|
476
1254
|
|
477
|
-
|
478
|
-
|
479
|
-
|
1255
|
+
/**
|
1256
|
+
* BackReferenceReadNode
|
1257
|
+
*
|
1258
|
+
* Type: PM_BACK_REFERENCE_READ_NODE
|
1259
|
+
*
|
1260
|
+
* @extends pm_node_t
|
1261
|
+
*/
|
480
1262
|
typedef struct pm_back_reference_read_node {
|
1263
|
+
/** The embedded base node. */
|
481
1264
|
pm_node_t base;
|
1265
|
+
|
1266
|
+
/** BackReferenceReadNode#name */
|
482
1267
|
pm_constant_id_t name;
|
483
1268
|
} pm_back_reference_read_node_t;
|
484
1269
|
|
485
|
-
|
486
|
-
|
487
|
-
|
1270
|
+
/**
|
1271
|
+
* BeginNode
|
1272
|
+
*
|
1273
|
+
* Type: PM_BEGIN_NODE
|
1274
|
+
*
|
1275
|
+
* @extends pm_node_t
|
1276
|
+
*/
|
488
1277
|
typedef struct pm_begin_node {
|
1278
|
+
/** The embedded base node. */
|
489
1279
|
pm_node_t base;
|
1280
|
+
|
1281
|
+
/** BeginNode#begin_keyword_loc */
|
490
1282
|
pm_location_t begin_keyword_loc;
|
1283
|
+
|
1284
|
+
/** BeginNode#statements */
|
491
1285
|
struct pm_statements_node *statements;
|
1286
|
+
|
1287
|
+
/** BeginNode#rescue_clause */
|
492
1288
|
struct pm_rescue_node *rescue_clause;
|
1289
|
+
|
1290
|
+
/** BeginNode#else_clause */
|
493
1291
|
struct pm_else_node *else_clause;
|
1292
|
+
|
1293
|
+
/** BeginNode#ensure_clause */
|
494
1294
|
struct pm_ensure_node *ensure_clause;
|
1295
|
+
|
1296
|
+
/** BeginNode#end_keyword_loc */
|
495
1297
|
pm_location_t end_keyword_loc;
|
496
1298
|
} pm_begin_node_t;
|
497
1299
|
|
498
|
-
|
499
|
-
|
500
|
-
|
1300
|
+
/**
|
1301
|
+
* BlockArgumentNode
|
1302
|
+
*
|
1303
|
+
* Type: PM_BLOCK_ARGUMENT_NODE
|
1304
|
+
*
|
1305
|
+
* @extends pm_node_t
|
1306
|
+
*/
|
501
1307
|
typedef struct pm_block_argument_node {
|
1308
|
+
/** The embedded base node. */
|
502
1309
|
pm_node_t base;
|
1310
|
+
|
1311
|
+
/** BlockArgumentNode#expression */
|
503
1312
|
struct pm_node *expression;
|
1313
|
+
|
1314
|
+
/** BlockArgumentNode#operator_loc */
|
504
1315
|
pm_location_t operator_loc;
|
505
1316
|
} pm_block_argument_node_t;
|
506
1317
|
|
507
|
-
|
508
|
-
|
509
|
-
|
1318
|
+
/**
|
1319
|
+
* BlockLocalVariableNode
|
1320
|
+
*
|
1321
|
+
* Type: PM_BLOCK_LOCAL_VARIABLE_NODE
|
1322
|
+
*
|
1323
|
+
* @extends pm_node_t
|
1324
|
+
*/
|
510
1325
|
typedef struct pm_block_local_variable_node {
|
1326
|
+
/** The embedded base node. */
|
511
1327
|
pm_node_t base;
|
1328
|
+
|
1329
|
+
/** BlockLocalVariableNode#name */
|
512
1330
|
pm_constant_id_t name;
|
513
1331
|
} pm_block_local_variable_node_t;
|
514
1332
|
|
515
|
-
|
516
|
-
|
517
|
-
|
1333
|
+
/**
|
1334
|
+
* BlockNode
|
1335
|
+
*
|
1336
|
+
* Type: PM_BLOCK_NODE
|
1337
|
+
*
|
1338
|
+
* @extends pm_node_t
|
1339
|
+
*/
|
518
1340
|
typedef struct pm_block_node {
|
1341
|
+
/** The embedded base node. */
|
519
1342
|
pm_node_t base;
|
1343
|
+
|
1344
|
+
/** BlockNode#locals */
|
520
1345
|
pm_constant_id_list_t locals;
|
1346
|
+
|
1347
|
+
/** BlockNode#parameters */
|
521
1348
|
struct pm_block_parameters_node *parameters;
|
1349
|
+
|
1350
|
+
/** BlockNode#body */
|
522
1351
|
struct pm_node *body;
|
1352
|
+
|
1353
|
+
/** BlockNode#opening_loc */
|
523
1354
|
pm_location_t opening_loc;
|
1355
|
+
|
1356
|
+
/** BlockNode#closing_loc */
|
524
1357
|
pm_location_t closing_loc;
|
525
1358
|
} pm_block_node_t;
|
526
1359
|
|
527
|
-
|
528
|
-
|
529
|
-
|
1360
|
+
/**
|
1361
|
+
* BlockParameterNode
|
1362
|
+
*
|
1363
|
+
* Type: PM_BLOCK_PARAMETER_NODE
|
1364
|
+
*
|
1365
|
+
* @extends pm_node_t
|
1366
|
+
*/
|
530
1367
|
typedef struct pm_block_parameter_node {
|
1368
|
+
/** The embedded base node. */
|
531
1369
|
pm_node_t base;
|
1370
|
+
|
1371
|
+
/** BlockParameterNode#name */
|
532
1372
|
pm_constant_id_t name;
|
1373
|
+
|
1374
|
+
/** BlockParameterNode#name_loc */
|
533
1375
|
pm_location_t name_loc;
|
1376
|
+
|
1377
|
+
/** BlockParameterNode#operator_loc */
|
534
1378
|
pm_location_t operator_loc;
|
535
1379
|
} pm_block_parameter_node_t;
|
536
1380
|
|
537
|
-
|
538
|
-
|
539
|
-
|
1381
|
+
/**
|
1382
|
+
* BlockParametersNode
|
1383
|
+
*
|
1384
|
+
* Type: PM_BLOCK_PARAMETERS_NODE
|
1385
|
+
*
|
1386
|
+
* @extends pm_node_t
|
1387
|
+
*/
|
540
1388
|
typedef struct pm_block_parameters_node {
|
1389
|
+
/** The embedded base node. */
|
541
1390
|
pm_node_t base;
|
1391
|
+
|
1392
|
+
/** BlockParametersNode#parameters */
|
542
1393
|
struct pm_parameters_node *parameters;
|
1394
|
+
|
1395
|
+
/** BlockParametersNode#locals */
|
543
1396
|
struct pm_node_list locals;
|
1397
|
+
|
1398
|
+
/** BlockParametersNode#opening_loc */
|
544
1399
|
pm_location_t opening_loc;
|
1400
|
+
|
1401
|
+
/** BlockParametersNode#closing_loc */
|
545
1402
|
pm_location_t closing_loc;
|
546
1403
|
} pm_block_parameters_node_t;
|
547
1404
|
|
548
|
-
|
549
|
-
|
550
|
-
|
1405
|
+
/**
|
1406
|
+
* BreakNode
|
1407
|
+
*
|
1408
|
+
* Type: PM_BREAK_NODE
|
1409
|
+
*
|
1410
|
+
* @extends pm_node_t
|
1411
|
+
*/
|
551
1412
|
typedef struct pm_break_node {
|
1413
|
+
/** The embedded base node. */
|
552
1414
|
pm_node_t base;
|
1415
|
+
|
1416
|
+
/** BreakNode#arguments */
|
553
1417
|
struct pm_arguments_node *arguments;
|
1418
|
+
|
1419
|
+
/** BreakNode#keyword_loc */
|
554
1420
|
pm_location_t keyword_loc;
|
555
1421
|
} pm_break_node_t;
|
556
1422
|
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
1423
|
+
/**
|
1424
|
+
* CallAndWriteNode
|
1425
|
+
*
|
1426
|
+
* Type: PM_CALL_AND_WRITE_NODE
|
1427
|
+
* Flags:
|
1428
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1429
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1430
|
+
*
|
1431
|
+
* @extends pm_node_t
|
1432
|
+
*/
|
563
1433
|
typedef struct pm_call_and_write_node {
|
1434
|
+
/** The embedded base node. */
|
564
1435
|
pm_node_t base;
|
1436
|
+
|
1437
|
+
/** CallAndWriteNode#receiver */
|
565
1438
|
struct pm_node *receiver;
|
1439
|
+
|
1440
|
+
/** CallAndWriteNode#call_operator_loc */
|
566
1441
|
pm_location_t call_operator_loc;
|
1442
|
+
|
1443
|
+
/** CallAndWriteNode#message_loc */
|
567
1444
|
pm_location_t message_loc;
|
1445
|
+
|
1446
|
+
/** CallAndWriteNode#read_name */
|
568
1447
|
pm_constant_id_t read_name;
|
1448
|
+
|
1449
|
+
/** CallAndWriteNode#write_name */
|
569
1450
|
pm_constant_id_t write_name;
|
1451
|
+
|
1452
|
+
/** CallAndWriteNode#operator_loc */
|
570
1453
|
pm_location_t operator_loc;
|
1454
|
+
|
1455
|
+
/** CallAndWriteNode#value */
|
571
1456
|
struct pm_node *value;
|
572
1457
|
} pm_call_and_write_node_t;
|
573
1458
|
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
1459
|
+
/**
|
1460
|
+
* CallNode
|
1461
|
+
*
|
1462
|
+
* Type: PM_CALL_NODE
|
1463
|
+
* Flags:
|
1464
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1465
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1466
|
+
*
|
1467
|
+
* @extends pm_node_t
|
1468
|
+
*/
|
580
1469
|
typedef struct pm_call_node {
|
1470
|
+
/** The embedded base node. */
|
581
1471
|
pm_node_t base;
|
1472
|
+
|
1473
|
+
/** CallNode#receiver */
|
582
1474
|
struct pm_node *receiver;
|
1475
|
+
|
1476
|
+
/** CallNode#call_operator_loc */
|
583
1477
|
pm_location_t call_operator_loc;
|
1478
|
+
|
1479
|
+
/** CallNode#message_loc */
|
584
1480
|
pm_location_t message_loc;
|
1481
|
+
|
1482
|
+
/** CallNode#opening_loc */
|
585
1483
|
pm_location_t opening_loc;
|
1484
|
+
|
1485
|
+
/** CallNode#arguments */
|
586
1486
|
struct pm_arguments_node *arguments;
|
1487
|
+
|
1488
|
+
/** CallNode#closing_loc */
|
587
1489
|
pm_location_t closing_loc;
|
1490
|
+
|
1491
|
+
/** CallNode#block */
|
588
1492
|
struct pm_node *block;
|
1493
|
+
|
1494
|
+
/** CallNode#name */
|
589
1495
|
pm_constant_id_t name;
|
590
1496
|
} pm_call_node_t;
|
591
1497
|
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
1498
|
+
/**
|
1499
|
+
* CallOperatorWriteNode
|
1500
|
+
*
|
1501
|
+
* Type: PM_CALL_OPERATOR_WRITE_NODE
|
1502
|
+
* Flags:
|
1503
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1504
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1505
|
+
*
|
1506
|
+
* @extends pm_node_t
|
1507
|
+
*/
|
598
1508
|
typedef struct pm_call_operator_write_node {
|
1509
|
+
/** The embedded base node. */
|
599
1510
|
pm_node_t base;
|
1511
|
+
|
1512
|
+
/** CallOperatorWriteNode#receiver */
|
600
1513
|
struct pm_node *receiver;
|
1514
|
+
|
1515
|
+
/** CallOperatorWriteNode#call_operator_loc */
|
601
1516
|
pm_location_t call_operator_loc;
|
1517
|
+
|
1518
|
+
/** CallOperatorWriteNode#message_loc */
|
602
1519
|
pm_location_t message_loc;
|
1520
|
+
|
1521
|
+
/** CallOperatorWriteNode#read_name */
|
603
1522
|
pm_constant_id_t read_name;
|
1523
|
+
|
1524
|
+
/** CallOperatorWriteNode#write_name */
|
604
1525
|
pm_constant_id_t write_name;
|
1526
|
+
|
1527
|
+
/** CallOperatorWriteNode#operator */
|
605
1528
|
pm_constant_id_t operator;
|
1529
|
+
|
1530
|
+
/** CallOperatorWriteNode#operator_loc */
|
606
1531
|
pm_location_t operator_loc;
|
1532
|
+
|
1533
|
+
/** CallOperatorWriteNode#value */
|
607
1534
|
struct pm_node *value;
|
608
1535
|
} pm_call_operator_write_node_t;
|
609
1536
|
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
1537
|
+
/**
|
1538
|
+
* CallOrWriteNode
|
1539
|
+
*
|
1540
|
+
* Type: PM_CALL_OR_WRITE_NODE
|
1541
|
+
* Flags:
|
1542
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
1543
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
1544
|
+
*
|
1545
|
+
* @extends pm_node_t
|
1546
|
+
*/
|
616
1547
|
typedef struct pm_call_or_write_node {
|
1548
|
+
/** The embedded base node. */
|
617
1549
|
pm_node_t base;
|
1550
|
+
|
1551
|
+
/** CallOrWriteNode#receiver */
|
618
1552
|
struct pm_node *receiver;
|
1553
|
+
|
1554
|
+
/** CallOrWriteNode#call_operator_loc */
|
619
1555
|
pm_location_t call_operator_loc;
|
1556
|
+
|
1557
|
+
/** CallOrWriteNode#message_loc */
|
620
1558
|
pm_location_t message_loc;
|
1559
|
+
|
1560
|
+
/** CallOrWriteNode#read_name */
|
621
1561
|
pm_constant_id_t read_name;
|
1562
|
+
|
1563
|
+
/** CallOrWriteNode#write_name */
|
622
1564
|
pm_constant_id_t write_name;
|
1565
|
+
|
1566
|
+
/** CallOrWriteNode#operator_loc */
|
623
1567
|
pm_location_t operator_loc;
|
1568
|
+
|
1569
|
+
/** CallOrWriteNode#value */
|
624
1570
|
struct pm_node *value;
|
625
1571
|
} pm_call_or_write_node_t;
|
626
1572
|
|
627
|
-
|
628
|
-
|
629
|
-
|
1573
|
+
/**
|
1574
|
+
* CapturePatternNode
|
1575
|
+
*
|
1576
|
+
* Type: PM_CAPTURE_PATTERN_NODE
|
1577
|
+
*
|
1578
|
+
* @extends pm_node_t
|
1579
|
+
*/
|
630
1580
|
typedef struct pm_capture_pattern_node {
|
1581
|
+
/** The embedded base node. */
|
631
1582
|
pm_node_t base;
|
1583
|
+
|
1584
|
+
/** CapturePatternNode#value */
|
632
1585
|
struct pm_node *value;
|
1586
|
+
|
1587
|
+
/** CapturePatternNode#target */
|
633
1588
|
struct pm_node *target;
|
1589
|
+
|
1590
|
+
/** CapturePatternNode#operator_loc */
|
634
1591
|
pm_location_t operator_loc;
|
635
1592
|
} pm_capture_pattern_node_t;
|
636
1593
|
|
637
|
-
|
638
|
-
|
639
|
-
|
1594
|
+
/**
|
1595
|
+
* CaseNode
|
1596
|
+
*
|
1597
|
+
* Type: PM_CASE_NODE
|
1598
|
+
*
|
1599
|
+
* @extends pm_node_t
|
1600
|
+
*/
|
640
1601
|
typedef struct pm_case_node {
|
1602
|
+
/** The embedded base node. */
|
641
1603
|
pm_node_t base;
|
1604
|
+
|
1605
|
+
/** CaseNode#predicate */
|
642
1606
|
struct pm_node *predicate;
|
1607
|
+
|
1608
|
+
/** CaseNode#conditions */
|
643
1609
|
struct pm_node_list conditions;
|
1610
|
+
|
1611
|
+
/** CaseNode#consequent */
|
644
1612
|
struct pm_else_node *consequent;
|
1613
|
+
|
1614
|
+
/** CaseNode#case_keyword_loc */
|
645
1615
|
pm_location_t case_keyword_loc;
|
1616
|
+
|
1617
|
+
/** CaseNode#end_keyword_loc */
|
646
1618
|
pm_location_t end_keyword_loc;
|
647
1619
|
} pm_case_node_t;
|
648
1620
|
|
649
|
-
|
650
|
-
|
651
|
-
|
1621
|
+
/**
|
1622
|
+
* ClassNode
|
1623
|
+
*
|
1624
|
+
* Type: PM_CLASS_NODE
|
1625
|
+
*
|
1626
|
+
* @extends pm_node_t
|
1627
|
+
*/
|
652
1628
|
typedef struct pm_class_node {
|
1629
|
+
/** The embedded base node. */
|
653
1630
|
pm_node_t base;
|
1631
|
+
|
1632
|
+
/** ClassNode#locals */
|
654
1633
|
pm_constant_id_list_t locals;
|
1634
|
+
|
1635
|
+
/** ClassNode#class_keyword_loc */
|
655
1636
|
pm_location_t class_keyword_loc;
|
1637
|
+
|
1638
|
+
/** ClassNode#constant_path */
|
656
1639
|
struct pm_node *constant_path;
|
1640
|
+
|
1641
|
+
/** ClassNode#inheritance_operator_loc */
|
657
1642
|
pm_location_t inheritance_operator_loc;
|
1643
|
+
|
1644
|
+
/** ClassNode#superclass */
|
658
1645
|
struct pm_node *superclass;
|
1646
|
+
|
1647
|
+
/** ClassNode#body */
|
659
1648
|
struct pm_node *body;
|
1649
|
+
|
1650
|
+
/** ClassNode#end_keyword_loc */
|
660
1651
|
pm_location_t end_keyword_loc;
|
1652
|
+
|
1653
|
+
/** ClassNode#name */
|
661
1654
|
pm_constant_id_t name;
|
662
1655
|
} pm_class_node_t;
|
663
1656
|
|
664
|
-
|
665
|
-
|
666
|
-
|
1657
|
+
/**
|
1658
|
+
* ClassVariableAndWriteNode
|
1659
|
+
*
|
1660
|
+
* Type: PM_CLASS_VARIABLE_AND_WRITE_NODE
|
1661
|
+
*
|
1662
|
+
* @extends pm_node_t
|
1663
|
+
*/
|
667
1664
|
typedef struct pm_class_variable_and_write_node {
|
1665
|
+
/** The embedded base node. */
|
668
1666
|
pm_node_t base;
|
1667
|
+
|
1668
|
+
/** ClassVariableAndWriteNode#name */
|
669
1669
|
pm_constant_id_t name;
|
1670
|
+
|
1671
|
+
/** ClassVariableAndWriteNode#name_loc */
|
670
1672
|
pm_location_t name_loc;
|
1673
|
+
|
1674
|
+
/** ClassVariableAndWriteNode#operator_loc */
|
671
1675
|
pm_location_t operator_loc;
|
1676
|
+
|
1677
|
+
/** ClassVariableAndWriteNode#value */
|
672
1678
|
struct pm_node *value;
|
673
1679
|
} pm_class_variable_and_write_node_t;
|
674
1680
|
|
675
|
-
|
676
|
-
|
677
|
-
|
1681
|
+
/**
|
1682
|
+
* ClassVariableOperatorWriteNode
|
1683
|
+
*
|
1684
|
+
* Type: PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
|
1685
|
+
*
|
1686
|
+
* @extends pm_node_t
|
1687
|
+
*/
|
678
1688
|
typedef struct pm_class_variable_operator_write_node {
|
1689
|
+
/** The embedded base node. */
|
679
1690
|
pm_node_t base;
|
1691
|
+
|
1692
|
+
/** ClassVariableOperatorWriteNode#name */
|
680
1693
|
pm_constant_id_t name;
|
1694
|
+
|
1695
|
+
/** ClassVariableOperatorWriteNode#name_loc */
|
681
1696
|
pm_location_t name_loc;
|
1697
|
+
|
1698
|
+
/** ClassVariableOperatorWriteNode#operator_loc */
|
682
1699
|
pm_location_t operator_loc;
|
1700
|
+
|
1701
|
+
/** ClassVariableOperatorWriteNode#value */
|
683
1702
|
struct pm_node *value;
|
1703
|
+
|
1704
|
+
/** ClassVariableOperatorWriteNode#operator */
|
684
1705
|
pm_constant_id_t operator;
|
685
1706
|
} pm_class_variable_operator_write_node_t;
|
686
1707
|
|
687
|
-
|
688
|
-
|
689
|
-
|
1708
|
+
/**
|
1709
|
+
* ClassVariableOrWriteNode
|
1710
|
+
*
|
1711
|
+
* Type: PM_CLASS_VARIABLE_OR_WRITE_NODE
|
1712
|
+
*
|
1713
|
+
* @extends pm_node_t
|
1714
|
+
*/
|
690
1715
|
typedef struct pm_class_variable_or_write_node {
|
1716
|
+
/** The embedded base node. */
|
691
1717
|
pm_node_t base;
|
1718
|
+
|
1719
|
+
/** ClassVariableOrWriteNode#name */
|
692
1720
|
pm_constant_id_t name;
|
1721
|
+
|
1722
|
+
/** ClassVariableOrWriteNode#name_loc */
|
693
1723
|
pm_location_t name_loc;
|
1724
|
+
|
1725
|
+
/** ClassVariableOrWriteNode#operator_loc */
|
694
1726
|
pm_location_t operator_loc;
|
1727
|
+
|
1728
|
+
/** ClassVariableOrWriteNode#value */
|
695
1729
|
struct pm_node *value;
|
696
1730
|
} pm_class_variable_or_write_node_t;
|
697
1731
|
|
698
|
-
|
699
|
-
|
700
|
-
|
1732
|
+
/**
|
1733
|
+
* ClassVariableReadNode
|
1734
|
+
*
|
1735
|
+
* Type: PM_CLASS_VARIABLE_READ_NODE
|
1736
|
+
*
|
1737
|
+
* @extends pm_node_t
|
1738
|
+
*/
|
701
1739
|
typedef struct pm_class_variable_read_node {
|
1740
|
+
/** The embedded base node. */
|
702
1741
|
pm_node_t base;
|
1742
|
+
|
1743
|
+
/** ClassVariableReadNode#name */
|
703
1744
|
pm_constant_id_t name;
|
704
1745
|
} pm_class_variable_read_node_t;
|
705
1746
|
|
706
|
-
|
707
|
-
|
708
|
-
|
1747
|
+
/**
|
1748
|
+
* ClassVariableTargetNode
|
1749
|
+
*
|
1750
|
+
* Type: PM_CLASS_VARIABLE_TARGET_NODE
|
1751
|
+
*
|
1752
|
+
* @extends pm_node_t
|
1753
|
+
*/
|
709
1754
|
typedef struct pm_class_variable_target_node {
|
1755
|
+
/** The embedded base node. */
|
710
1756
|
pm_node_t base;
|
1757
|
+
|
1758
|
+
/** ClassVariableTargetNode#name */
|
711
1759
|
pm_constant_id_t name;
|
712
1760
|
} pm_class_variable_target_node_t;
|
713
1761
|
|
714
|
-
|
715
|
-
|
716
|
-
|
1762
|
+
/**
|
1763
|
+
* ClassVariableWriteNode
|
1764
|
+
*
|
1765
|
+
* Type: PM_CLASS_VARIABLE_WRITE_NODE
|
1766
|
+
*
|
1767
|
+
* @extends pm_node_t
|
1768
|
+
*/
|
717
1769
|
typedef struct pm_class_variable_write_node {
|
1770
|
+
/** The embedded base node. */
|
718
1771
|
pm_node_t base;
|
1772
|
+
|
1773
|
+
/** ClassVariableWriteNode#name */
|
719
1774
|
pm_constant_id_t name;
|
1775
|
+
|
1776
|
+
/** ClassVariableWriteNode#name_loc */
|
720
1777
|
pm_location_t name_loc;
|
1778
|
+
|
1779
|
+
/** ClassVariableWriteNode#value */
|
721
1780
|
struct pm_node *value;
|
1781
|
+
|
1782
|
+
/** ClassVariableWriteNode#operator_loc */
|
722
1783
|
pm_location_t operator_loc;
|
723
1784
|
} pm_class_variable_write_node_t;
|
724
1785
|
|
725
|
-
|
726
|
-
|
727
|
-
|
1786
|
+
/**
|
1787
|
+
* ConstantAndWriteNode
|
1788
|
+
*
|
1789
|
+
* Type: PM_CONSTANT_AND_WRITE_NODE
|
1790
|
+
*
|
1791
|
+
* @extends pm_node_t
|
1792
|
+
*/
|
728
1793
|
typedef struct pm_constant_and_write_node {
|
1794
|
+
/** The embedded base node. */
|
729
1795
|
pm_node_t base;
|
1796
|
+
|
1797
|
+
/** ConstantAndWriteNode#name */
|
730
1798
|
pm_constant_id_t name;
|
1799
|
+
|
1800
|
+
/** ConstantAndWriteNode#name_loc */
|
731
1801
|
pm_location_t name_loc;
|
1802
|
+
|
1803
|
+
/** ConstantAndWriteNode#operator_loc */
|
732
1804
|
pm_location_t operator_loc;
|
1805
|
+
|
1806
|
+
/** ConstantAndWriteNode#value */
|
733
1807
|
struct pm_node *value;
|
734
1808
|
} pm_constant_and_write_node_t;
|
735
1809
|
|
736
|
-
|
737
|
-
|
738
|
-
|
1810
|
+
/**
|
1811
|
+
* ConstantOperatorWriteNode
|
1812
|
+
*
|
1813
|
+
* Type: PM_CONSTANT_OPERATOR_WRITE_NODE
|
1814
|
+
*
|
1815
|
+
* @extends pm_node_t
|
1816
|
+
*/
|
739
1817
|
typedef struct pm_constant_operator_write_node {
|
1818
|
+
/** The embedded base node. */
|
740
1819
|
pm_node_t base;
|
1820
|
+
|
1821
|
+
/** ConstantOperatorWriteNode#name */
|
741
1822
|
pm_constant_id_t name;
|
1823
|
+
|
1824
|
+
/** ConstantOperatorWriteNode#name_loc */
|
742
1825
|
pm_location_t name_loc;
|
1826
|
+
|
1827
|
+
/** ConstantOperatorWriteNode#operator_loc */
|
743
1828
|
pm_location_t operator_loc;
|
1829
|
+
|
1830
|
+
/** ConstantOperatorWriteNode#value */
|
744
1831
|
struct pm_node *value;
|
1832
|
+
|
1833
|
+
/** ConstantOperatorWriteNode#operator */
|
745
1834
|
pm_constant_id_t operator;
|
746
1835
|
} pm_constant_operator_write_node_t;
|
747
1836
|
|
748
|
-
|
749
|
-
|
750
|
-
|
1837
|
+
/**
|
1838
|
+
* ConstantOrWriteNode
|
1839
|
+
*
|
1840
|
+
* Type: PM_CONSTANT_OR_WRITE_NODE
|
1841
|
+
*
|
1842
|
+
* @extends pm_node_t
|
1843
|
+
*/
|
751
1844
|
typedef struct pm_constant_or_write_node {
|
1845
|
+
/** The embedded base node. */
|
752
1846
|
pm_node_t base;
|
1847
|
+
|
1848
|
+
/** ConstantOrWriteNode#name */
|
753
1849
|
pm_constant_id_t name;
|
1850
|
+
|
1851
|
+
/** ConstantOrWriteNode#name_loc */
|
754
1852
|
pm_location_t name_loc;
|
1853
|
+
|
1854
|
+
/** ConstantOrWriteNode#operator_loc */
|
755
1855
|
pm_location_t operator_loc;
|
1856
|
+
|
1857
|
+
/** ConstantOrWriteNode#value */
|
756
1858
|
struct pm_node *value;
|
757
1859
|
} pm_constant_or_write_node_t;
|
758
1860
|
|
759
|
-
|
760
|
-
|
761
|
-
|
1861
|
+
/**
|
1862
|
+
* ConstantPathAndWriteNode
|
1863
|
+
*
|
1864
|
+
* Type: PM_CONSTANT_PATH_AND_WRITE_NODE
|
1865
|
+
*
|
1866
|
+
* @extends pm_node_t
|
1867
|
+
*/
|
762
1868
|
typedef struct pm_constant_path_and_write_node {
|
1869
|
+
/** The embedded base node. */
|
763
1870
|
pm_node_t base;
|
1871
|
+
|
1872
|
+
/** ConstantPathAndWriteNode#target */
|
764
1873
|
struct pm_constant_path_node *target;
|
1874
|
+
|
1875
|
+
/** ConstantPathAndWriteNode#operator_loc */
|
765
1876
|
pm_location_t operator_loc;
|
1877
|
+
|
1878
|
+
/** ConstantPathAndWriteNode#value */
|
766
1879
|
struct pm_node *value;
|
767
1880
|
} pm_constant_path_and_write_node_t;
|
768
1881
|
|
769
|
-
|
770
|
-
|
771
|
-
|
1882
|
+
/**
|
1883
|
+
* ConstantPathNode
|
1884
|
+
*
|
1885
|
+
* Type: PM_CONSTANT_PATH_NODE
|
1886
|
+
*
|
1887
|
+
* @extends pm_node_t
|
1888
|
+
*/
|
772
1889
|
typedef struct pm_constant_path_node {
|
1890
|
+
/** The embedded base node. */
|
773
1891
|
pm_node_t base;
|
1892
|
+
|
1893
|
+
/** ConstantPathNode#parent */
|
774
1894
|
struct pm_node *parent;
|
1895
|
+
|
1896
|
+
/** ConstantPathNode#child */
|
775
1897
|
struct pm_node *child;
|
1898
|
+
|
1899
|
+
/** ConstantPathNode#delimiter_loc */
|
776
1900
|
pm_location_t delimiter_loc;
|
777
1901
|
} pm_constant_path_node_t;
|
778
1902
|
|
779
|
-
|
780
|
-
|
781
|
-
|
1903
|
+
/**
|
1904
|
+
* ConstantPathOperatorWriteNode
|
1905
|
+
*
|
1906
|
+
* Type: PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
|
1907
|
+
*
|
1908
|
+
* @extends pm_node_t
|
1909
|
+
*/
|
782
1910
|
typedef struct pm_constant_path_operator_write_node {
|
1911
|
+
/** The embedded base node. */
|
783
1912
|
pm_node_t base;
|
1913
|
+
|
1914
|
+
/** ConstantPathOperatorWriteNode#target */
|
784
1915
|
struct pm_constant_path_node *target;
|
1916
|
+
|
1917
|
+
/** ConstantPathOperatorWriteNode#operator_loc */
|
785
1918
|
pm_location_t operator_loc;
|
1919
|
+
|
1920
|
+
/** ConstantPathOperatorWriteNode#value */
|
786
1921
|
struct pm_node *value;
|
1922
|
+
|
1923
|
+
/** ConstantPathOperatorWriteNode#operator */
|
787
1924
|
pm_constant_id_t operator;
|
788
1925
|
} pm_constant_path_operator_write_node_t;
|
789
1926
|
|
790
|
-
|
791
|
-
|
792
|
-
|
1927
|
+
/**
|
1928
|
+
* ConstantPathOrWriteNode
|
1929
|
+
*
|
1930
|
+
* Type: PM_CONSTANT_PATH_OR_WRITE_NODE
|
1931
|
+
*
|
1932
|
+
* @extends pm_node_t
|
1933
|
+
*/
|
793
1934
|
typedef struct pm_constant_path_or_write_node {
|
1935
|
+
/** The embedded base node. */
|
794
1936
|
pm_node_t base;
|
1937
|
+
|
1938
|
+
/** ConstantPathOrWriteNode#target */
|
795
1939
|
struct pm_constant_path_node *target;
|
1940
|
+
|
1941
|
+
/** ConstantPathOrWriteNode#operator_loc */
|
796
1942
|
pm_location_t operator_loc;
|
1943
|
+
|
1944
|
+
/** ConstantPathOrWriteNode#value */
|
797
1945
|
struct pm_node *value;
|
798
1946
|
} pm_constant_path_or_write_node_t;
|
799
1947
|
|
800
|
-
|
801
|
-
|
802
|
-
|
1948
|
+
/**
|
1949
|
+
* ConstantPathTargetNode
|
1950
|
+
*
|
1951
|
+
* Type: PM_CONSTANT_PATH_TARGET_NODE
|
1952
|
+
*
|
1953
|
+
* @extends pm_node_t
|
1954
|
+
*/
|
803
1955
|
typedef struct pm_constant_path_target_node {
|
1956
|
+
/** The embedded base node. */
|
804
1957
|
pm_node_t base;
|
1958
|
+
|
1959
|
+
/** ConstantPathTargetNode#parent */
|
805
1960
|
struct pm_node *parent;
|
1961
|
+
|
1962
|
+
/** ConstantPathTargetNode#child */
|
806
1963
|
struct pm_node *child;
|
1964
|
+
|
1965
|
+
/** ConstantPathTargetNode#delimiter_loc */
|
807
1966
|
pm_location_t delimiter_loc;
|
808
1967
|
} pm_constant_path_target_node_t;
|
809
1968
|
|
810
|
-
|
811
|
-
|
812
|
-
|
1969
|
+
/**
|
1970
|
+
* ConstantPathWriteNode
|
1971
|
+
*
|
1972
|
+
* Type: PM_CONSTANT_PATH_WRITE_NODE
|
1973
|
+
*
|
1974
|
+
* @extends pm_node_t
|
1975
|
+
*/
|
813
1976
|
typedef struct pm_constant_path_write_node {
|
1977
|
+
/** The embedded base node. */
|
814
1978
|
pm_node_t base;
|
1979
|
+
|
1980
|
+
/** ConstantPathWriteNode#target */
|
815
1981
|
struct pm_constant_path_node *target;
|
1982
|
+
|
1983
|
+
/** ConstantPathWriteNode#operator_loc */
|
816
1984
|
pm_location_t operator_loc;
|
1985
|
+
|
1986
|
+
/** ConstantPathWriteNode#value */
|
817
1987
|
struct pm_node *value;
|
818
1988
|
} pm_constant_path_write_node_t;
|
819
1989
|
|
820
|
-
|
821
|
-
|
822
|
-
|
1990
|
+
/**
|
1991
|
+
* ConstantReadNode
|
1992
|
+
*
|
1993
|
+
* Type: PM_CONSTANT_READ_NODE
|
1994
|
+
*
|
1995
|
+
* @extends pm_node_t
|
1996
|
+
*/
|
823
1997
|
typedef struct pm_constant_read_node {
|
1998
|
+
/** The embedded base node. */
|
824
1999
|
pm_node_t base;
|
2000
|
+
|
2001
|
+
/** ConstantReadNode#name */
|
825
2002
|
pm_constant_id_t name;
|
826
2003
|
} pm_constant_read_node_t;
|
827
2004
|
|
828
|
-
|
829
|
-
|
830
|
-
|
2005
|
+
/**
|
2006
|
+
* ConstantTargetNode
|
2007
|
+
*
|
2008
|
+
* Type: PM_CONSTANT_TARGET_NODE
|
2009
|
+
*
|
2010
|
+
* @extends pm_node_t
|
2011
|
+
*/
|
831
2012
|
typedef struct pm_constant_target_node {
|
2013
|
+
/** The embedded base node. */
|
832
2014
|
pm_node_t base;
|
2015
|
+
|
2016
|
+
/** ConstantTargetNode#name */
|
833
2017
|
pm_constant_id_t name;
|
834
2018
|
} pm_constant_target_node_t;
|
835
2019
|
|
836
|
-
|
837
|
-
|
838
|
-
|
2020
|
+
/**
|
2021
|
+
* ConstantWriteNode
|
2022
|
+
*
|
2023
|
+
* Type: PM_CONSTANT_WRITE_NODE
|
2024
|
+
*
|
2025
|
+
* @extends pm_node_t
|
2026
|
+
*/
|
839
2027
|
typedef struct pm_constant_write_node {
|
2028
|
+
/** The embedded base node. */
|
840
2029
|
pm_node_t base;
|
2030
|
+
|
2031
|
+
/** ConstantWriteNode#name */
|
841
2032
|
pm_constant_id_t name;
|
2033
|
+
|
2034
|
+
/** ConstantWriteNode#name_loc */
|
842
2035
|
pm_location_t name_loc;
|
2036
|
+
|
2037
|
+
/** ConstantWriteNode#value */
|
843
2038
|
struct pm_node *value;
|
2039
|
+
|
2040
|
+
/** ConstantWriteNode#operator_loc */
|
844
2041
|
pm_location_t operator_loc;
|
845
2042
|
} pm_constant_write_node_t;
|
846
2043
|
|
847
|
-
|
848
|
-
|
849
|
-
|
2044
|
+
/**
|
2045
|
+
* DefNode
|
2046
|
+
*
|
2047
|
+
* Type: PM_DEF_NODE
|
2048
|
+
*
|
2049
|
+
* @extends pm_node_t
|
2050
|
+
*/
|
850
2051
|
typedef struct pm_def_node {
|
2052
|
+
/** The embedded base node. */
|
851
2053
|
pm_node_t base;
|
2054
|
+
|
2055
|
+
/** DefNode#name */
|
852
2056
|
pm_constant_id_t name;
|
2057
|
+
|
2058
|
+
/** DefNode#name_loc */
|
853
2059
|
pm_location_t name_loc;
|
2060
|
+
|
2061
|
+
/** DefNode#receiver */
|
854
2062
|
struct pm_node *receiver;
|
2063
|
+
|
2064
|
+
/** DefNode#parameters */
|
855
2065
|
struct pm_parameters_node *parameters;
|
2066
|
+
|
2067
|
+
/** DefNode#body */
|
856
2068
|
struct pm_node *body;
|
2069
|
+
|
2070
|
+
/** DefNode#locals */
|
857
2071
|
pm_constant_id_list_t locals;
|
2072
|
+
|
2073
|
+
/** DefNode#def_keyword_loc */
|
858
2074
|
pm_location_t def_keyword_loc;
|
2075
|
+
|
2076
|
+
/** DefNode#operator_loc */
|
859
2077
|
pm_location_t operator_loc;
|
2078
|
+
|
2079
|
+
/** DefNode#lparen_loc */
|
860
2080
|
pm_location_t lparen_loc;
|
2081
|
+
|
2082
|
+
/** DefNode#rparen_loc */
|
861
2083
|
pm_location_t rparen_loc;
|
2084
|
+
|
2085
|
+
/** DefNode#equal_loc */
|
862
2086
|
pm_location_t equal_loc;
|
2087
|
+
|
2088
|
+
/** DefNode#end_keyword_loc */
|
863
2089
|
pm_location_t end_keyword_loc;
|
864
2090
|
} pm_def_node_t;
|
865
2091
|
|
866
|
-
|
867
|
-
|
868
|
-
|
2092
|
+
/**
|
2093
|
+
* DefinedNode
|
2094
|
+
*
|
2095
|
+
* Type: PM_DEFINED_NODE
|
2096
|
+
*
|
2097
|
+
* @extends pm_node_t
|
2098
|
+
*/
|
869
2099
|
typedef struct pm_defined_node {
|
2100
|
+
/** The embedded base node. */
|
870
2101
|
pm_node_t base;
|
2102
|
+
|
2103
|
+
/** DefinedNode#lparen_loc */
|
871
2104
|
pm_location_t lparen_loc;
|
2105
|
+
|
2106
|
+
/** DefinedNode#value */
|
872
2107
|
struct pm_node *value;
|
2108
|
+
|
2109
|
+
/** DefinedNode#rparen_loc */
|
873
2110
|
pm_location_t rparen_loc;
|
2111
|
+
|
2112
|
+
/** DefinedNode#keyword_loc */
|
874
2113
|
pm_location_t keyword_loc;
|
875
2114
|
} pm_defined_node_t;
|
876
2115
|
|
877
|
-
|
878
|
-
|
879
|
-
|
2116
|
+
/**
|
2117
|
+
* ElseNode
|
2118
|
+
*
|
2119
|
+
* Type: PM_ELSE_NODE
|
2120
|
+
*
|
2121
|
+
* @extends pm_node_t
|
2122
|
+
*/
|
880
2123
|
typedef struct pm_else_node {
|
2124
|
+
/** The embedded base node. */
|
881
2125
|
pm_node_t base;
|
2126
|
+
|
2127
|
+
/** ElseNode#else_keyword_loc */
|
882
2128
|
pm_location_t else_keyword_loc;
|
2129
|
+
|
2130
|
+
/** ElseNode#statements */
|
883
2131
|
struct pm_statements_node *statements;
|
2132
|
+
|
2133
|
+
/** ElseNode#end_keyword_loc */
|
884
2134
|
pm_location_t end_keyword_loc;
|
885
2135
|
} pm_else_node_t;
|
886
2136
|
|
887
|
-
|
888
|
-
|
889
|
-
|
2137
|
+
/**
|
2138
|
+
* EmbeddedStatementsNode
|
2139
|
+
*
|
2140
|
+
* Type: PM_EMBEDDED_STATEMENTS_NODE
|
2141
|
+
*
|
2142
|
+
* @extends pm_node_t
|
2143
|
+
*/
|
890
2144
|
typedef struct pm_embedded_statements_node {
|
2145
|
+
/** The embedded base node. */
|
891
2146
|
pm_node_t base;
|
2147
|
+
|
2148
|
+
/** EmbeddedStatementsNode#opening_loc */
|
892
2149
|
pm_location_t opening_loc;
|
2150
|
+
|
2151
|
+
/** EmbeddedStatementsNode#statements */
|
893
2152
|
struct pm_statements_node *statements;
|
2153
|
+
|
2154
|
+
/** EmbeddedStatementsNode#closing_loc */
|
894
2155
|
pm_location_t closing_loc;
|
895
2156
|
} pm_embedded_statements_node_t;
|
896
2157
|
|
897
|
-
|
898
|
-
|
899
|
-
|
2158
|
+
/**
|
2159
|
+
* EmbeddedVariableNode
|
2160
|
+
*
|
2161
|
+
* Type: PM_EMBEDDED_VARIABLE_NODE
|
2162
|
+
*
|
2163
|
+
* @extends pm_node_t
|
2164
|
+
*/
|
900
2165
|
typedef struct pm_embedded_variable_node {
|
2166
|
+
/** The embedded base node. */
|
901
2167
|
pm_node_t base;
|
2168
|
+
|
2169
|
+
/** EmbeddedVariableNode#operator_loc */
|
902
2170
|
pm_location_t operator_loc;
|
2171
|
+
|
2172
|
+
/** EmbeddedVariableNode#variable */
|
903
2173
|
struct pm_node *variable;
|
904
2174
|
} pm_embedded_variable_node_t;
|
905
2175
|
|
906
|
-
|
907
|
-
|
908
|
-
|
2176
|
+
/**
|
2177
|
+
* EnsureNode
|
2178
|
+
*
|
2179
|
+
* Type: PM_ENSURE_NODE
|
2180
|
+
*
|
2181
|
+
* @extends pm_node_t
|
2182
|
+
*/
|
909
2183
|
typedef struct pm_ensure_node {
|
2184
|
+
/** The embedded base node. */
|
910
2185
|
pm_node_t base;
|
2186
|
+
|
2187
|
+
/** EnsureNode#ensure_keyword_loc */
|
911
2188
|
pm_location_t ensure_keyword_loc;
|
2189
|
+
|
2190
|
+
/** EnsureNode#statements */
|
912
2191
|
struct pm_statements_node *statements;
|
2192
|
+
|
2193
|
+
/** EnsureNode#end_keyword_loc */
|
913
2194
|
pm_location_t end_keyword_loc;
|
914
2195
|
} pm_ensure_node_t;
|
915
2196
|
|
916
|
-
|
917
|
-
|
918
|
-
|
2197
|
+
/**
|
2198
|
+
* FalseNode
|
2199
|
+
*
|
2200
|
+
* Type: PM_FALSE_NODE
|
2201
|
+
*
|
2202
|
+
* @extends pm_node_t
|
2203
|
+
*/
|
919
2204
|
typedef struct pm_false_node {
|
2205
|
+
/** The embedded base node. */
|
920
2206
|
pm_node_t base;
|
921
2207
|
} pm_false_node_t;
|
922
2208
|
|
923
|
-
|
924
|
-
|
925
|
-
|
2209
|
+
/**
|
2210
|
+
* FindPatternNode
|
2211
|
+
*
|
2212
|
+
* Type: PM_FIND_PATTERN_NODE
|
2213
|
+
*
|
2214
|
+
* @extends pm_node_t
|
2215
|
+
*/
|
926
2216
|
typedef struct pm_find_pattern_node {
|
2217
|
+
/** The embedded base node. */
|
927
2218
|
pm_node_t base;
|
2219
|
+
|
2220
|
+
/** FindPatternNode#constant */
|
928
2221
|
struct pm_node *constant;
|
2222
|
+
|
2223
|
+
/** FindPatternNode#left */
|
929
2224
|
struct pm_node *left;
|
2225
|
+
|
2226
|
+
/** FindPatternNode#requireds */
|
930
2227
|
struct pm_node_list requireds;
|
2228
|
+
|
2229
|
+
/** FindPatternNode#right */
|
931
2230
|
struct pm_node *right;
|
2231
|
+
|
2232
|
+
/** FindPatternNode#opening_loc */
|
932
2233
|
pm_location_t opening_loc;
|
2234
|
+
|
2235
|
+
/** FindPatternNode#closing_loc */
|
933
2236
|
pm_location_t closing_loc;
|
934
2237
|
} pm_find_pattern_node_t;
|
935
2238
|
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
2239
|
+
/**
|
2240
|
+
* FlipFlopNode
|
2241
|
+
*
|
2242
|
+
* Type: PM_FLIP_FLOP_NODE
|
2243
|
+
* Flags:
|
2244
|
+
* PM_RANGE_FLAGS_EXCLUDE_END
|
2245
|
+
*
|
2246
|
+
* @extends pm_node_t
|
2247
|
+
*/
|
941
2248
|
typedef struct pm_flip_flop_node {
|
2249
|
+
/** The embedded base node. */
|
942
2250
|
pm_node_t base;
|
2251
|
+
|
2252
|
+
/** FlipFlopNode#left */
|
943
2253
|
struct pm_node *left;
|
2254
|
+
|
2255
|
+
/** FlipFlopNode#right */
|
944
2256
|
struct pm_node *right;
|
2257
|
+
|
2258
|
+
/** FlipFlopNode#operator_loc */
|
945
2259
|
pm_location_t operator_loc;
|
946
2260
|
} pm_flip_flop_node_t;
|
947
2261
|
|
948
|
-
|
949
|
-
|
950
|
-
|
2262
|
+
/**
|
2263
|
+
* FloatNode
|
2264
|
+
*
|
2265
|
+
* Type: PM_FLOAT_NODE
|
2266
|
+
*
|
2267
|
+
* @extends pm_node_t
|
2268
|
+
*/
|
951
2269
|
typedef struct pm_float_node {
|
2270
|
+
/** The embedded base node. */
|
952
2271
|
pm_node_t base;
|
953
2272
|
} pm_float_node_t;
|
954
2273
|
|
955
|
-
|
956
|
-
|
957
|
-
|
2274
|
+
/**
|
2275
|
+
* ForNode
|
2276
|
+
*
|
2277
|
+
* Type: PM_FOR_NODE
|
2278
|
+
*
|
2279
|
+
* @extends pm_node_t
|
2280
|
+
*/
|
958
2281
|
typedef struct pm_for_node {
|
2282
|
+
/** The embedded base node. */
|
959
2283
|
pm_node_t base;
|
2284
|
+
|
2285
|
+
/** ForNode#index */
|
960
2286
|
struct pm_node *index;
|
2287
|
+
|
2288
|
+
/** ForNode#collection */
|
961
2289
|
struct pm_node *collection;
|
2290
|
+
|
2291
|
+
/** ForNode#statements */
|
962
2292
|
struct pm_statements_node *statements;
|
2293
|
+
|
2294
|
+
/** ForNode#for_keyword_loc */
|
963
2295
|
pm_location_t for_keyword_loc;
|
2296
|
+
|
2297
|
+
/** ForNode#in_keyword_loc */
|
964
2298
|
pm_location_t in_keyword_loc;
|
2299
|
+
|
2300
|
+
/** ForNode#do_keyword_loc */
|
965
2301
|
pm_location_t do_keyword_loc;
|
2302
|
+
|
2303
|
+
/** ForNode#end_keyword_loc */
|
966
2304
|
pm_location_t end_keyword_loc;
|
967
2305
|
} pm_for_node_t;
|
968
2306
|
|
969
|
-
|
970
|
-
|
971
|
-
|
2307
|
+
/**
|
2308
|
+
* ForwardingArgumentsNode
|
2309
|
+
*
|
2310
|
+
* Type: PM_FORWARDING_ARGUMENTS_NODE
|
2311
|
+
*
|
2312
|
+
* @extends pm_node_t
|
2313
|
+
*/
|
972
2314
|
typedef struct pm_forwarding_arguments_node {
|
2315
|
+
/** The embedded base node. */
|
973
2316
|
pm_node_t base;
|
974
2317
|
} pm_forwarding_arguments_node_t;
|
975
2318
|
|
976
|
-
|
977
|
-
|
978
|
-
|
2319
|
+
/**
|
2320
|
+
* ForwardingParameterNode
|
2321
|
+
*
|
2322
|
+
* Type: PM_FORWARDING_PARAMETER_NODE
|
2323
|
+
*
|
2324
|
+
* @extends pm_node_t
|
2325
|
+
*/
|
979
2326
|
typedef struct pm_forwarding_parameter_node {
|
2327
|
+
/** The embedded base node. */
|
980
2328
|
pm_node_t base;
|
981
2329
|
} pm_forwarding_parameter_node_t;
|
982
2330
|
|
983
|
-
|
984
|
-
|
985
|
-
|
2331
|
+
/**
|
2332
|
+
* ForwardingSuperNode
|
2333
|
+
*
|
2334
|
+
* Type: PM_FORWARDING_SUPER_NODE
|
2335
|
+
*
|
2336
|
+
* @extends pm_node_t
|
2337
|
+
*/
|
986
2338
|
typedef struct pm_forwarding_super_node {
|
2339
|
+
/** The embedded base node. */
|
987
2340
|
pm_node_t base;
|
2341
|
+
|
2342
|
+
/** ForwardingSuperNode#block */
|
988
2343
|
struct pm_block_node *block;
|
989
2344
|
} pm_forwarding_super_node_t;
|
990
2345
|
|
991
|
-
|
992
|
-
|
993
|
-
|
2346
|
+
/**
|
2347
|
+
* GlobalVariableAndWriteNode
|
2348
|
+
*
|
2349
|
+
* Type: PM_GLOBAL_VARIABLE_AND_WRITE_NODE
|
2350
|
+
*
|
2351
|
+
* @extends pm_node_t
|
2352
|
+
*/
|
994
2353
|
typedef struct pm_global_variable_and_write_node {
|
2354
|
+
/** The embedded base node. */
|
995
2355
|
pm_node_t base;
|
2356
|
+
|
2357
|
+
/** GlobalVariableAndWriteNode#name */
|
996
2358
|
pm_constant_id_t name;
|
2359
|
+
|
2360
|
+
/** GlobalVariableAndWriteNode#name_loc */
|
997
2361
|
pm_location_t name_loc;
|
2362
|
+
|
2363
|
+
/** GlobalVariableAndWriteNode#operator_loc */
|
998
2364
|
pm_location_t operator_loc;
|
2365
|
+
|
2366
|
+
/** GlobalVariableAndWriteNode#value */
|
999
2367
|
struct pm_node *value;
|
1000
2368
|
} pm_global_variable_and_write_node_t;
|
1001
2369
|
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
2370
|
+
/**
|
2371
|
+
* GlobalVariableOperatorWriteNode
|
2372
|
+
*
|
2373
|
+
* Type: PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
|
2374
|
+
*
|
2375
|
+
* @extends pm_node_t
|
2376
|
+
*/
|
1005
2377
|
typedef struct pm_global_variable_operator_write_node {
|
2378
|
+
/** The embedded base node. */
|
1006
2379
|
pm_node_t base;
|
2380
|
+
|
2381
|
+
/** GlobalVariableOperatorWriteNode#name */
|
1007
2382
|
pm_constant_id_t name;
|
2383
|
+
|
2384
|
+
/** GlobalVariableOperatorWriteNode#name_loc */
|
1008
2385
|
pm_location_t name_loc;
|
2386
|
+
|
2387
|
+
/** GlobalVariableOperatorWriteNode#operator_loc */
|
1009
2388
|
pm_location_t operator_loc;
|
2389
|
+
|
2390
|
+
/** GlobalVariableOperatorWriteNode#value */
|
1010
2391
|
struct pm_node *value;
|
2392
|
+
|
2393
|
+
/** GlobalVariableOperatorWriteNode#operator */
|
1011
2394
|
pm_constant_id_t operator;
|
1012
2395
|
} pm_global_variable_operator_write_node_t;
|
1013
2396
|
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
2397
|
+
/**
|
2398
|
+
* GlobalVariableOrWriteNode
|
2399
|
+
*
|
2400
|
+
* Type: PM_GLOBAL_VARIABLE_OR_WRITE_NODE
|
2401
|
+
*
|
2402
|
+
* @extends pm_node_t
|
2403
|
+
*/
|
1017
2404
|
typedef struct pm_global_variable_or_write_node {
|
2405
|
+
/** The embedded base node. */
|
1018
2406
|
pm_node_t base;
|
2407
|
+
|
2408
|
+
/** GlobalVariableOrWriteNode#name */
|
1019
2409
|
pm_constant_id_t name;
|
2410
|
+
|
2411
|
+
/** GlobalVariableOrWriteNode#name_loc */
|
1020
2412
|
pm_location_t name_loc;
|
2413
|
+
|
2414
|
+
/** GlobalVariableOrWriteNode#operator_loc */
|
1021
2415
|
pm_location_t operator_loc;
|
2416
|
+
|
2417
|
+
/** GlobalVariableOrWriteNode#value */
|
1022
2418
|
struct pm_node *value;
|
1023
2419
|
} pm_global_variable_or_write_node_t;
|
1024
2420
|
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
2421
|
+
/**
|
2422
|
+
* GlobalVariableReadNode
|
2423
|
+
*
|
2424
|
+
* Type: PM_GLOBAL_VARIABLE_READ_NODE
|
2425
|
+
*
|
2426
|
+
* @extends pm_node_t
|
2427
|
+
*/
|
1028
2428
|
typedef struct pm_global_variable_read_node {
|
2429
|
+
/** The embedded base node. */
|
1029
2430
|
pm_node_t base;
|
2431
|
+
|
2432
|
+
/** GlobalVariableReadNode#name */
|
1030
2433
|
pm_constant_id_t name;
|
1031
2434
|
} pm_global_variable_read_node_t;
|
1032
2435
|
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
2436
|
+
/**
|
2437
|
+
* GlobalVariableTargetNode
|
2438
|
+
*
|
2439
|
+
* Type: PM_GLOBAL_VARIABLE_TARGET_NODE
|
2440
|
+
*
|
2441
|
+
* @extends pm_node_t
|
2442
|
+
*/
|
1036
2443
|
typedef struct pm_global_variable_target_node {
|
2444
|
+
/** The embedded base node. */
|
1037
2445
|
pm_node_t base;
|
2446
|
+
|
2447
|
+
/** GlobalVariableTargetNode#name */
|
1038
2448
|
pm_constant_id_t name;
|
1039
2449
|
} pm_global_variable_target_node_t;
|
1040
2450
|
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
2451
|
+
/**
|
2452
|
+
* GlobalVariableWriteNode
|
2453
|
+
*
|
2454
|
+
* Type: PM_GLOBAL_VARIABLE_WRITE_NODE
|
2455
|
+
*
|
2456
|
+
* @extends pm_node_t
|
2457
|
+
*/
|
1044
2458
|
typedef struct pm_global_variable_write_node {
|
2459
|
+
/** The embedded base node. */
|
1045
2460
|
pm_node_t base;
|
2461
|
+
|
2462
|
+
/** GlobalVariableWriteNode#name */
|
1046
2463
|
pm_constant_id_t name;
|
2464
|
+
|
2465
|
+
/** GlobalVariableWriteNode#name_loc */
|
1047
2466
|
pm_location_t name_loc;
|
2467
|
+
|
2468
|
+
/** GlobalVariableWriteNode#value */
|
1048
2469
|
struct pm_node *value;
|
2470
|
+
|
2471
|
+
/** GlobalVariableWriteNode#operator_loc */
|
1049
2472
|
pm_location_t operator_loc;
|
1050
2473
|
} pm_global_variable_write_node_t;
|
1051
2474
|
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
2475
|
+
/**
|
2476
|
+
* HashNode
|
2477
|
+
*
|
2478
|
+
* Type: PM_HASH_NODE
|
2479
|
+
*
|
2480
|
+
* @extends pm_node_t
|
2481
|
+
*/
|
1055
2482
|
typedef struct pm_hash_node {
|
2483
|
+
/** The embedded base node. */
|
1056
2484
|
pm_node_t base;
|
2485
|
+
|
2486
|
+
/** HashNode#opening_loc */
|
1057
2487
|
pm_location_t opening_loc;
|
2488
|
+
|
2489
|
+
/** HashNode#elements */
|
1058
2490
|
struct pm_node_list elements;
|
2491
|
+
|
2492
|
+
/** HashNode#closing_loc */
|
1059
2493
|
pm_location_t closing_loc;
|
1060
2494
|
} pm_hash_node_t;
|
1061
2495
|
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
2496
|
+
/**
|
2497
|
+
* HashPatternNode
|
2498
|
+
*
|
2499
|
+
* Type: PM_HASH_PATTERN_NODE
|
2500
|
+
*
|
2501
|
+
* @extends pm_node_t
|
2502
|
+
*/
|
1065
2503
|
typedef struct pm_hash_pattern_node {
|
2504
|
+
/** The embedded base node. */
|
1066
2505
|
pm_node_t base;
|
2506
|
+
|
2507
|
+
/** HashPatternNode#constant */
|
1067
2508
|
struct pm_node *constant;
|
1068
|
-
|
1069
|
-
|
2509
|
+
|
2510
|
+
/** HashPatternNode#elements */
|
2511
|
+
struct pm_node_list elements;
|
2512
|
+
|
2513
|
+
/** HashPatternNode#rest */
|
2514
|
+
struct pm_node *rest;
|
2515
|
+
|
2516
|
+
/** HashPatternNode#opening_loc */
|
1070
2517
|
pm_location_t opening_loc;
|
2518
|
+
|
2519
|
+
/** HashPatternNode#closing_loc */
|
1071
2520
|
pm_location_t closing_loc;
|
1072
2521
|
} pm_hash_pattern_node_t;
|
1073
2522
|
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
2523
|
+
/**
|
2524
|
+
* IfNode
|
2525
|
+
*
|
2526
|
+
* Type: PM_IF_NODE
|
2527
|
+
*
|
2528
|
+
* @extends pm_node_t
|
2529
|
+
*/
|
1077
2530
|
typedef struct pm_if_node {
|
2531
|
+
/** The embedded base node. */
|
1078
2532
|
pm_node_t base;
|
2533
|
+
|
2534
|
+
/** IfNode#if_keyword_loc */
|
1079
2535
|
pm_location_t if_keyword_loc;
|
2536
|
+
|
2537
|
+
/** IfNode#predicate */
|
1080
2538
|
struct pm_node *predicate;
|
2539
|
+
|
2540
|
+
/** IfNode#statements */
|
1081
2541
|
struct pm_statements_node *statements;
|
2542
|
+
|
2543
|
+
/** IfNode#consequent */
|
1082
2544
|
struct pm_node *consequent;
|
2545
|
+
|
2546
|
+
/** IfNode#end_keyword_loc */
|
1083
2547
|
pm_location_t end_keyword_loc;
|
1084
2548
|
} pm_if_node_t;
|
1085
2549
|
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
2550
|
+
/**
|
2551
|
+
* ImaginaryNode
|
2552
|
+
*
|
2553
|
+
* Type: PM_IMAGINARY_NODE
|
2554
|
+
*
|
2555
|
+
* @extends pm_node_t
|
2556
|
+
*/
|
1089
2557
|
typedef struct pm_imaginary_node {
|
2558
|
+
/** The embedded base node. */
|
1090
2559
|
pm_node_t base;
|
2560
|
+
|
2561
|
+
/** ImaginaryNode#numeric */
|
1091
2562
|
struct pm_node *numeric;
|
1092
2563
|
} pm_imaginary_node_t;
|
1093
2564
|
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
2565
|
+
/**
|
2566
|
+
* ImplicitNode
|
2567
|
+
*
|
2568
|
+
* Type: PM_IMPLICIT_NODE
|
2569
|
+
*
|
2570
|
+
* @extends pm_node_t
|
2571
|
+
*/
|
1097
2572
|
typedef struct pm_implicit_node {
|
2573
|
+
/** The embedded base node. */
|
1098
2574
|
pm_node_t base;
|
2575
|
+
|
2576
|
+
/** ImplicitNode#value */
|
1099
2577
|
struct pm_node *value;
|
1100
2578
|
} pm_implicit_node_t;
|
1101
2579
|
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
2580
|
+
/**
|
2581
|
+
* InNode
|
2582
|
+
*
|
2583
|
+
* Type: PM_IN_NODE
|
2584
|
+
*
|
2585
|
+
* @extends pm_node_t
|
2586
|
+
*/
|
1105
2587
|
typedef struct pm_in_node {
|
2588
|
+
/** The embedded base node. */
|
1106
2589
|
pm_node_t base;
|
2590
|
+
|
2591
|
+
/** InNode#pattern */
|
1107
2592
|
struct pm_node *pattern;
|
2593
|
+
|
2594
|
+
/** InNode#statements */
|
1108
2595
|
struct pm_statements_node *statements;
|
2596
|
+
|
2597
|
+
/** InNode#in_loc */
|
1109
2598
|
pm_location_t in_loc;
|
2599
|
+
|
2600
|
+
/** InNode#then_loc */
|
1110
2601
|
pm_location_t then_loc;
|
1111
2602
|
} pm_in_node_t;
|
1112
2603
|
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
2604
|
+
/**
|
2605
|
+
* IndexAndWriteNode
|
2606
|
+
*
|
2607
|
+
* Type: PM_INDEX_AND_WRITE_NODE
|
2608
|
+
* Flags:
|
2609
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
2610
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
2611
|
+
*
|
2612
|
+
* @extends pm_node_t
|
2613
|
+
*/
|
1119
2614
|
typedef struct pm_index_and_write_node {
|
2615
|
+
/** The embedded base node. */
|
1120
2616
|
pm_node_t base;
|
2617
|
+
|
2618
|
+
/** IndexAndWriteNode#receiver */
|
1121
2619
|
struct pm_node *receiver;
|
2620
|
+
|
2621
|
+
/** IndexAndWriteNode#call_operator_loc */
|
1122
2622
|
pm_location_t call_operator_loc;
|
2623
|
+
|
2624
|
+
/** IndexAndWriteNode#opening_loc */
|
1123
2625
|
pm_location_t opening_loc;
|
2626
|
+
|
2627
|
+
/** IndexAndWriteNode#arguments */
|
1124
2628
|
struct pm_arguments_node *arguments;
|
2629
|
+
|
2630
|
+
/** IndexAndWriteNode#closing_loc */
|
1125
2631
|
pm_location_t closing_loc;
|
2632
|
+
|
2633
|
+
/** IndexAndWriteNode#block */
|
1126
2634
|
struct pm_node *block;
|
2635
|
+
|
2636
|
+
/** IndexAndWriteNode#operator_loc */
|
1127
2637
|
pm_location_t operator_loc;
|
2638
|
+
|
2639
|
+
/** IndexAndWriteNode#value */
|
1128
2640
|
struct pm_node *value;
|
1129
2641
|
} pm_index_and_write_node_t;
|
1130
2642
|
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
2643
|
+
/**
|
2644
|
+
* IndexOperatorWriteNode
|
2645
|
+
*
|
2646
|
+
* Type: PM_INDEX_OPERATOR_WRITE_NODE
|
2647
|
+
* Flags:
|
2648
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
2649
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
2650
|
+
*
|
2651
|
+
* @extends pm_node_t
|
2652
|
+
*/
|
1137
2653
|
typedef struct pm_index_operator_write_node {
|
2654
|
+
/** The embedded base node. */
|
1138
2655
|
pm_node_t base;
|
2656
|
+
|
2657
|
+
/** IndexOperatorWriteNode#receiver */
|
1139
2658
|
struct pm_node *receiver;
|
2659
|
+
|
2660
|
+
/** IndexOperatorWriteNode#call_operator_loc */
|
1140
2661
|
pm_location_t call_operator_loc;
|
2662
|
+
|
2663
|
+
/** IndexOperatorWriteNode#opening_loc */
|
1141
2664
|
pm_location_t opening_loc;
|
2665
|
+
|
2666
|
+
/** IndexOperatorWriteNode#arguments */
|
1142
2667
|
struct pm_arguments_node *arguments;
|
2668
|
+
|
2669
|
+
/** IndexOperatorWriteNode#closing_loc */
|
1143
2670
|
pm_location_t closing_loc;
|
2671
|
+
|
2672
|
+
/** IndexOperatorWriteNode#block */
|
1144
2673
|
struct pm_node *block;
|
2674
|
+
|
2675
|
+
/** IndexOperatorWriteNode#operator */
|
1145
2676
|
pm_constant_id_t operator;
|
2677
|
+
|
2678
|
+
/** IndexOperatorWriteNode#operator_loc */
|
1146
2679
|
pm_location_t operator_loc;
|
2680
|
+
|
2681
|
+
/** IndexOperatorWriteNode#value */
|
1147
2682
|
struct pm_node *value;
|
1148
2683
|
} pm_index_operator_write_node_t;
|
1149
2684
|
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
2685
|
+
/**
|
2686
|
+
* IndexOrWriteNode
|
2687
|
+
*
|
2688
|
+
* Type: PM_INDEX_OR_WRITE_NODE
|
2689
|
+
* Flags:
|
2690
|
+
* PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
|
2691
|
+
* PM_CALL_NODE_FLAGS_VARIABLE_CALL
|
2692
|
+
*
|
2693
|
+
* @extends pm_node_t
|
2694
|
+
*/
|
1156
2695
|
typedef struct pm_index_or_write_node {
|
2696
|
+
/** The embedded base node. */
|
1157
2697
|
pm_node_t base;
|
2698
|
+
|
2699
|
+
/** IndexOrWriteNode#receiver */
|
1158
2700
|
struct pm_node *receiver;
|
2701
|
+
|
2702
|
+
/** IndexOrWriteNode#call_operator_loc */
|
1159
2703
|
pm_location_t call_operator_loc;
|
2704
|
+
|
2705
|
+
/** IndexOrWriteNode#opening_loc */
|
1160
2706
|
pm_location_t opening_loc;
|
2707
|
+
|
2708
|
+
/** IndexOrWriteNode#arguments */
|
1161
2709
|
struct pm_arguments_node *arguments;
|
2710
|
+
|
2711
|
+
/** IndexOrWriteNode#closing_loc */
|
1162
2712
|
pm_location_t closing_loc;
|
2713
|
+
|
2714
|
+
/** IndexOrWriteNode#block */
|
1163
2715
|
struct pm_node *block;
|
2716
|
+
|
2717
|
+
/** IndexOrWriteNode#operator_loc */
|
1164
2718
|
pm_location_t operator_loc;
|
2719
|
+
|
2720
|
+
/** IndexOrWriteNode#value */
|
1165
2721
|
struct pm_node *value;
|
1166
2722
|
} pm_index_or_write_node_t;
|
1167
2723
|
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
2724
|
+
/**
|
2725
|
+
* InstanceVariableAndWriteNode
|
2726
|
+
*
|
2727
|
+
* Type: PM_INSTANCE_VARIABLE_AND_WRITE_NODE
|
2728
|
+
*
|
2729
|
+
* @extends pm_node_t
|
2730
|
+
*/
|
1171
2731
|
typedef struct pm_instance_variable_and_write_node {
|
2732
|
+
/** The embedded base node. */
|
1172
2733
|
pm_node_t base;
|
2734
|
+
|
2735
|
+
/** InstanceVariableAndWriteNode#name */
|
1173
2736
|
pm_constant_id_t name;
|
2737
|
+
|
2738
|
+
/** InstanceVariableAndWriteNode#name_loc */
|
1174
2739
|
pm_location_t name_loc;
|
2740
|
+
|
2741
|
+
/** InstanceVariableAndWriteNode#operator_loc */
|
1175
2742
|
pm_location_t operator_loc;
|
2743
|
+
|
2744
|
+
/** InstanceVariableAndWriteNode#value */
|
1176
2745
|
struct pm_node *value;
|
1177
2746
|
} pm_instance_variable_and_write_node_t;
|
1178
2747
|
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
2748
|
+
/**
|
2749
|
+
* InstanceVariableOperatorWriteNode
|
2750
|
+
*
|
2751
|
+
* Type: PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
|
2752
|
+
*
|
2753
|
+
* @extends pm_node_t
|
2754
|
+
*/
|
1182
2755
|
typedef struct pm_instance_variable_operator_write_node {
|
2756
|
+
/** The embedded base node. */
|
1183
2757
|
pm_node_t base;
|
2758
|
+
|
2759
|
+
/** InstanceVariableOperatorWriteNode#name */
|
1184
2760
|
pm_constant_id_t name;
|
2761
|
+
|
2762
|
+
/** InstanceVariableOperatorWriteNode#name_loc */
|
1185
2763
|
pm_location_t name_loc;
|
2764
|
+
|
2765
|
+
/** InstanceVariableOperatorWriteNode#operator_loc */
|
1186
2766
|
pm_location_t operator_loc;
|
2767
|
+
|
2768
|
+
/** InstanceVariableOperatorWriteNode#value */
|
1187
2769
|
struct pm_node *value;
|
2770
|
+
|
2771
|
+
/** InstanceVariableOperatorWriteNode#operator */
|
1188
2772
|
pm_constant_id_t operator;
|
1189
2773
|
} pm_instance_variable_operator_write_node_t;
|
1190
2774
|
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
2775
|
+
/**
|
2776
|
+
* InstanceVariableOrWriteNode
|
2777
|
+
*
|
2778
|
+
* Type: PM_INSTANCE_VARIABLE_OR_WRITE_NODE
|
2779
|
+
*
|
2780
|
+
* @extends pm_node_t
|
2781
|
+
*/
|
1194
2782
|
typedef struct pm_instance_variable_or_write_node {
|
2783
|
+
/** The embedded base node. */
|
1195
2784
|
pm_node_t base;
|
2785
|
+
|
2786
|
+
/** InstanceVariableOrWriteNode#name */
|
1196
2787
|
pm_constant_id_t name;
|
2788
|
+
|
2789
|
+
/** InstanceVariableOrWriteNode#name_loc */
|
1197
2790
|
pm_location_t name_loc;
|
2791
|
+
|
2792
|
+
/** InstanceVariableOrWriteNode#operator_loc */
|
1198
2793
|
pm_location_t operator_loc;
|
2794
|
+
|
2795
|
+
/** InstanceVariableOrWriteNode#value */
|
1199
2796
|
struct pm_node *value;
|
1200
2797
|
} pm_instance_variable_or_write_node_t;
|
1201
2798
|
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
2799
|
+
/**
|
2800
|
+
* InstanceVariableReadNode
|
2801
|
+
*
|
2802
|
+
* Type: PM_INSTANCE_VARIABLE_READ_NODE
|
2803
|
+
*
|
2804
|
+
* @extends pm_node_t
|
2805
|
+
*/
|
1205
2806
|
typedef struct pm_instance_variable_read_node {
|
2807
|
+
/** The embedded base node. */
|
1206
2808
|
pm_node_t base;
|
2809
|
+
|
2810
|
+
/** InstanceVariableReadNode#name */
|
1207
2811
|
pm_constant_id_t name;
|
1208
2812
|
} pm_instance_variable_read_node_t;
|
1209
2813
|
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
2814
|
+
/**
|
2815
|
+
* InstanceVariableTargetNode
|
2816
|
+
*
|
2817
|
+
* Type: PM_INSTANCE_VARIABLE_TARGET_NODE
|
2818
|
+
*
|
2819
|
+
* @extends pm_node_t
|
2820
|
+
*/
|
1213
2821
|
typedef struct pm_instance_variable_target_node {
|
2822
|
+
/** The embedded base node. */
|
1214
2823
|
pm_node_t base;
|
2824
|
+
|
2825
|
+
/** InstanceVariableTargetNode#name */
|
1215
2826
|
pm_constant_id_t name;
|
1216
2827
|
} pm_instance_variable_target_node_t;
|
1217
2828
|
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
2829
|
+
/**
|
2830
|
+
* InstanceVariableWriteNode
|
2831
|
+
*
|
2832
|
+
* Type: PM_INSTANCE_VARIABLE_WRITE_NODE
|
2833
|
+
*
|
2834
|
+
* @extends pm_node_t
|
2835
|
+
*/
|
1221
2836
|
typedef struct pm_instance_variable_write_node {
|
2837
|
+
/** The embedded base node. */
|
1222
2838
|
pm_node_t base;
|
2839
|
+
|
2840
|
+
/** InstanceVariableWriteNode#name */
|
1223
2841
|
pm_constant_id_t name;
|
2842
|
+
|
2843
|
+
/** InstanceVariableWriteNode#name_loc */
|
1224
2844
|
pm_location_t name_loc;
|
2845
|
+
|
2846
|
+
/** InstanceVariableWriteNode#value */
|
1225
2847
|
struct pm_node *value;
|
2848
|
+
|
2849
|
+
/** InstanceVariableWriteNode#operator_loc */
|
1226
2850
|
pm_location_t operator_loc;
|
1227
2851
|
} pm_instance_variable_write_node_t;
|
1228
2852
|
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
2853
|
+
/**
|
2854
|
+
* IntegerNode
|
2855
|
+
*
|
2856
|
+
* Type: PM_INTEGER_NODE
|
2857
|
+
* Flags:
|
2858
|
+
* PM_INTEGER_BASE_FLAGS_BINARY
|
2859
|
+
* PM_INTEGER_BASE_FLAGS_OCTAL
|
2860
|
+
* PM_INTEGER_BASE_FLAGS_DECIMAL
|
2861
|
+
* PM_INTEGER_BASE_FLAGS_HEXADECIMAL
|
2862
|
+
*
|
2863
|
+
* @extends pm_node_t
|
2864
|
+
*/
|
1237
2865
|
typedef struct pm_integer_node {
|
2866
|
+
/** The embedded base node. */
|
1238
2867
|
pm_node_t base;
|
1239
2868
|
} pm_integer_node_t;
|
1240
2869
|
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
2870
|
+
/**
|
2871
|
+
* InterpolatedMatchLastLineNode
|
2872
|
+
*
|
2873
|
+
* Type: PM_INTERPOLATED_MATCH_LAST_LINE_NODE
|
2874
|
+
* Flags:
|
2875
|
+
* PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
2876
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
2877
|
+
* PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
2878
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
2879
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
2880
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
2881
|
+
* PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
2882
|
+
* PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
2883
|
+
*
|
2884
|
+
* @extends pm_node_t
|
2885
|
+
*/
|
1253
2886
|
typedef struct pm_interpolated_match_last_line_node {
|
2887
|
+
/** The embedded base node. */
|
1254
2888
|
pm_node_t base;
|
2889
|
+
|
2890
|
+
/** InterpolatedMatchLastLineNode#opening_loc */
|
1255
2891
|
pm_location_t opening_loc;
|
2892
|
+
|
2893
|
+
/** InterpolatedMatchLastLineNode#parts */
|
1256
2894
|
struct pm_node_list parts;
|
2895
|
+
|
2896
|
+
/** InterpolatedMatchLastLineNode#closing_loc */
|
1257
2897
|
pm_location_t closing_loc;
|
1258
2898
|
} pm_interpolated_match_last_line_node_t;
|
1259
2899
|
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
2900
|
+
/**
|
2901
|
+
* InterpolatedRegularExpressionNode
|
2902
|
+
*
|
2903
|
+
* Type: PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
|
2904
|
+
* Flags:
|
2905
|
+
* PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
2906
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
2907
|
+
* PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
2908
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
2909
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
2910
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
2911
|
+
* PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
2912
|
+
* PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
2913
|
+
*
|
2914
|
+
* @extends pm_node_t
|
2915
|
+
*/
|
1272
2916
|
typedef struct pm_interpolated_regular_expression_node {
|
2917
|
+
/** The embedded base node. */
|
1273
2918
|
pm_node_t base;
|
2919
|
+
|
2920
|
+
/** InterpolatedRegularExpressionNode#opening_loc */
|
1274
2921
|
pm_location_t opening_loc;
|
2922
|
+
|
2923
|
+
/** InterpolatedRegularExpressionNode#parts */
|
1275
2924
|
struct pm_node_list parts;
|
2925
|
+
|
2926
|
+
/** InterpolatedRegularExpressionNode#closing_loc */
|
1276
2927
|
pm_location_t closing_loc;
|
1277
2928
|
} pm_interpolated_regular_expression_node_t;
|
1278
2929
|
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
2930
|
+
/**
|
2931
|
+
* InterpolatedStringNode
|
2932
|
+
*
|
2933
|
+
* Type: PM_INTERPOLATED_STRING_NODE
|
2934
|
+
*
|
2935
|
+
* @extends pm_node_t
|
2936
|
+
*/
|
1282
2937
|
typedef struct pm_interpolated_string_node {
|
2938
|
+
/** The embedded base node. */
|
1283
2939
|
pm_node_t base;
|
2940
|
+
|
2941
|
+
/** InterpolatedStringNode#opening_loc */
|
1284
2942
|
pm_location_t opening_loc;
|
2943
|
+
|
2944
|
+
/** InterpolatedStringNode#parts */
|
1285
2945
|
struct pm_node_list parts;
|
2946
|
+
|
2947
|
+
/** InterpolatedStringNode#closing_loc */
|
1286
2948
|
pm_location_t closing_loc;
|
1287
2949
|
} pm_interpolated_string_node_t;
|
1288
2950
|
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
2951
|
+
/**
|
2952
|
+
* InterpolatedSymbolNode
|
2953
|
+
*
|
2954
|
+
* Type: PM_INTERPOLATED_SYMBOL_NODE
|
2955
|
+
*
|
2956
|
+
* @extends pm_node_t
|
2957
|
+
*/
|
1292
2958
|
typedef struct pm_interpolated_symbol_node {
|
2959
|
+
/** The embedded base node. */
|
1293
2960
|
pm_node_t base;
|
2961
|
+
|
2962
|
+
/** InterpolatedSymbolNode#opening_loc */
|
1294
2963
|
pm_location_t opening_loc;
|
2964
|
+
|
2965
|
+
/** InterpolatedSymbolNode#parts */
|
1295
2966
|
struct pm_node_list parts;
|
2967
|
+
|
2968
|
+
/** InterpolatedSymbolNode#closing_loc */
|
1296
2969
|
pm_location_t closing_loc;
|
1297
2970
|
} pm_interpolated_symbol_node_t;
|
1298
2971
|
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
2972
|
+
/**
|
2973
|
+
* InterpolatedXStringNode
|
2974
|
+
*
|
2975
|
+
* Type: PM_INTERPOLATED_X_STRING_NODE
|
2976
|
+
*
|
2977
|
+
* @extends pm_node_t
|
2978
|
+
*/
|
1302
2979
|
typedef struct pm_interpolated_x_string_node {
|
2980
|
+
/** The embedded base node. */
|
1303
2981
|
pm_node_t base;
|
2982
|
+
|
2983
|
+
/** InterpolatedXStringNode#opening_loc */
|
1304
2984
|
pm_location_t opening_loc;
|
2985
|
+
|
2986
|
+
/** InterpolatedXStringNode#parts */
|
1305
2987
|
struct pm_node_list parts;
|
2988
|
+
|
2989
|
+
/** InterpolatedXStringNode#closing_loc */
|
1306
2990
|
pm_location_t closing_loc;
|
1307
2991
|
} pm_interpolated_x_string_node_t;
|
1308
2992
|
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
2993
|
+
/**
|
2994
|
+
* KeywordHashNode
|
2995
|
+
*
|
2996
|
+
* Type: PM_KEYWORD_HASH_NODE
|
2997
|
+
*
|
2998
|
+
* @extends pm_node_t
|
2999
|
+
*/
|
1312
3000
|
typedef struct pm_keyword_hash_node {
|
3001
|
+
/** The embedded base node. */
|
1313
3002
|
pm_node_t base;
|
3003
|
+
|
3004
|
+
/** KeywordHashNode#elements */
|
1314
3005
|
struct pm_node_list elements;
|
1315
3006
|
} pm_keyword_hash_node_t;
|
1316
3007
|
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
struct pm_node *value;
|
1325
|
-
} pm_keyword_parameter_node_t;
|
1326
|
-
|
1327
|
-
// KeywordRestParameterNode
|
1328
|
-
//
|
1329
|
-
// Type: PM_KEYWORD_REST_PARAMETER_NODE
|
3008
|
+
/**
|
3009
|
+
* KeywordRestParameterNode
|
3010
|
+
*
|
3011
|
+
* Type: PM_KEYWORD_REST_PARAMETER_NODE
|
3012
|
+
*
|
3013
|
+
* @extends pm_node_t
|
3014
|
+
*/
|
1330
3015
|
typedef struct pm_keyword_rest_parameter_node {
|
3016
|
+
/** The embedded base node. */
|
1331
3017
|
pm_node_t base;
|
3018
|
+
|
3019
|
+
/** KeywordRestParameterNode#name */
|
1332
3020
|
pm_constant_id_t name;
|
3021
|
+
|
3022
|
+
/** KeywordRestParameterNode#name_loc */
|
1333
3023
|
pm_location_t name_loc;
|
3024
|
+
|
3025
|
+
/** KeywordRestParameterNode#operator_loc */
|
1334
3026
|
pm_location_t operator_loc;
|
1335
3027
|
} pm_keyword_rest_parameter_node_t;
|
1336
3028
|
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
3029
|
+
/**
|
3030
|
+
* LambdaNode
|
3031
|
+
*
|
3032
|
+
* Type: PM_LAMBDA_NODE
|
3033
|
+
*
|
3034
|
+
* @extends pm_node_t
|
3035
|
+
*/
|
1340
3036
|
typedef struct pm_lambda_node {
|
3037
|
+
/** The embedded base node. */
|
1341
3038
|
pm_node_t base;
|
3039
|
+
|
3040
|
+
/** LambdaNode#locals */
|
1342
3041
|
pm_constant_id_list_t locals;
|
3042
|
+
|
3043
|
+
/** LambdaNode#operator_loc */
|
1343
3044
|
pm_location_t operator_loc;
|
3045
|
+
|
3046
|
+
/** LambdaNode#opening_loc */
|
1344
3047
|
pm_location_t opening_loc;
|
3048
|
+
|
3049
|
+
/** LambdaNode#closing_loc */
|
1345
3050
|
pm_location_t closing_loc;
|
3051
|
+
|
3052
|
+
/** LambdaNode#parameters */
|
1346
3053
|
struct pm_block_parameters_node *parameters;
|
3054
|
+
|
3055
|
+
/** LambdaNode#body */
|
1347
3056
|
struct pm_node *body;
|
1348
3057
|
} pm_lambda_node_t;
|
1349
3058
|
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
3059
|
+
/**
|
3060
|
+
* LocalVariableAndWriteNode
|
3061
|
+
*
|
3062
|
+
* Type: PM_LOCAL_VARIABLE_AND_WRITE_NODE
|
3063
|
+
*
|
3064
|
+
* @extends pm_node_t
|
3065
|
+
*/
|
1353
3066
|
typedef struct pm_local_variable_and_write_node {
|
3067
|
+
/** The embedded base node. */
|
1354
3068
|
pm_node_t base;
|
3069
|
+
|
3070
|
+
/** LocalVariableAndWriteNode#name_loc */
|
1355
3071
|
pm_location_t name_loc;
|
3072
|
+
|
3073
|
+
/** LocalVariableAndWriteNode#operator_loc */
|
1356
3074
|
pm_location_t operator_loc;
|
3075
|
+
|
3076
|
+
/** LocalVariableAndWriteNode#value */
|
1357
3077
|
struct pm_node *value;
|
3078
|
+
|
3079
|
+
/** LocalVariableAndWriteNode#name */
|
1358
3080
|
pm_constant_id_t name;
|
3081
|
+
|
3082
|
+
/** LocalVariableAndWriteNode#depth */
|
1359
3083
|
uint32_t depth;
|
1360
3084
|
} pm_local_variable_and_write_node_t;
|
1361
3085
|
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
3086
|
+
/**
|
3087
|
+
* LocalVariableOperatorWriteNode
|
3088
|
+
*
|
3089
|
+
* Type: PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
|
3090
|
+
*
|
3091
|
+
* @extends pm_node_t
|
3092
|
+
*/
|
1365
3093
|
typedef struct pm_local_variable_operator_write_node {
|
3094
|
+
/** The embedded base node. */
|
1366
3095
|
pm_node_t base;
|
3096
|
+
|
3097
|
+
/** LocalVariableOperatorWriteNode#name_loc */
|
1367
3098
|
pm_location_t name_loc;
|
3099
|
+
|
3100
|
+
/** LocalVariableOperatorWriteNode#operator_loc */
|
1368
3101
|
pm_location_t operator_loc;
|
3102
|
+
|
3103
|
+
/** LocalVariableOperatorWriteNode#value */
|
1369
3104
|
struct pm_node *value;
|
3105
|
+
|
3106
|
+
/** LocalVariableOperatorWriteNode#name */
|
1370
3107
|
pm_constant_id_t name;
|
3108
|
+
|
3109
|
+
/** LocalVariableOperatorWriteNode#operator */
|
1371
3110
|
pm_constant_id_t operator;
|
3111
|
+
|
3112
|
+
/** LocalVariableOperatorWriteNode#depth */
|
1372
3113
|
uint32_t depth;
|
1373
3114
|
} pm_local_variable_operator_write_node_t;
|
1374
3115
|
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
3116
|
+
/**
|
3117
|
+
* LocalVariableOrWriteNode
|
3118
|
+
*
|
3119
|
+
* Type: PM_LOCAL_VARIABLE_OR_WRITE_NODE
|
3120
|
+
*
|
3121
|
+
* @extends pm_node_t
|
3122
|
+
*/
|
1378
3123
|
typedef struct pm_local_variable_or_write_node {
|
3124
|
+
/** The embedded base node. */
|
1379
3125
|
pm_node_t base;
|
3126
|
+
|
3127
|
+
/** LocalVariableOrWriteNode#name_loc */
|
1380
3128
|
pm_location_t name_loc;
|
3129
|
+
|
3130
|
+
/** LocalVariableOrWriteNode#operator_loc */
|
1381
3131
|
pm_location_t operator_loc;
|
3132
|
+
|
3133
|
+
/** LocalVariableOrWriteNode#value */
|
1382
3134
|
struct pm_node *value;
|
3135
|
+
|
3136
|
+
/** LocalVariableOrWriteNode#name */
|
1383
3137
|
pm_constant_id_t name;
|
3138
|
+
|
3139
|
+
/** LocalVariableOrWriteNode#depth */
|
1384
3140
|
uint32_t depth;
|
1385
3141
|
} pm_local_variable_or_write_node_t;
|
1386
3142
|
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
3143
|
+
/**
|
3144
|
+
* LocalVariableReadNode
|
3145
|
+
*
|
3146
|
+
* Type: PM_LOCAL_VARIABLE_READ_NODE
|
3147
|
+
*
|
3148
|
+
* @extends pm_node_t
|
3149
|
+
*/
|
1390
3150
|
typedef struct pm_local_variable_read_node {
|
3151
|
+
/** The embedded base node. */
|
1391
3152
|
pm_node_t base;
|
3153
|
+
|
3154
|
+
/** LocalVariableReadNode#name */
|
1392
3155
|
pm_constant_id_t name;
|
3156
|
+
|
3157
|
+
/** LocalVariableReadNode#depth */
|
1393
3158
|
uint32_t depth;
|
1394
3159
|
} pm_local_variable_read_node_t;
|
1395
3160
|
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
3161
|
+
/**
|
3162
|
+
* LocalVariableTargetNode
|
3163
|
+
*
|
3164
|
+
* Type: PM_LOCAL_VARIABLE_TARGET_NODE
|
3165
|
+
*
|
3166
|
+
* @extends pm_node_t
|
3167
|
+
*/
|
1399
3168
|
typedef struct pm_local_variable_target_node {
|
3169
|
+
/** The embedded base node. */
|
1400
3170
|
pm_node_t base;
|
3171
|
+
|
3172
|
+
/** LocalVariableTargetNode#name */
|
1401
3173
|
pm_constant_id_t name;
|
3174
|
+
|
3175
|
+
/** LocalVariableTargetNode#depth */
|
1402
3176
|
uint32_t depth;
|
1403
3177
|
} pm_local_variable_target_node_t;
|
1404
3178
|
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
3179
|
+
/**
|
3180
|
+
* LocalVariableWriteNode
|
3181
|
+
*
|
3182
|
+
* Type: PM_LOCAL_VARIABLE_WRITE_NODE
|
3183
|
+
*
|
3184
|
+
* @extends pm_node_t
|
3185
|
+
*/
|
1408
3186
|
typedef struct pm_local_variable_write_node {
|
3187
|
+
/** The embedded base node. */
|
1409
3188
|
pm_node_t base;
|
3189
|
+
|
3190
|
+
/** LocalVariableWriteNode#name */
|
1410
3191
|
pm_constant_id_t name;
|
3192
|
+
|
3193
|
+
/** LocalVariableWriteNode#depth */
|
1411
3194
|
uint32_t depth;
|
3195
|
+
|
3196
|
+
/** LocalVariableWriteNode#name_loc */
|
1412
3197
|
pm_location_t name_loc;
|
3198
|
+
|
3199
|
+
/** LocalVariableWriteNode#value */
|
1413
3200
|
struct pm_node *value;
|
3201
|
+
|
3202
|
+
/** LocalVariableWriteNode#operator_loc */
|
1414
3203
|
pm_location_t operator_loc;
|
1415
3204
|
} pm_local_variable_write_node_t;
|
1416
3205
|
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
3206
|
+
/**
|
3207
|
+
* MatchLastLineNode
|
3208
|
+
*
|
3209
|
+
* Type: PM_MATCH_LAST_LINE_NODE
|
3210
|
+
* Flags:
|
3211
|
+
* PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
3212
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
3213
|
+
* PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
3214
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
3215
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
3216
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
3217
|
+
* PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
3218
|
+
* PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
3219
|
+
*
|
3220
|
+
* @extends pm_node_t
|
3221
|
+
*/
|
1429
3222
|
typedef struct pm_match_last_line_node {
|
3223
|
+
/** The embedded base node. */
|
1430
3224
|
pm_node_t base;
|
3225
|
+
|
3226
|
+
/** MatchLastLineNode#opening_loc */
|
1431
3227
|
pm_location_t opening_loc;
|
3228
|
+
|
3229
|
+
/** MatchLastLineNode#content_loc */
|
1432
3230
|
pm_location_t content_loc;
|
3231
|
+
|
3232
|
+
/** MatchLastLineNode#closing_loc */
|
1433
3233
|
pm_location_t closing_loc;
|
3234
|
+
|
3235
|
+
/** MatchLastLineNode#unescaped */
|
1434
3236
|
pm_string_t unescaped;
|
1435
3237
|
} pm_match_last_line_node_t;
|
1436
3238
|
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
3239
|
+
/**
|
3240
|
+
* MatchPredicateNode
|
3241
|
+
*
|
3242
|
+
* Type: PM_MATCH_PREDICATE_NODE
|
3243
|
+
*
|
3244
|
+
* @extends pm_node_t
|
3245
|
+
*/
|
1440
3246
|
typedef struct pm_match_predicate_node {
|
3247
|
+
/** The embedded base node. */
|
1441
3248
|
pm_node_t base;
|
3249
|
+
|
3250
|
+
/** MatchPredicateNode#value */
|
1442
3251
|
struct pm_node *value;
|
3252
|
+
|
3253
|
+
/** MatchPredicateNode#pattern */
|
1443
3254
|
struct pm_node *pattern;
|
3255
|
+
|
3256
|
+
/** MatchPredicateNode#operator_loc */
|
1444
3257
|
pm_location_t operator_loc;
|
1445
3258
|
} pm_match_predicate_node_t;
|
1446
3259
|
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
3260
|
+
/**
|
3261
|
+
* MatchRequiredNode
|
3262
|
+
*
|
3263
|
+
* Type: PM_MATCH_REQUIRED_NODE
|
3264
|
+
*
|
3265
|
+
* @extends pm_node_t
|
3266
|
+
*/
|
1450
3267
|
typedef struct pm_match_required_node {
|
3268
|
+
/** The embedded base node. */
|
1451
3269
|
pm_node_t base;
|
3270
|
+
|
3271
|
+
/** MatchRequiredNode#value */
|
1452
3272
|
struct pm_node *value;
|
3273
|
+
|
3274
|
+
/** MatchRequiredNode#pattern */
|
1453
3275
|
struct pm_node *pattern;
|
3276
|
+
|
3277
|
+
/** MatchRequiredNode#operator_loc */
|
1454
3278
|
pm_location_t operator_loc;
|
1455
3279
|
} pm_match_required_node_t;
|
1456
3280
|
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
3281
|
+
/**
|
3282
|
+
* MatchWriteNode
|
3283
|
+
*
|
3284
|
+
* Type: PM_MATCH_WRITE_NODE
|
3285
|
+
*
|
3286
|
+
* @extends pm_node_t
|
3287
|
+
*/
|
1460
3288
|
typedef struct pm_match_write_node {
|
3289
|
+
/** The embedded base node. */
|
1461
3290
|
pm_node_t base;
|
3291
|
+
|
3292
|
+
/** MatchWriteNode#call */
|
1462
3293
|
struct pm_call_node *call;
|
3294
|
+
|
3295
|
+
/** MatchWriteNode#locals */
|
1463
3296
|
pm_constant_id_list_t locals;
|
1464
3297
|
} pm_match_write_node_t;
|
1465
3298
|
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
3299
|
+
/**
|
3300
|
+
* MissingNode
|
3301
|
+
*
|
3302
|
+
* Type: PM_MISSING_NODE
|
3303
|
+
*
|
3304
|
+
* @extends pm_node_t
|
3305
|
+
*/
|
1469
3306
|
typedef struct pm_missing_node {
|
3307
|
+
/** The embedded base node. */
|
1470
3308
|
pm_node_t base;
|
1471
3309
|
} pm_missing_node_t;
|
1472
3310
|
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
3311
|
+
/**
|
3312
|
+
* ModuleNode
|
3313
|
+
*
|
3314
|
+
* Type: PM_MODULE_NODE
|
3315
|
+
*
|
3316
|
+
* @extends pm_node_t
|
3317
|
+
*/
|
1476
3318
|
typedef struct pm_module_node {
|
3319
|
+
/** The embedded base node. */
|
1477
3320
|
pm_node_t base;
|
3321
|
+
|
3322
|
+
/** ModuleNode#locals */
|
1478
3323
|
pm_constant_id_list_t locals;
|
3324
|
+
|
3325
|
+
/** ModuleNode#module_keyword_loc */
|
1479
3326
|
pm_location_t module_keyword_loc;
|
3327
|
+
|
3328
|
+
/** ModuleNode#constant_path */
|
1480
3329
|
struct pm_node *constant_path;
|
3330
|
+
|
3331
|
+
/** ModuleNode#body */
|
1481
3332
|
struct pm_node *body;
|
3333
|
+
|
3334
|
+
/** ModuleNode#end_keyword_loc */
|
1482
3335
|
pm_location_t end_keyword_loc;
|
3336
|
+
|
3337
|
+
/** ModuleNode#name */
|
1483
3338
|
pm_constant_id_t name;
|
1484
3339
|
} pm_module_node_t;
|
1485
3340
|
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
3341
|
+
/**
|
3342
|
+
* MultiTargetNode
|
3343
|
+
*
|
3344
|
+
* Type: PM_MULTI_TARGET_NODE
|
3345
|
+
*
|
3346
|
+
* @extends pm_node_t
|
3347
|
+
*/
|
1489
3348
|
typedef struct pm_multi_target_node {
|
3349
|
+
/** The embedded base node. */
|
1490
3350
|
pm_node_t base;
|
1491
|
-
|
3351
|
+
|
3352
|
+
/** MultiTargetNode#lefts */
|
3353
|
+
struct pm_node_list lefts;
|
3354
|
+
|
3355
|
+
/** MultiTargetNode#rest */
|
3356
|
+
struct pm_node *rest;
|
3357
|
+
|
3358
|
+
/** MultiTargetNode#rights */
|
3359
|
+
struct pm_node_list rights;
|
3360
|
+
|
3361
|
+
/** MultiTargetNode#lparen_loc */
|
1492
3362
|
pm_location_t lparen_loc;
|
3363
|
+
|
3364
|
+
/** MultiTargetNode#rparen_loc */
|
1493
3365
|
pm_location_t rparen_loc;
|
1494
3366
|
} pm_multi_target_node_t;
|
1495
3367
|
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
3368
|
+
/**
|
3369
|
+
* MultiWriteNode
|
3370
|
+
*
|
3371
|
+
* Type: PM_MULTI_WRITE_NODE
|
3372
|
+
*
|
3373
|
+
* @extends pm_node_t
|
3374
|
+
*/
|
1499
3375
|
typedef struct pm_multi_write_node {
|
3376
|
+
/** The embedded base node. */
|
1500
3377
|
pm_node_t base;
|
1501
|
-
|
3378
|
+
|
3379
|
+
/** MultiWriteNode#lefts */
|
3380
|
+
struct pm_node_list lefts;
|
3381
|
+
|
3382
|
+
/** MultiWriteNode#rest */
|
3383
|
+
struct pm_node *rest;
|
3384
|
+
|
3385
|
+
/** MultiWriteNode#rights */
|
3386
|
+
struct pm_node_list rights;
|
3387
|
+
|
3388
|
+
/** MultiWriteNode#lparen_loc */
|
1502
3389
|
pm_location_t lparen_loc;
|
3390
|
+
|
3391
|
+
/** MultiWriteNode#rparen_loc */
|
1503
3392
|
pm_location_t rparen_loc;
|
3393
|
+
|
3394
|
+
/** MultiWriteNode#operator_loc */
|
1504
3395
|
pm_location_t operator_loc;
|
3396
|
+
|
3397
|
+
/** MultiWriteNode#value */
|
1505
3398
|
struct pm_node *value;
|
1506
3399
|
} pm_multi_write_node_t;
|
1507
3400
|
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
3401
|
+
/**
|
3402
|
+
* NextNode
|
3403
|
+
*
|
3404
|
+
* Type: PM_NEXT_NODE
|
3405
|
+
*
|
3406
|
+
* @extends pm_node_t
|
3407
|
+
*/
|
1511
3408
|
typedef struct pm_next_node {
|
3409
|
+
/** The embedded base node. */
|
1512
3410
|
pm_node_t base;
|
3411
|
+
|
3412
|
+
/** NextNode#arguments */
|
1513
3413
|
struct pm_arguments_node *arguments;
|
3414
|
+
|
3415
|
+
/** NextNode#keyword_loc */
|
1514
3416
|
pm_location_t keyword_loc;
|
1515
3417
|
} pm_next_node_t;
|
1516
3418
|
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
3419
|
+
/**
|
3420
|
+
* NilNode
|
3421
|
+
*
|
3422
|
+
* Type: PM_NIL_NODE
|
3423
|
+
*
|
3424
|
+
* @extends pm_node_t
|
3425
|
+
*/
|
1520
3426
|
typedef struct pm_nil_node {
|
3427
|
+
/** The embedded base node. */
|
1521
3428
|
pm_node_t base;
|
1522
3429
|
} pm_nil_node_t;
|
1523
3430
|
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
3431
|
+
/**
|
3432
|
+
* NoKeywordsParameterNode
|
3433
|
+
*
|
3434
|
+
* Type: PM_NO_KEYWORDS_PARAMETER_NODE
|
3435
|
+
*
|
3436
|
+
* @extends pm_node_t
|
3437
|
+
*/
|
1527
3438
|
typedef struct pm_no_keywords_parameter_node {
|
3439
|
+
/** The embedded base node. */
|
1528
3440
|
pm_node_t base;
|
3441
|
+
|
3442
|
+
/** NoKeywordsParameterNode#operator_loc */
|
1529
3443
|
pm_location_t operator_loc;
|
3444
|
+
|
3445
|
+
/** NoKeywordsParameterNode#keyword_loc */
|
1530
3446
|
pm_location_t keyword_loc;
|
1531
3447
|
} pm_no_keywords_parameter_node_t;
|
1532
3448
|
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
3449
|
+
/**
|
3450
|
+
* NumberedReferenceReadNode
|
3451
|
+
*
|
3452
|
+
* Type: PM_NUMBERED_REFERENCE_READ_NODE
|
3453
|
+
*
|
3454
|
+
* @extends pm_node_t
|
3455
|
+
*/
|
1536
3456
|
typedef struct pm_numbered_reference_read_node {
|
3457
|
+
/** The embedded base node. */
|
1537
3458
|
pm_node_t base;
|
3459
|
+
|
3460
|
+
/** NumberedReferenceReadNode#number */
|
1538
3461
|
uint32_t number;
|
1539
3462
|
} pm_numbered_reference_read_node_t;
|
1540
3463
|
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
3464
|
+
/**
|
3465
|
+
* OptionalKeywordParameterNode
|
3466
|
+
*
|
3467
|
+
* Type: PM_OPTIONAL_KEYWORD_PARAMETER_NODE
|
3468
|
+
*
|
3469
|
+
* @extends pm_node_t
|
3470
|
+
*/
|
3471
|
+
typedef struct pm_optional_keyword_parameter_node {
|
3472
|
+
/** The embedded base node. */
|
3473
|
+
pm_node_t base;
|
3474
|
+
|
3475
|
+
/** OptionalKeywordParameterNode#name */
|
3476
|
+
pm_constant_id_t name;
|
3477
|
+
|
3478
|
+
/** OptionalKeywordParameterNode#name_loc */
|
3479
|
+
pm_location_t name_loc;
|
3480
|
+
|
3481
|
+
/** OptionalKeywordParameterNode#value */
|
3482
|
+
struct pm_node *value;
|
3483
|
+
} pm_optional_keyword_parameter_node_t;
|
3484
|
+
|
3485
|
+
/**
|
3486
|
+
* OptionalParameterNode
|
3487
|
+
*
|
3488
|
+
* Type: PM_OPTIONAL_PARAMETER_NODE
|
3489
|
+
*
|
3490
|
+
* @extends pm_node_t
|
3491
|
+
*/
|
1544
3492
|
typedef struct pm_optional_parameter_node {
|
3493
|
+
/** The embedded base node. */
|
1545
3494
|
pm_node_t base;
|
3495
|
+
|
3496
|
+
/** OptionalParameterNode#name */
|
1546
3497
|
pm_constant_id_t name;
|
3498
|
+
|
3499
|
+
/** OptionalParameterNode#name_loc */
|
1547
3500
|
pm_location_t name_loc;
|
3501
|
+
|
3502
|
+
/** OptionalParameterNode#operator_loc */
|
1548
3503
|
pm_location_t operator_loc;
|
3504
|
+
|
3505
|
+
/** OptionalParameterNode#value */
|
1549
3506
|
struct pm_node *value;
|
1550
3507
|
} pm_optional_parameter_node_t;
|
1551
3508
|
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
3509
|
+
/**
|
3510
|
+
* OrNode
|
3511
|
+
*
|
3512
|
+
* Type: PM_OR_NODE
|
3513
|
+
*
|
3514
|
+
* @extends pm_node_t
|
3515
|
+
*/
|
1555
3516
|
typedef struct pm_or_node {
|
3517
|
+
/** The embedded base node. */
|
1556
3518
|
pm_node_t base;
|
3519
|
+
|
3520
|
+
/** OrNode#left */
|
1557
3521
|
struct pm_node *left;
|
3522
|
+
|
3523
|
+
/** OrNode#right */
|
1558
3524
|
struct pm_node *right;
|
3525
|
+
|
3526
|
+
/** OrNode#operator_loc */
|
1559
3527
|
pm_location_t operator_loc;
|
1560
3528
|
} pm_or_node_t;
|
1561
3529
|
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
3530
|
+
/**
|
3531
|
+
* ParametersNode
|
3532
|
+
*
|
3533
|
+
* Type: PM_PARAMETERS_NODE
|
3534
|
+
*
|
3535
|
+
* @extends pm_node_t
|
3536
|
+
*/
|
1565
3537
|
typedef struct pm_parameters_node {
|
3538
|
+
/** The embedded base node. */
|
1566
3539
|
pm_node_t base;
|
3540
|
+
|
3541
|
+
/** ParametersNode#requireds */
|
1567
3542
|
struct pm_node_list requireds;
|
3543
|
+
|
3544
|
+
/** ParametersNode#optionals */
|
1568
3545
|
struct pm_node_list optionals;
|
3546
|
+
|
3547
|
+
/** ParametersNode#rest */
|
1569
3548
|
struct pm_rest_parameter_node *rest;
|
3549
|
+
|
3550
|
+
/** ParametersNode#posts */
|
1570
3551
|
struct pm_node_list posts;
|
3552
|
+
|
3553
|
+
/** ParametersNode#keywords */
|
1571
3554
|
struct pm_node_list keywords;
|
3555
|
+
|
3556
|
+
/** ParametersNode#keyword_rest */
|
1572
3557
|
struct pm_node *keyword_rest;
|
3558
|
+
|
3559
|
+
/** ParametersNode#block */
|
1573
3560
|
struct pm_block_parameter_node *block;
|
1574
3561
|
} pm_parameters_node_t;
|
1575
3562
|
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
3563
|
+
/**
|
3564
|
+
* ParenthesesNode
|
3565
|
+
*
|
3566
|
+
* Type: PM_PARENTHESES_NODE
|
3567
|
+
*
|
3568
|
+
* @extends pm_node_t
|
3569
|
+
*/
|
1579
3570
|
typedef struct pm_parentheses_node {
|
3571
|
+
/** The embedded base node. */
|
1580
3572
|
pm_node_t base;
|
3573
|
+
|
3574
|
+
/** ParenthesesNode#body */
|
1581
3575
|
struct pm_node *body;
|
3576
|
+
|
3577
|
+
/** ParenthesesNode#opening_loc */
|
1582
3578
|
pm_location_t opening_loc;
|
3579
|
+
|
3580
|
+
/** ParenthesesNode#closing_loc */
|
1583
3581
|
pm_location_t closing_loc;
|
1584
3582
|
} pm_parentheses_node_t;
|
1585
3583
|
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
3584
|
+
/**
|
3585
|
+
* PinnedExpressionNode
|
3586
|
+
*
|
3587
|
+
* Type: PM_PINNED_EXPRESSION_NODE
|
3588
|
+
*
|
3589
|
+
* @extends pm_node_t
|
3590
|
+
*/
|
1589
3591
|
typedef struct pm_pinned_expression_node {
|
3592
|
+
/** The embedded base node. */
|
1590
3593
|
pm_node_t base;
|
3594
|
+
|
3595
|
+
/** PinnedExpressionNode#expression */
|
1591
3596
|
struct pm_node *expression;
|
3597
|
+
|
3598
|
+
/** PinnedExpressionNode#operator_loc */
|
1592
3599
|
pm_location_t operator_loc;
|
3600
|
+
|
3601
|
+
/** PinnedExpressionNode#lparen_loc */
|
1593
3602
|
pm_location_t lparen_loc;
|
3603
|
+
|
3604
|
+
/** PinnedExpressionNode#rparen_loc */
|
1594
3605
|
pm_location_t rparen_loc;
|
1595
3606
|
} pm_pinned_expression_node_t;
|
1596
3607
|
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
3608
|
+
/**
|
3609
|
+
* PinnedVariableNode
|
3610
|
+
*
|
3611
|
+
* Type: PM_PINNED_VARIABLE_NODE
|
3612
|
+
*
|
3613
|
+
* @extends pm_node_t
|
3614
|
+
*/
|
1600
3615
|
typedef struct pm_pinned_variable_node {
|
3616
|
+
/** The embedded base node. */
|
1601
3617
|
pm_node_t base;
|
3618
|
+
|
3619
|
+
/** PinnedVariableNode#variable */
|
1602
3620
|
struct pm_node *variable;
|
3621
|
+
|
3622
|
+
/** PinnedVariableNode#operator_loc */
|
1603
3623
|
pm_location_t operator_loc;
|
1604
3624
|
} pm_pinned_variable_node_t;
|
1605
3625
|
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
3626
|
+
/**
|
3627
|
+
* PostExecutionNode
|
3628
|
+
*
|
3629
|
+
* Type: PM_POST_EXECUTION_NODE
|
3630
|
+
*
|
3631
|
+
* @extends pm_node_t
|
3632
|
+
*/
|
1609
3633
|
typedef struct pm_post_execution_node {
|
3634
|
+
/** The embedded base node. */
|
1610
3635
|
pm_node_t base;
|
3636
|
+
|
3637
|
+
/** PostExecutionNode#statements */
|
1611
3638
|
struct pm_statements_node *statements;
|
3639
|
+
|
3640
|
+
/** PostExecutionNode#keyword_loc */
|
1612
3641
|
pm_location_t keyword_loc;
|
3642
|
+
|
3643
|
+
/** PostExecutionNode#opening_loc */
|
1613
3644
|
pm_location_t opening_loc;
|
3645
|
+
|
3646
|
+
/** PostExecutionNode#closing_loc */
|
1614
3647
|
pm_location_t closing_loc;
|
1615
3648
|
} pm_post_execution_node_t;
|
1616
3649
|
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
3650
|
+
/**
|
3651
|
+
* PreExecutionNode
|
3652
|
+
*
|
3653
|
+
* Type: PM_PRE_EXECUTION_NODE
|
3654
|
+
*
|
3655
|
+
* @extends pm_node_t
|
3656
|
+
*/
|
1620
3657
|
typedef struct pm_pre_execution_node {
|
3658
|
+
/** The embedded base node. */
|
1621
3659
|
pm_node_t base;
|
3660
|
+
|
3661
|
+
/** PreExecutionNode#statements */
|
1622
3662
|
struct pm_statements_node *statements;
|
3663
|
+
|
3664
|
+
/** PreExecutionNode#keyword_loc */
|
1623
3665
|
pm_location_t keyword_loc;
|
3666
|
+
|
3667
|
+
/** PreExecutionNode#opening_loc */
|
1624
3668
|
pm_location_t opening_loc;
|
3669
|
+
|
3670
|
+
/** PreExecutionNode#closing_loc */
|
1625
3671
|
pm_location_t closing_loc;
|
1626
3672
|
} pm_pre_execution_node_t;
|
1627
3673
|
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
3674
|
+
/**
|
3675
|
+
* ProgramNode
|
3676
|
+
*
|
3677
|
+
* Type: PM_PROGRAM_NODE
|
3678
|
+
*
|
3679
|
+
* @extends pm_node_t
|
3680
|
+
*/
|
1631
3681
|
typedef struct pm_program_node {
|
3682
|
+
/** The embedded base node. */
|
1632
3683
|
pm_node_t base;
|
3684
|
+
|
3685
|
+
/** ProgramNode#locals */
|
1633
3686
|
pm_constant_id_list_t locals;
|
3687
|
+
|
3688
|
+
/** ProgramNode#statements */
|
1634
3689
|
struct pm_statements_node *statements;
|
1635
3690
|
} pm_program_node_t;
|
1636
3691
|
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
3692
|
+
/**
|
3693
|
+
* RangeNode
|
3694
|
+
*
|
3695
|
+
* Type: PM_RANGE_NODE
|
3696
|
+
* Flags:
|
3697
|
+
* PM_RANGE_FLAGS_EXCLUDE_END
|
3698
|
+
*
|
3699
|
+
* @extends pm_node_t
|
3700
|
+
*/
|
1642
3701
|
typedef struct pm_range_node {
|
3702
|
+
/** The embedded base node. */
|
1643
3703
|
pm_node_t base;
|
3704
|
+
|
3705
|
+
/** RangeNode#left */
|
1644
3706
|
struct pm_node *left;
|
3707
|
+
|
3708
|
+
/** RangeNode#right */
|
1645
3709
|
struct pm_node *right;
|
3710
|
+
|
3711
|
+
/** RangeNode#operator_loc */
|
1646
3712
|
pm_location_t operator_loc;
|
1647
3713
|
} pm_range_node_t;
|
1648
3714
|
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
3715
|
+
/**
|
3716
|
+
* RationalNode
|
3717
|
+
*
|
3718
|
+
* Type: PM_RATIONAL_NODE
|
3719
|
+
*
|
3720
|
+
* @extends pm_node_t
|
3721
|
+
*/
|
1652
3722
|
typedef struct pm_rational_node {
|
3723
|
+
/** The embedded base node. */
|
1653
3724
|
pm_node_t base;
|
3725
|
+
|
3726
|
+
/** RationalNode#numeric */
|
1654
3727
|
struct pm_node *numeric;
|
1655
3728
|
} pm_rational_node_t;
|
1656
3729
|
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
3730
|
+
/**
|
3731
|
+
* RedoNode
|
3732
|
+
*
|
3733
|
+
* Type: PM_REDO_NODE
|
3734
|
+
*
|
3735
|
+
* @extends pm_node_t
|
3736
|
+
*/
|
1660
3737
|
typedef struct pm_redo_node {
|
3738
|
+
/** The embedded base node. */
|
1661
3739
|
pm_node_t base;
|
1662
3740
|
} pm_redo_node_t;
|
1663
3741
|
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
3742
|
+
/**
|
3743
|
+
* RegularExpressionNode
|
3744
|
+
*
|
3745
|
+
* Type: PM_REGULAR_EXPRESSION_NODE
|
3746
|
+
* Flags:
|
3747
|
+
* PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
|
3748
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
|
3749
|
+
* PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
|
3750
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ONCE
|
3751
|
+
* PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
|
3752
|
+
* PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
|
3753
|
+
* PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
|
3754
|
+
* PM_REGULAR_EXPRESSION_FLAGS_UTF_8
|
3755
|
+
*
|
3756
|
+
* @extends pm_node_t
|
3757
|
+
*/
|
1676
3758
|
typedef struct pm_regular_expression_node {
|
3759
|
+
/** The embedded base node. */
|
1677
3760
|
pm_node_t base;
|
3761
|
+
|
3762
|
+
/** RegularExpressionNode#opening_loc */
|
1678
3763
|
pm_location_t opening_loc;
|
3764
|
+
|
3765
|
+
/** RegularExpressionNode#content_loc */
|
1679
3766
|
pm_location_t content_loc;
|
3767
|
+
|
3768
|
+
/** RegularExpressionNode#closing_loc */
|
1680
3769
|
pm_location_t closing_loc;
|
3770
|
+
|
3771
|
+
/** RegularExpressionNode#unescaped */
|
1681
3772
|
pm_string_t unescaped;
|
1682
3773
|
} pm_regular_expression_node_t;
|
1683
3774
|
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
3775
|
+
/**
|
3776
|
+
* RequiredKeywordParameterNode
|
3777
|
+
*
|
3778
|
+
* Type: PM_REQUIRED_KEYWORD_PARAMETER_NODE
|
3779
|
+
*
|
3780
|
+
* @extends pm_node_t
|
3781
|
+
*/
|
3782
|
+
typedef struct pm_required_keyword_parameter_node {
|
3783
|
+
/** The embedded base node. */
|
1688
3784
|
pm_node_t base;
|
1689
|
-
struct pm_node_list parameters;
|
1690
|
-
pm_location_t opening_loc;
|
1691
|
-
pm_location_t closing_loc;
|
1692
|
-
} pm_required_destructured_parameter_node_t;
|
1693
3785
|
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
3786
|
+
/** RequiredKeywordParameterNode#name */
|
3787
|
+
pm_constant_id_t name;
|
3788
|
+
|
3789
|
+
/** RequiredKeywordParameterNode#name_loc */
|
3790
|
+
pm_location_t name_loc;
|
3791
|
+
} pm_required_keyword_parameter_node_t;
|
3792
|
+
|
3793
|
+
/**
|
3794
|
+
* RequiredParameterNode
|
3795
|
+
*
|
3796
|
+
* Type: PM_REQUIRED_PARAMETER_NODE
|
3797
|
+
*
|
3798
|
+
* @extends pm_node_t
|
3799
|
+
*/
|
1697
3800
|
typedef struct pm_required_parameter_node {
|
3801
|
+
/** The embedded base node. */
|
1698
3802
|
pm_node_t base;
|
3803
|
+
|
3804
|
+
/** RequiredParameterNode#name */
|
1699
3805
|
pm_constant_id_t name;
|
1700
3806
|
} pm_required_parameter_node_t;
|
1701
3807
|
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
3808
|
+
/**
|
3809
|
+
* RescueModifierNode
|
3810
|
+
*
|
3811
|
+
* Type: PM_RESCUE_MODIFIER_NODE
|
3812
|
+
*
|
3813
|
+
* @extends pm_node_t
|
3814
|
+
*/
|
1705
3815
|
typedef struct pm_rescue_modifier_node {
|
3816
|
+
/** The embedded base node. */
|
1706
3817
|
pm_node_t base;
|
3818
|
+
|
3819
|
+
/** RescueModifierNode#expression */
|
1707
3820
|
struct pm_node *expression;
|
3821
|
+
|
3822
|
+
/** RescueModifierNode#keyword_loc */
|
1708
3823
|
pm_location_t keyword_loc;
|
3824
|
+
|
3825
|
+
/** RescueModifierNode#rescue_expression */
|
1709
3826
|
struct pm_node *rescue_expression;
|
1710
3827
|
} pm_rescue_modifier_node_t;
|
1711
3828
|
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
3829
|
+
/**
|
3830
|
+
* RescueNode
|
3831
|
+
*
|
3832
|
+
* Type: PM_RESCUE_NODE
|
3833
|
+
*
|
3834
|
+
* @extends pm_node_t
|
3835
|
+
*/
|
1715
3836
|
typedef struct pm_rescue_node {
|
3837
|
+
/** The embedded base node. */
|
1716
3838
|
pm_node_t base;
|
3839
|
+
|
3840
|
+
/** RescueNode#keyword_loc */
|
1717
3841
|
pm_location_t keyword_loc;
|
3842
|
+
|
3843
|
+
/** RescueNode#exceptions */
|
1718
3844
|
struct pm_node_list exceptions;
|
3845
|
+
|
3846
|
+
/** RescueNode#operator_loc */
|
1719
3847
|
pm_location_t operator_loc;
|
3848
|
+
|
3849
|
+
/** RescueNode#reference */
|
1720
3850
|
struct pm_node *reference;
|
3851
|
+
|
3852
|
+
/** RescueNode#statements */
|
1721
3853
|
struct pm_statements_node *statements;
|
3854
|
+
|
3855
|
+
/** RescueNode#consequent */
|
1722
3856
|
struct pm_rescue_node *consequent;
|
1723
3857
|
} pm_rescue_node_t;
|
1724
3858
|
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
3859
|
+
/**
|
3860
|
+
* RestParameterNode
|
3861
|
+
*
|
3862
|
+
* Type: PM_REST_PARAMETER_NODE
|
3863
|
+
*
|
3864
|
+
* @extends pm_node_t
|
3865
|
+
*/
|
1728
3866
|
typedef struct pm_rest_parameter_node {
|
3867
|
+
/** The embedded base node. */
|
1729
3868
|
pm_node_t base;
|
3869
|
+
|
3870
|
+
/** RestParameterNode#name */
|
1730
3871
|
pm_constant_id_t name;
|
3872
|
+
|
3873
|
+
/** RestParameterNode#name_loc */
|
1731
3874
|
pm_location_t name_loc;
|
3875
|
+
|
3876
|
+
/** RestParameterNode#operator_loc */
|
1732
3877
|
pm_location_t operator_loc;
|
1733
3878
|
} pm_rest_parameter_node_t;
|
1734
3879
|
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
3880
|
+
/**
|
3881
|
+
* RetryNode
|
3882
|
+
*
|
3883
|
+
* Type: PM_RETRY_NODE
|
3884
|
+
*
|
3885
|
+
* @extends pm_node_t
|
3886
|
+
*/
|
1738
3887
|
typedef struct pm_retry_node {
|
3888
|
+
/** The embedded base node. */
|
1739
3889
|
pm_node_t base;
|
1740
3890
|
} pm_retry_node_t;
|
1741
3891
|
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
3892
|
+
/**
|
3893
|
+
* ReturnNode
|
3894
|
+
*
|
3895
|
+
* Type: PM_RETURN_NODE
|
3896
|
+
*
|
3897
|
+
* @extends pm_node_t
|
3898
|
+
*/
|
1745
3899
|
typedef struct pm_return_node {
|
3900
|
+
/** The embedded base node. */
|
1746
3901
|
pm_node_t base;
|
3902
|
+
|
3903
|
+
/** ReturnNode#keyword_loc */
|
1747
3904
|
pm_location_t keyword_loc;
|
3905
|
+
|
3906
|
+
/** ReturnNode#arguments */
|
1748
3907
|
struct pm_arguments_node *arguments;
|
1749
3908
|
} pm_return_node_t;
|
1750
3909
|
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
3910
|
+
/**
|
3911
|
+
* SelfNode
|
3912
|
+
*
|
3913
|
+
* Type: PM_SELF_NODE
|
3914
|
+
*
|
3915
|
+
* @extends pm_node_t
|
3916
|
+
*/
|
1754
3917
|
typedef struct pm_self_node {
|
3918
|
+
/** The embedded base node. */
|
1755
3919
|
pm_node_t base;
|
1756
3920
|
} pm_self_node_t;
|
1757
3921
|
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
3922
|
+
/**
|
3923
|
+
* SingletonClassNode
|
3924
|
+
*
|
3925
|
+
* Type: PM_SINGLETON_CLASS_NODE
|
3926
|
+
*
|
3927
|
+
* @extends pm_node_t
|
3928
|
+
*/
|
1761
3929
|
typedef struct pm_singleton_class_node {
|
3930
|
+
/** The embedded base node. */
|
1762
3931
|
pm_node_t base;
|
3932
|
+
|
3933
|
+
/** SingletonClassNode#locals */
|
1763
3934
|
pm_constant_id_list_t locals;
|
3935
|
+
|
3936
|
+
/** SingletonClassNode#class_keyword_loc */
|
1764
3937
|
pm_location_t class_keyword_loc;
|
3938
|
+
|
3939
|
+
/** SingletonClassNode#operator_loc */
|
1765
3940
|
pm_location_t operator_loc;
|
3941
|
+
|
3942
|
+
/** SingletonClassNode#expression */
|
1766
3943
|
struct pm_node *expression;
|
3944
|
+
|
3945
|
+
/** SingletonClassNode#body */
|
1767
3946
|
struct pm_node *body;
|
3947
|
+
|
3948
|
+
/** SingletonClassNode#end_keyword_loc */
|
1768
3949
|
pm_location_t end_keyword_loc;
|
1769
3950
|
} pm_singleton_class_node_t;
|
1770
3951
|
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
3952
|
+
/**
|
3953
|
+
* SourceEncodingNode
|
3954
|
+
*
|
3955
|
+
* Type: PM_SOURCE_ENCODING_NODE
|
3956
|
+
*
|
3957
|
+
* @extends pm_node_t
|
3958
|
+
*/
|
1774
3959
|
typedef struct pm_source_encoding_node {
|
3960
|
+
/** The embedded base node. */
|
1775
3961
|
pm_node_t base;
|
1776
3962
|
} pm_source_encoding_node_t;
|
1777
3963
|
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
3964
|
+
/**
|
3965
|
+
* SourceFileNode
|
3966
|
+
*
|
3967
|
+
* Type: PM_SOURCE_FILE_NODE
|
3968
|
+
*
|
3969
|
+
* @extends pm_node_t
|
3970
|
+
*/
|
1781
3971
|
typedef struct pm_source_file_node {
|
3972
|
+
/** The embedded base node. */
|
1782
3973
|
pm_node_t base;
|
3974
|
+
|
3975
|
+
/** SourceFileNode#filepath */
|
1783
3976
|
pm_string_t filepath;
|
1784
3977
|
} pm_source_file_node_t;
|
1785
3978
|
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
3979
|
+
/**
|
3980
|
+
* SourceLineNode
|
3981
|
+
*
|
3982
|
+
* Type: PM_SOURCE_LINE_NODE
|
3983
|
+
*
|
3984
|
+
* @extends pm_node_t
|
3985
|
+
*/
|
1789
3986
|
typedef struct pm_source_line_node {
|
3987
|
+
/** The embedded base node. */
|
1790
3988
|
pm_node_t base;
|
1791
3989
|
} pm_source_line_node_t;
|
1792
3990
|
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
3991
|
+
/**
|
3992
|
+
* SplatNode
|
3993
|
+
*
|
3994
|
+
* Type: PM_SPLAT_NODE
|
3995
|
+
*
|
3996
|
+
* @extends pm_node_t
|
3997
|
+
*/
|
1796
3998
|
typedef struct pm_splat_node {
|
3999
|
+
/** The embedded base node. */
|
1797
4000
|
pm_node_t base;
|
4001
|
+
|
4002
|
+
/** SplatNode#operator_loc */
|
1798
4003
|
pm_location_t operator_loc;
|
4004
|
+
|
4005
|
+
/** SplatNode#expression */
|
1799
4006
|
struct pm_node *expression;
|
1800
4007
|
} pm_splat_node_t;
|
1801
4008
|
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
4009
|
+
/**
|
4010
|
+
* StatementsNode
|
4011
|
+
*
|
4012
|
+
* Type: PM_STATEMENTS_NODE
|
4013
|
+
*
|
4014
|
+
* @extends pm_node_t
|
4015
|
+
*/
|
1805
4016
|
typedef struct pm_statements_node {
|
4017
|
+
/** The embedded base node. */
|
1806
4018
|
pm_node_t base;
|
4019
|
+
|
4020
|
+
/** StatementsNode#body */
|
1807
4021
|
struct pm_node_list body;
|
1808
4022
|
} pm_statements_node_t;
|
1809
4023
|
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
4024
|
+
/**
|
4025
|
+
* StringConcatNode
|
4026
|
+
*
|
4027
|
+
* Type: PM_STRING_CONCAT_NODE
|
4028
|
+
*
|
4029
|
+
* @extends pm_node_t
|
4030
|
+
*/
|
1813
4031
|
typedef struct pm_string_concat_node {
|
4032
|
+
/** The embedded base node. */
|
1814
4033
|
pm_node_t base;
|
4034
|
+
|
4035
|
+
/** StringConcatNode#left */
|
1815
4036
|
struct pm_node *left;
|
4037
|
+
|
4038
|
+
/** StringConcatNode#right */
|
1816
4039
|
struct pm_node *right;
|
1817
4040
|
} pm_string_concat_node_t;
|
1818
4041
|
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
4042
|
+
/**
|
4043
|
+
* StringNode
|
4044
|
+
*
|
4045
|
+
* Type: PM_STRING_NODE
|
4046
|
+
* Flags:
|
4047
|
+
* PM_STRING_FLAGS_FROZEN
|
4048
|
+
*
|
4049
|
+
* @extends pm_node_t
|
4050
|
+
*/
|
1824
4051
|
typedef struct pm_string_node {
|
4052
|
+
/** The embedded base node. */
|
1825
4053
|
pm_node_t base;
|
4054
|
+
|
4055
|
+
/** StringNode#opening_loc */
|
1826
4056
|
pm_location_t opening_loc;
|
4057
|
+
|
4058
|
+
/** StringNode#content_loc */
|
1827
4059
|
pm_location_t content_loc;
|
4060
|
+
|
4061
|
+
/** StringNode#closing_loc */
|
1828
4062
|
pm_location_t closing_loc;
|
4063
|
+
|
4064
|
+
/** StringNode#unescaped */
|
1829
4065
|
pm_string_t unescaped;
|
1830
4066
|
} pm_string_node_t;
|
1831
4067
|
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
4068
|
+
/**
|
4069
|
+
* SuperNode
|
4070
|
+
*
|
4071
|
+
* Type: PM_SUPER_NODE
|
4072
|
+
*
|
4073
|
+
* @extends pm_node_t
|
4074
|
+
*/
|
1835
4075
|
typedef struct pm_super_node {
|
4076
|
+
/** The embedded base node. */
|
1836
4077
|
pm_node_t base;
|
4078
|
+
|
4079
|
+
/** SuperNode#keyword_loc */
|
1837
4080
|
pm_location_t keyword_loc;
|
4081
|
+
|
4082
|
+
/** SuperNode#lparen_loc */
|
1838
4083
|
pm_location_t lparen_loc;
|
4084
|
+
|
4085
|
+
/** SuperNode#arguments */
|
1839
4086
|
struct pm_arguments_node *arguments;
|
4087
|
+
|
4088
|
+
/** SuperNode#rparen_loc */
|
1840
4089
|
pm_location_t rparen_loc;
|
4090
|
+
|
4091
|
+
/** SuperNode#block */
|
1841
4092
|
struct pm_node *block;
|
1842
4093
|
} pm_super_node_t;
|
1843
4094
|
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
4095
|
+
/**
|
4096
|
+
* SymbolNode
|
4097
|
+
*
|
4098
|
+
* Type: PM_SYMBOL_NODE
|
4099
|
+
*
|
4100
|
+
* @extends pm_node_t
|
4101
|
+
*/
|
1847
4102
|
typedef struct pm_symbol_node {
|
4103
|
+
/** The embedded base node. */
|
1848
4104
|
pm_node_t base;
|
4105
|
+
|
4106
|
+
/** SymbolNode#opening_loc */
|
1849
4107
|
pm_location_t opening_loc;
|
4108
|
+
|
4109
|
+
/** SymbolNode#value_loc */
|
1850
4110
|
pm_location_t value_loc;
|
4111
|
+
|
4112
|
+
/** SymbolNode#closing_loc */
|
1851
4113
|
pm_location_t closing_loc;
|
4114
|
+
|
4115
|
+
/** SymbolNode#unescaped */
|
1852
4116
|
pm_string_t unescaped;
|
1853
4117
|
} pm_symbol_node_t;
|
1854
4118
|
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
4119
|
+
/**
|
4120
|
+
* TrueNode
|
4121
|
+
*
|
4122
|
+
* Type: PM_TRUE_NODE
|
4123
|
+
*
|
4124
|
+
* @extends pm_node_t
|
4125
|
+
*/
|
1858
4126
|
typedef struct pm_true_node {
|
4127
|
+
/** The embedded base node. */
|
1859
4128
|
pm_node_t base;
|
1860
4129
|
} pm_true_node_t;
|
1861
4130
|
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
4131
|
+
/**
|
4132
|
+
* UndefNode
|
4133
|
+
*
|
4134
|
+
* Type: PM_UNDEF_NODE
|
4135
|
+
*
|
4136
|
+
* @extends pm_node_t
|
4137
|
+
*/
|
1865
4138
|
typedef struct pm_undef_node {
|
4139
|
+
/** The embedded base node. */
|
1866
4140
|
pm_node_t base;
|
4141
|
+
|
4142
|
+
/** UndefNode#names */
|
1867
4143
|
struct pm_node_list names;
|
4144
|
+
|
4145
|
+
/** UndefNode#keyword_loc */
|
1868
4146
|
pm_location_t keyword_loc;
|
1869
4147
|
} pm_undef_node_t;
|
1870
4148
|
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
4149
|
+
/**
|
4150
|
+
* UnlessNode
|
4151
|
+
*
|
4152
|
+
* Type: PM_UNLESS_NODE
|
4153
|
+
*
|
4154
|
+
* @extends pm_node_t
|
4155
|
+
*/
|
1874
4156
|
typedef struct pm_unless_node {
|
4157
|
+
/** The embedded base node. */
|
1875
4158
|
pm_node_t base;
|
4159
|
+
|
4160
|
+
/** UnlessNode#keyword_loc */
|
1876
4161
|
pm_location_t keyword_loc;
|
4162
|
+
|
4163
|
+
/** UnlessNode#predicate */
|
1877
4164
|
struct pm_node *predicate;
|
4165
|
+
|
4166
|
+
/** UnlessNode#statements */
|
1878
4167
|
struct pm_statements_node *statements;
|
4168
|
+
|
4169
|
+
/** UnlessNode#consequent */
|
1879
4170
|
struct pm_else_node *consequent;
|
4171
|
+
|
4172
|
+
/** UnlessNode#end_keyword_loc */
|
1880
4173
|
pm_location_t end_keyword_loc;
|
1881
4174
|
} pm_unless_node_t;
|
1882
4175
|
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
4176
|
+
/**
|
4177
|
+
* UntilNode
|
4178
|
+
*
|
4179
|
+
* Type: PM_UNTIL_NODE
|
4180
|
+
* Flags:
|
4181
|
+
* PM_LOOP_FLAGS_BEGIN_MODIFIER
|
4182
|
+
*
|
4183
|
+
* @extends pm_node_t
|
4184
|
+
*/
|
1888
4185
|
typedef struct pm_until_node {
|
4186
|
+
/** The embedded base node. */
|
1889
4187
|
pm_node_t base;
|
4188
|
+
|
4189
|
+
/** UntilNode#keyword_loc */
|
1890
4190
|
pm_location_t keyword_loc;
|
4191
|
+
|
4192
|
+
/** UntilNode#closing_loc */
|
1891
4193
|
pm_location_t closing_loc;
|
4194
|
+
|
4195
|
+
/** UntilNode#predicate */
|
1892
4196
|
struct pm_node *predicate;
|
4197
|
+
|
4198
|
+
/** UntilNode#statements */
|
1893
4199
|
struct pm_statements_node *statements;
|
1894
4200
|
} pm_until_node_t;
|
1895
4201
|
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
4202
|
+
/**
|
4203
|
+
* WhenNode
|
4204
|
+
*
|
4205
|
+
* Type: PM_WHEN_NODE
|
4206
|
+
*
|
4207
|
+
* @extends pm_node_t
|
4208
|
+
*/
|
1899
4209
|
typedef struct pm_when_node {
|
4210
|
+
/** The embedded base node. */
|
1900
4211
|
pm_node_t base;
|
4212
|
+
|
4213
|
+
/** WhenNode#keyword_loc */
|
1901
4214
|
pm_location_t keyword_loc;
|
4215
|
+
|
4216
|
+
/** WhenNode#conditions */
|
1902
4217
|
struct pm_node_list conditions;
|
4218
|
+
|
4219
|
+
/** WhenNode#statements */
|
1903
4220
|
struct pm_statements_node *statements;
|
1904
4221
|
} pm_when_node_t;
|
1905
4222
|
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
4223
|
+
/**
|
4224
|
+
* WhileNode
|
4225
|
+
*
|
4226
|
+
* Type: PM_WHILE_NODE
|
4227
|
+
* Flags:
|
4228
|
+
* PM_LOOP_FLAGS_BEGIN_MODIFIER
|
4229
|
+
*
|
4230
|
+
* @extends pm_node_t
|
4231
|
+
*/
|
1911
4232
|
typedef struct pm_while_node {
|
4233
|
+
/** The embedded base node. */
|
1912
4234
|
pm_node_t base;
|
4235
|
+
|
4236
|
+
/** WhileNode#keyword_loc */
|
1913
4237
|
pm_location_t keyword_loc;
|
4238
|
+
|
4239
|
+
/** WhileNode#closing_loc */
|
1914
4240
|
pm_location_t closing_loc;
|
4241
|
+
|
4242
|
+
/** WhileNode#predicate */
|
1915
4243
|
struct pm_node *predicate;
|
4244
|
+
|
4245
|
+
/** WhileNode#statements */
|
1916
4246
|
struct pm_statements_node *statements;
|
1917
4247
|
} pm_while_node_t;
|
1918
4248
|
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
4249
|
+
/**
|
4250
|
+
* XStringNode
|
4251
|
+
*
|
4252
|
+
* Type: PM_X_STRING_NODE
|
4253
|
+
*
|
4254
|
+
* @extends pm_node_t
|
4255
|
+
*/
|
1922
4256
|
typedef struct pm_x_string_node {
|
4257
|
+
/** The embedded base node. */
|
1923
4258
|
pm_node_t base;
|
4259
|
+
|
4260
|
+
/** XStringNode#opening_loc */
|
1924
4261
|
pm_location_t opening_loc;
|
4262
|
+
|
4263
|
+
/** XStringNode#content_loc */
|
1925
4264
|
pm_location_t content_loc;
|
4265
|
+
|
4266
|
+
/** XStringNode#closing_loc */
|
1926
4267
|
pm_location_t closing_loc;
|
4268
|
+
|
4269
|
+
/** XStringNode#unescaped */
|
1927
4270
|
pm_string_t unescaped;
|
1928
4271
|
} pm_x_string_node_t;
|
1929
4272
|
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
4273
|
+
/**
|
4274
|
+
* YieldNode
|
4275
|
+
*
|
4276
|
+
* Type: PM_YIELD_NODE
|
4277
|
+
*
|
4278
|
+
* @extends pm_node_t
|
4279
|
+
*/
|
1933
4280
|
typedef struct pm_yield_node {
|
4281
|
+
/** The embedded base node. */
|
1934
4282
|
pm_node_t base;
|
4283
|
+
|
4284
|
+
/** YieldNode#keyword_loc */
|
1935
4285
|
pm_location_t keyword_loc;
|
4286
|
+
|
4287
|
+
/** YieldNode#lparen_loc */
|
1936
4288
|
pm_location_t lparen_loc;
|
4289
|
+
|
4290
|
+
/** YieldNode#arguments */
|
1937
4291
|
struct pm_arguments_node *arguments;
|
4292
|
+
|
4293
|
+
/** YieldNode#rparen_loc */
|
1938
4294
|
pm_location_t rparen_loc;
|
1939
4295
|
} pm_yield_node_t;
|
1940
4296
|
|
1941
|
-
|
4297
|
+
/**
|
4298
|
+
* Flags for arguments nodes.
|
4299
|
+
*/
|
4300
|
+
typedef enum pm_arguments_node_flags {
|
4301
|
+
/** if arguments contain keyword splat */
|
4302
|
+
PM_ARGUMENTS_NODE_FLAGS_KEYWORD_SPLAT = 1,
|
4303
|
+
} pm_arguments_node_flags_t;
|
4304
|
+
|
4305
|
+
/**
|
4306
|
+
* Flags for call nodes.
|
4307
|
+
*/
|
1942
4308
|
typedef enum pm_call_node_flags {
|
1943
|
-
|
1944
|
-
|
4309
|
+
/** &. operator */
|
4310
|
+
PM_CALL_NODE_FLAGS_SAFE_NAVIGATION = 1,
|
4311
|
+
|
4312
|
+
/** a call that could have been a local variable */
|
4313
|
+
PM_CALL_NODE_FLAGS_VARIABLE_CALL = 2,
|
1945
4314
|
} pm_call_node_flags_t;
|
1946
4315
|
|
1947
|
-
|
4316
|
+
/**
|
4317
|
+
* Flags for integer nodes that correspond to the base of the integer.
|
4318
|
+
*/
|
1948
4319
|
typedef enum pm_integer_base_flags {
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
4320
|
+
/** 0b prefix */
|
4321
|
+
PM_INTEGER_BASE_FLAGS_BINARY = 1,
|
4322
|
+
|
4323
|
+
/** 0o or 0 prefix */
|
4324
|
+
PM_INTEGER_BASE_FLAGS_OCTAL = 2,
|
4325
|
+
|
4326
|
+
/** 0d or no prefix */
|
4327
|
+
PM_INTEGER_BASE_FLAGS_DECIMAL = 4,
|
4328
|
+
|
4329
|
+
/** 0x prefix */
|
4330
|
+
PM_INTEGER_BASE_FLAGS_HEXADECIMAL = 8,
|
1953
4331
|
} pm_integer_base_flags_t;
|
1954
4332
|
|
1955
|
-
|
4333
|
+
/**
|
4334
|
+
* Flags for while and until loop nodes.
|
4335
|
+
*/
|
1956
4336
|
typedef enum pm_loop_flags {
|
1957
|
-
|
4337
|
+
/** a loop after a begin statement, so the body is executed first before the condition */
|
4338
|
+
PM_LOOP_FLAGS_BEGIN_MODIFIER = 1,
|
1958
4339
|
} pm_loop_flags_t;
|
1959
4340
|
|
1960
|
-
|
4341
|
+
/**
|
4342
|
+
* Flags for range and flip-flop nodes.
|
4343
|
+
*/
|
1961
4344
|
typedef enum pm_range_flags {
|
1962
|
-
|
4345
|
+
/** ... operator */
|
4346
|
+
PM_RANGE_FLAGS_EXCLUDE_END = 1,
|
1963
4347
|
} pm_range_flags_t;
|
1964
4348
|
|
1965
|
-
|
4349
|
+
/**
|
4350
|
+
* Flags for regular expression and match last line nodes.
|
4351
|
+
*/
|
1966
4352
|
typedef enum pm_regular_expression_flags {
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
4353
|
+
/** i - ignores the case of characters when matching */
|
4354
|
+
PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE = 1,
|
4355
|
+
|
4356
|
+
/** x - ignores whitespace and allows comments in regular expressions */
|
4357
|
+
PM_REGULAR_EXPRESSION_FLAGS_EXTENDED = 2,
|
4358
|
+
|
4359
|
+
/** m - allows $ to match the end of lines within strings */
|
4360
|
+
PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE = 4,
|
4361
|
+
|
4362
|
+
/** o - only interpolates values into the regular expression once */
|
4363
|
+
PM_REGULAR_EXPRESSION_FLAGS_ONCE = 8,
|
4364
|
+
|
4365
|
+
/** e - forces the EUC-JP encoding */
|
4366
|
+
PM_REGULAR_EXPRESSION_FLAGS_EUC_JP = 16,
|
4367
|
+
|
4368
|
+
/** n - forces the ASCII-8BIT encoding */
|
4369
|
+
PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT = 32,
|
4370
|
+
|
4371
|
+
/** s - forces the Windows-31J encoding */
|
4372
|
+
PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J = 64,
|
4373
|
+
|
4374
|
+
/** u - forces the UTF-8 encoding */
|
4375
|
+
PM_REGULAR_EXPRESSION_FLAGS_UTF_8 = 128,
|
1975
4376
|
} pm_regular_expression_flags_t;
|
1976
4377
|
|
1977
|
-
|
4378
|
+
/**
|
4379
|
+
* Flags for string nodes.
|
4380
|
+
*/
|
1978
4381
|
typedef enum pm_string_flags {
|
1979
|
-
|
4382
|
+
/** frozen by virtue of a `frozen_string_literal` comment */
|
4383
|
+
PM_STRING_FLAGS_FROZEN = 1,
|
1980
4384
|
} pm_string_flags_t;
|
1981
4385
|
|
4386
|
+
/**
|
4387
|
+
* When we're serializing to Java, we want to skip serializing the location
|
4388
|
+
* fields as they won't be used by JRuby or TruffleRuby. This boolean allows us
|
4389
|
+
* to specify that through the environment. It will never be true except for in
|
4390
|
+
* those build systems.
|
4391
|
+
*/
|
1982
4392
|
#define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS false
|
1983
4393
|
|
1984
|
-
#endif
|
4394
|
+
#endif
|