Ruby 3.5.0dev (2025-06-07 revision 16057041178d3084884693937d6f02e0680e0657)
ast.h
1/* :markup: markdown */
2
3/*----------------------------------------------------------------------------*/
4/* This file is generated by the templates/template.rb script and should not */
5/* be modified manually. See */
6/* templates/include/prism/ast.h.erb */
7/* if you are looking to modify the */
8/* template */
9/*----------------------------------------------------------------------------*/
10
13#ifndef PRISM_AST_H
14#define PRISM_AST_H
15
16#include "prism/defines.h"
20
21#include <assert.h>
22#include <stddef.h>
23#include <stdint.h>
24
28typedef enum pm_token_type {
30 PM_TOKEN_EOF = 1,
31
33 PM_TOKEN_MISSING,
34
36 PM_TOKEN_NOT_PROVIDED,
37
39 PM_TOKEN_AMPERSAND,
40
42 PM_TOKEN_AMPERSAND_AMPERSAND,
43
45 PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL,
46
48 PM_TOKEN_AMPERSAND_DOT,
49
51 PM_TOKEN_AMPERSAND_EQUAL,
52
54 PM_TOKEN_BACKTICK,
55
57 PM_TOKEN_BACK_REFERENCE,
58
60 PM_TOKEN_BANG,
61
63 PM_TOKEN_BANG_EQUAL,
64
66 PM_TOKEN_BANG_TILDE,
67
69 PM_TOKEN_BRACE_LEFT,
70
72 PM_TOKEN_BRACE_RIGHT,
73
75 PM_TOKEN_BRACKET_LEFT,
76
78 PM_TOKEN_BRACKET_LEFT_ARRAY,
79
81 PM_TOKEN_BRACKET_LEFT_RIGHT,
82
84 PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL,
85
87 PM_TOKEN_BRACKET_RIGHT,
88
90 PM_TOKEN_CARET,
91
93 PM_TOKEN_CARET_EQUAL,
94
96 PM_TOKEN_CHARACTER_LITERAL,
97
99 PM_TOKEN_CLASS_VARIABLE,
100
102 PM_TOKEN_COLON,
103
105 PM_TOKEN_COLON_COLON,
106
108 PM_TOKEN_COMMA,
109
111 PM_TOKEN_COMMENT,
112
114 PM_TOKEN_CONSTANT,
115
117 PM_TOKEN_DOT,
118
120 PM_TOKEN_DOT_DOT,
121
123 PM_TOKEN_DOT_DOT_DOT,
124
126 PM_TOKEN_EMBDOC_BEGIN,
127
129 PM_TOKEN_EMBDOC_END,
130
132 PM_TOKEN_EMBDOC_LINE,
133
135 PM_TOKEN_EMBEXPR_BEGIN,
136
138 PM_TOKEN_EMBEXPR_END,
139
141 PM_TOKEN_EMBVAR,
142
144 PM_TOKEN_EQUAL,
145
147 PM_TOKEN_EQUAL_EQUAL,
148
150 PM_TOKEN_EQUAL_EQUAL_EQUAL,
151
153 PM_TOKEN_EQUAL_GREATER,
154
156 PM_TOKEN_EQUAL_TILDE,
157
159 PM_TOKEN_FLOAT,
160
162 PM_TOKEN_FLOAT_IMAGINARY,
163
165 PM_TOKEN_FLOAT_RATIONAL,
166
168 PM_TOKEN_FLOAT_RATIONAL_IMAGINARY,
169
171 PM_TOKEN_GLOBAL_VARIABLE,
172
174 PM_TOKEN_GREATER,
175
177 PM_TOKEN_GREATER_EQUAL,
178
180 PM_TOKEN_GREATER_GREATER,
181
183 PM_TOKEN_GREATER_GREATER_EQUAL,
184
186 PM_TOKEN_HEREDOC_END,
187
189 PM_TOKEN_HEREDOC_START,
190
192 PM_TOKEN_IDENTIFIER,
193
195 PM_TOKEN_IGNORED_NEWLINE,
196
198 PM_TOKEN_INSTANCE_VARIABLE,
199
201 PM_TOKEN_INTEGER,
202
204 PM_TOKEN_INTEGER_IMAGINARY,
205
207 PM_TOKEN_INTEGER_RATIONAL,
208
210 PM_TOKEN_INTEGER_RATIONAL_IMAGINARY,
211
213 PM_TOKEN_KEYWORD_ALIAS,
214
216 PM_TOKEN_KEYWORD_AND,
217
219 PM_TOKEN_KEYWORD_BEGIN,
220
222 PM_TOKEN_KEYWORD_BEGIN_UPCASE,
223
225 PM_TOKEN_KEYWORD_BREAK,
226
228 PM_TOKEN_KEYWORD_CASE,
229
231 PM_TOKEN_KEYWORD_CLASS,
232
234 PM_TOKEN_KEYWORD_DEF,
235
237 PM_TOKEN_KEYWORD_DEFINED,
238
240 PM_TOKEN_KEYWORD_DO,
241
243 PM_TOKEN_KEYWORD_DO_LOOP,
244
246 PM_TOKEN_KEYWORD_ELSE,
247
249 PM_TOKEN_KEYWORD_ELSIF,
250
252 PM_TOKEN_KEYWORD_END,
253
255 PM_TOKEN_KEYWORD_END_UPCASE,
256
258 PM_TOKEN_KEYWORD_ENSURE,
259
261 PM_TOKEN_KEYWORD_FALSE,
262
264 PM_TOKEN_KEYWORD_FOR,
265
267 PM_TOKEN_KEYWORD_IF,
268
270 PM_TOKEN_KEYWORD_IF_MODIFIER,
271
273 PM_TOKEN_KEYWORD_IN,
274
276 PM_TOKEN_KEYWORD_MODULE,
277
279 PM_TOKEN_KEYWORD_NEXT,
280
282 PM_TOKEN_KEYWORD_NIL,
283
285 PM_TOKEN_KEYWORD_NOT,
286
288 PM_TOKEN_KEYWORD_OR,
289
291 PM_TOKEN_KEYWORD_REDO,
292
294 PM_TOKEN_KEYWORD_RESCUE,
295
297 PM_TOKEN_KEYWORD_RESCUE_MODIFIER,
298
300 PM_TOKEN_KEYWORD_RETRY,
301
303 PM_TOKEN_KEYWORD_RETURN,
304
306 PM_TOKEN_KEYWORD_SELF,
307
309 PM_TOKEN_KEYWORD_SUPER,
310
312 PM_TOKEN_KEYWORD_THEN,
313
315 PM_TOKEN_KEYWORD_TRUE,
316
318 PM_TOKEN_KEYWORD_UNDEF,
319
321 PM_TOKEN_KEYWORD_UNLESS,
322
324 PM_TOKEN_KEYWORD_UNLESS_MODIFIER,
325
327 PM_TOKEN_KEYWORD_UNTIL,
328
330 PM_TOKEN_KEYWORD_UNTIL_MODIFIER,
331
333 PM_TOKEN_KEYWORD_WHEN,
334
336 PM_TOKEN_KEYWORD_WHILE,
337
339 PM_TOKEN_KEYWORD_WHILE_MODIFIER,
340
342 PM_TOKEN_KEYWORD_YIELD,
343
345 PM_TOKEN_KEYWORD___ENCODING__,
346
348 PM_TOKEN_KEYWORD___FILE__,
349
351 PM_TOKEN_KEYWORD___LINE__,
352
354 PM_TOKEN_LABEL,
355
357 PM_TOKEN_LABEL_END,
358
360 PM_TOKEN_LAMBDA_BEGIN,
361
363 PM_TOKEN_LESS,
364
366 PM_TOKEN_LESS_EQUAL,
367
369 PM_TOKEN_LESS_EQUAL_GREATER,
370
372 PM_TOKEN_LESS_LESS,
373
375 PM_TOKEN_LESS_LESS_EQUAL,
376
378 PM_TOKEN_METHOD_NAME,
379
381 PM_TOKEN_MINUS,
382
384 PM_TOKEN_MINUS_EQUAL,
385
387 PM_TOKEN_MINUS_GREATER,
388
390 PM_TOKEN_NEWLINE,
391
393 PM_TOKEN_NUMBERED_REFERENCE,
394
396 PM_TOKEN_PARENTHESIS_LEFT,
397
399 PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES,
400
402 PM_TOKEN_PARENTHESIS_RIGHT,
403
405 PM_TOKEN_PERCENT,
406
408 PM_TOKEN_PERCENT_EQUAL,
409
411 PM_TOKEN_PERCENT_LOWER_I,
412
414 PM_TOKEN_PERCENT_LOWER_W,
415
417 PM_TOKEN_PERCENT_LOWER_X,
418
420 PM_TOKEN_PERCENT_UPPER_I,
421
423 PM_TOKEN_PERCENT_UPPER_W,
424
426 PM_TOKEN_PIPE,
427
429 PM_TOKEN_PIPE_EQUAL,
430
432 PM_TOKEN_PIPE_PIPE,
433
435 PM_TOKEN_PIPE_PIPE_EQUAL,
436
438 PM_TOKEN_PLUS,
439
441 PM_TOKEN_PLUS_EQUAL,
442
444 PM_TOKEN_QUESTION_MARK,
445
447 PM_TOKEN_REGEXP_BEGIN,
448
450 PM_TOKEN_REGEXP_END,
451
453 PM_TOKEN_SEMICOLON,
454
456 PM_TOKEN_SLASH,
457
459 PM_TOKEN_SLASH_EQUAL,
460
462 PM_TOKEN_STAR,
463
465 PM_TOKEN_STAR_EQUAL,
466
468 PM_TOKEN_STAR_STAR,
469
471 PM_TOKEN_STAR_STAR_EQUAL,
472
474 PM_TOKEN_STRING_BEGIN,
475
477 PM_TOKEN_STRING_CONTENT,
478
480 PM_TOKEN_STRING_END,
481
483 PM_TOKEN_SYMBOL_BEGIN,
484
486 PM_TOKEN_TILDE,
487
489 PM_TOKEN_UAMPERSAND,
490
492 PM_TOKEN_UCOLON_COLON,
493
495 PM_TOKEN_UDOT_DOT,
496
498 PM_TOKEN_UDOT_DOT_DOT,
499
501 PM_TOKEN_UMINUS,
502
504 PM_TOKEN_UMINUS_NUM,
505
507 PM_TOKEN_UPLUS,
508
510 PM_TOKEN_USTAR,
511
513 PM_TOKEN_USTAR_STAR,
514
516 PM_TOKEN_WORDS_SEP,
517
519 PM_TOKEN___END__,
520
522 PM_TOKEN_MAXIMUM,
523} pm_token_type_t;
524
529typedef struct {
531 pm_token_type_t type;
532
534 const uint8_t *start;
535
537 const uint8_t *end;
538} pm_token_t;
539
544typedef struct {
546 const uint8_t *start;
547
549 const uint8_t *end;
551
552struct pm_node;
553
557typedef struct pm_node_list {
559 size_t size;
560
562 size_t capacity;
563
565 struct pm_node **nodes;
567
571enum pm_node_type {
573 PM_ALIAS_GLOBAL_VARIABLE_NODE = 1,
574
576 PM_ALIAS_METHOD_NODE = 2,
577
579 PM_ALTERNATION_PATTERN_NODE = 3,
580
582 PM_AND_NODE = 4,
583
585 PM_ARGUMENTS_NODE = 5,
586
588 PM_ARRAY_NODE = 6,
589
591 PM_ARRAY_PATTERN_NODE = 7,
592
594 PM_ASSOC_NODE = 8,
595
597 PM_ASSOC_SPLAT_NODE = 9,
598
600 PM_BACK_REFERENCE_READ_NODE = 10,
601
603 PM_BEGIN_NODE = 11,
604
606 PM_BLOCK_ARGUMENT_NODE = 12,
607
609 PM_BLOCK_LOCAL_VARIABLE_NODE = 13,
610
612 PM_BLOCK_NODE = 14,
613
615 PM_BLOCK_PARAMETER_NODE = 15,
616
618 PM_BLOCK_PARAMETERS_NODE = 16,
619
621 PM_BREAK_NODE = 17,
622
624 PM_CALL_AND_WRITE_NODE = 18,
625
627 PM_CALL_NODE = 19,
628
630 PM_CALL_OPERATOR_WRITE_NODE = 20,
631
633 PM_CALL_OR_WRITE_NODE = 21,
634
636 PM_CALL_TARGET_NODE = 22,
637
639 PM_CAPTURE_PATTERN_NODE = 23,
640
642 PM_CASE_MATCH_NODE = 24,
643
645 PM_CASE_NODE = 25,
646
648 PM_CLASS_NODE = 26,
649
651 PM_CLASS_VARIABLE_AND_WRITE_NODE = 27,
652
654 PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE = 28,
655
657 PM_CLASS_VARIABLE_OR_WRITE_NODE = 29,
658
660 PM_CLASS_VARIABLE_READ_NODE = 30,
661
663 PM_CLASS_VARIABLE_TARGET_NODE = 31,
664
666 PM_CLASS_VARIABLE_WRITE_NODE = 32,
667
669 PM_CONSTANT_AND_WRITE_NODE = 33,
670
672 PM_CONSTANT_OPERATOR_WRITE_NODE = 34,
673
675 PM_CONSTANT_OR_WRITE_NODE = 35,
676
678 PM_CONSTANT_PATH_AND_WRITE_NODE = 36,
679
681 PM_CONSTANT_PATH_NODE = 37,
682
684 PM_CONSTANT_PATH_OPERATOR_WRITE_NODE = 38,
685
687 PM_CONSTANT_PATH_OR_WRITE_NODE = 39,
688
690 PM_CONSTANT_PATH_TARGET_NODE = 40,
691
693 PM_CONSTANT_PATH_WRITE_NODE = 41,
694
696 PM_CONSTANT_READ_NODE = 42,
697
699 PM_CONSTANT_TARGET_NODE = 43,
700
702 PM_CONSTANT_WRITE_NODE = 44,
703
705 PM_DEF_NODE = 45,
706
708 PM_DEFINED_NODE = 46,
709
711 PM_ELSE_NODE = 47,
712
714 PM_EMBEDDED_STATEMENTS_NODE = 48,
715
717 PM_EMBEDDED_VARIABLE_NODE = 49,
718
720 PM_ENSURE_NODE = 50,
721
723 PM_FALSE_NODE = 51,
724
726 PM_FIND_PATTERN_NODE = 52,
727
729 PM_FLIP_FLOP_NODE = 53,
730
732 PM_FLOAT_NODE = 54,
733
735 PM_FOR_NODE = 55,
736
738 PM_FORWARDING_ARGUMENTS_NODE = 56,
739
741 PM_FORWARDING_PARAMETER_NODE = 57,
742
744 PM_FORWARDING_SUPER_NODE = 58,
745
747 PM_GLOBAL_VARIABLE_AND_WRITE_NODE = 59,
748
750 PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE = 60,
751
753 PM_GLOBAL_VARIABLE_OR_WRITE_NODE = 61,
754
756 PM_GLOBAL_VARIABLE_READ_NODE = 62,
757
759 PM_GLOBAL_VARIABLE_TARGET_NODE = 63,
760
762 PM_GLOBAL_VARIABLE_WRITE_NODE = 64,
763
765 PM_HASH_NODE = 65,
766
768 PM_HASH_PATTERN_NODE = 66,
769
771 PM_IF_NODE = 67,
772
774 PM_IMAGINARY_NODE = 68,
775
777 PM_IMPLICIT_NODE = 69,
778
780 PM_IMPLICIT_REST_NODE = 70,
781
783 PM_IN_NODE = 71,
784
786 PM_INDEX_AND_WRITE_NODE = 72,
787
789 PM_INDEX_OPERATOR_WRITE_NODE = 73,
790
792 PM_INDEX_OR_WRITE_NODE = 74,
793
795 PM_INDEX_TARGET_NODE = 75,
796
798 PM_INSTANCE_VARIABLE_AND_WRITE_NODE = 76,
799
801 PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE = 77,
802
804 PM_INSTANCE_VARIABLE_OR_WRITE_NODE = 78,
805
807 PM_INSTANCE_VARIABLE_READ_NODE = 79,
808
810 PM_INSTANCE_VARIABLE_TARGET_NODE = 80,
811
813 PM_INSTANCE_VARIABLE_WRITE_NODE = 81,
814
816 PM_INTEGER_NODE = 82,
817
819 PM_INTERPOLATED_MATCH_LAST_LINE_NODE = 83,
820
822 PM_INTERPOLATED_REGULAR_EXPRESSION_NODE = 84,
823
825 PM_INTERPOLATED_STRING_NODE = 85,
826
828 PM_INTERPOLATED_SYMBOL_NODE = 86,
829
831 PM_INTERPOLATED_X_STRING_NODE = 87,
832
834 PM_IT_LOCAL_VARIABLE_READ_NODE = 88,
835
837 PM_IT_PARAMETERS_NODE = 89,
838
840 PM_KEYWORD_HASH_NODE = 90,
841
843 PM_KEYWORD_REST_PARAMETER_NODE = 91,
844
846 PM_LAMBDA_NODE = 92,
847
849 PM_LOCAL_VARIABLE_AND_WRITE_NODE = 93,
850
852 PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE = 94,
853
855 PM_LOCAL_VARIABLE_OR_WRITE_NODE = 95,
856
858 PM_LOCAL_VARIABLE_READ_NODE = 96,
859
861 PM_LOCAL_VARIABLE_TARGET_NODE = 97,
862
864 PM_LOCAL_VARIABLE_WRITE_NODE = 98,
865
867 PM_MATCH_LAST_LINE_NODE = 99,
868
870 PM_MATCH_PREDICATE_NODE = 100,
871
873 PM_MATCH_REQUIRED_NODE = 101,
874
876 PM_MATCH_WRITE_NODE = 102,
877
879 PM_MISSING_NODE = 103,
880
882 PM_MODULE_NODE = 104,
883
885 PM_MULTI_TARGET_NODE = 105,
886
888 PM_MULTI_WRITE_NODE = 106,
889
891 PM_NEXT_NODE = 107,
892
894 PM_NIL_NODE = 108,
895
897 PM_NO_KEYWORDS_PARAMETER_NODE = 109,
898
900 PM_NUMBERED_PARAMETERS_NODE = 110,
901
903 PM_NUMBERED_REFERENCE_READ_NODE = 111,
904
906 PM_OPTIONAL_KEYWORD_PARAMETER_NODE = 112,
907
909 PM_OPTIONAL_PARAMETER_NODE = 113,
910
912 PM_OR_NODE = 114,
913
915 PM_PARAMETERS_NODE = 115,
916
918 PM_PARENTHESES_NODE = 116,
919
921 PM_PINNED_EXPRESSION_NODE = 117,
922
924 PM_PINNED_VARIABLE_NODE = 118,
925
927 PM_POST_EXECUTION_NODE = 119,
928
930 PM_PRE_EXECUTION_NODE = 120,
931
933 PM_PROGRAM_NODE = 121,
934
936 PM_RANGE_NODE = 122,
937
939 PM_RATIONAL_NODE = 123,
940
942 PM_REDO_NODE = 124,
943
945 PM_REGULAR_EXPRESSION_NODE = 125,
946
948 PM_REQUIRED_KEYWORD_PARAMETER_NODE = 126,
949
951 PM_REQUIRED_PARAMETER_NODE = 127,
952
954 PM_RESCUE_MODIFIER_NODE = 128,
955
957 PM_RESCUE_NODE = 129,
958
960 PM_REST_PARAMETER_NODE = 130,
961
963 PM_RETRY_NODE = 131,
964
966 PM_RETURN_NODE = 132,
967
969 PM_SELF_NODE = 133,
970
972 PM_SHAREABLE_CONSTANT_NODE = 134,
973
975 PM_SINGLETON_CLASS_NODE = 135,
976
978 PM_SOURCE_ENCODING_NODE = 136,
979
981 PM_SOURCE_FILE_NODE = 137,
982
984 PM_SOURCE_LINE_NODE = 138,
985
987 PM_SPLAT_NODE = 139,
988
990 PM_STATEMENTS_NODE = 140,
991
993 PM_STRING_NODE = 141,
994
996 PM_SUPER_NODE = 142,
997
999 PM_SYMBOL_NODE = 143,
1000
1002 PM_TRUE_NODE = 144,
1003
1005 PM_UNDEF_NODE = 145,
1006
1008 PM_UNLESS_NODE = 146,
1009
1011 PM_UNTIL_NODE = 147,
1012
1014 PM_WHEN_NODE = 148,
1015
1017 PM_WHILE_NODE = 149,
1018
1020 PM_X_STRING_NODE = 150,
1021
1023 PM_YIELD_NODE = 151,
1024
1026 PM_SCOPE_NODE
1027};
1028
1033typedef uint16_t pm_node_type_t;
1034
1039typedef uint16_t pm_node_flags_t;
1040
1045static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = 0x1;
1046static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = 0x2;
1047
1052#define PM_NODE_TYPE(node) ((enum pm_node_type) (node)->type)
1053
1057#define PM_NODE_TYPE_P(node, type) (PM_NODE_TYPE(node) == (type))
1058
1062#define PM_NODE_FLAG_P(node, flag) ((((pm_node_t *)(node))->flags & (flag)) != 0)
1063
1068typedef struct pm_node {
1073 pm_node_type_t type;
1074
1079 pm_node_flags_t flags;
1080
1085 uint32_t node_id;
1086
1092} pm_node_t;
1093
1141
1201
1249
1262typedef struct pm_and_node {
1265
1266
1278 struct pm_node *left;
1279
1292
1303
1338
1390
1475
1532
1570
1599
1679
1717
1748
1820
1874
1952
1990
2084
2211
2315
2409
2481
2529
2599
2669
2757
2815
2858
2896
2925
2948
3010
3048
3091
3129
3162
3229
3267
3300
3338
3395
3424
3447
3509
3588
3626
3659
3692
3720
3757
3770typedef struct pm_false_node {
3773
3775
3829
3865
3878typedef struct pm_float_node {
3881
3882
3888 double value;
3890
3980
4000
4019
4042
4080
4123
4161
4190
4213
4275
4326
4372
4484
4507
4526typedef struct pm_implicit_node {
4529
4530
4536
4563
4601
4665
4734
4798
4855
4893
4936
4974
5003
5026
5088
5119
5165
5211
5248
5281
5314
5332
5350
5376
5413
5461
5504
5552
5595
5641
5669
5748
5799
5832
5865
5893
5908
5956
6044
6147
6175
6188typedef struct pm_nil_node {
6191
6193
6222
6245
6276
6313
6355
6368typedef struct pm_or_node {
6371
6372
6384 struct pm_node *left;
6385
6398
6408} pm_or_node_t;
6409
6463
6499
6537
6565
6603
6641
6666
6724
6766
6779typedef struct pm_redo_node {
6782
6784
6835
6867
6894
6927
6985
7022
7035typedef struct pm_retry_node {
7038
7040
7068
7081typedef struct pm_self_node {
7084
7086
7117
7165
7183
7214
7232
7260
7283
7333
7379
7425
7438typedef struct pm_true_node {
7441
7443
7471
7559
7608
7648
7697
7739
7777
7781typedef enum pm_arguments_node_flags {
7783 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING = 4,
7784
7786 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS = 8,
7787
7789 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT = 16,
7790
7792 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT = 32,
7793
7795 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS = 64,
7796} pm_arguments_node_flags_t;
7797
7801typedef enum pm_array_node_flags {
7803 PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT = 4,
7804} pm_array_node_flags_t;
7805
7809typedef enum pm_call_node_flags {
7811 PM_CALL_NODE_FLAGS_SAFE_NAVIGATION = 4,
7812
7814 PM_CALL_NODE_FLAGS_VARIABLE_CALL = 8,
7815
7817 PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE = 16,
7818
7820 PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY = 32,
7821} pm_call_node_flags_t;
7822
7826typedef enum pm_encoding_flags {
7828 PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING = 4,
7829
7831 PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING = 8,
7832} pm_encoding_flags_t;
7833
7837typedef enum pm_integer_base_flags {
7839 PM_INTEGER_BASE_FLAGS_BINARY = 4,
7840
7842 PM_INTEGER_BASE_FLAGS_DECIMAL = 8,
7843
7845 PM_INTEGER_BASE_FLAGS_OCTAL = 16,
7846
7848 PM_INTEGER_BASE_FLAGS_HEXADECIMAL = 32,
7849} pm_integer_base_flags_t;
7850
7854typedef enum pm_interpolated_string_node_flags {
7856 PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN = 4,
7857
7859 PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE = 8,
7860} pm_interpolated_string_node_flags_t;
7861
7865typedef enum pm_keyword_hash_node_flags {
7867 PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS = 4,
7868} pm_keyword_hash_node_flags_t;
7869
7873typedef enum pm_loop_flags {
7875 PM_LOOP_FLAGS_BEGIN_MODIFIER = 4,
7876} pm_loop_flags_t;
7877
7881typedef enum pm_parameter_flags {
7883 PM_PARAMETER_FLAGS_REPEATED_PARAMETER = 4,
7884} pm_parameter_flags_t;
7885
7889typedef enum pm_parentheses_node_flags {
7891 PM_PARENTHESES_NODE_FLAGS_MULTIPLE_STATEMENTS = 4,
7892} pm_parentheses_node_flags_t;
7893
7897typedef enum pm_range_flags {
7899 PM_RANGE_FLAGS_EXCLUDE_END = 4,
7900} pm_range_flags_t;
7901
7905typedef enum pm_regular_expression_flags {
7907 PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE = 4,
7908
7910 PM_REGULAR_EXPRESSION_FLAGS_EXTENDED = 8,
7911
7913 PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE = 16,
7914
7916 PM_REGULAR_EXPRESSION_FLAGS_ONCE = 32,
7917
7919 PM_REGULAR_EXPRESSION_FLAGS_EUC_JP = 64,
7920
7922 PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT = 128,
7923
7925 PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J = 256,
7926
7928 PM_REGULAR_EXPRESSION_FLAGS_UTF_8 = 512,
7929
7931 PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING = 1024,
7932
7934 PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING = 2048,
7935
7937 PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING = 4096,
7938} pm_regular_expression_flags_t;
7939
7943typedef enum pm_shareable_constant_node_flags {
7945 PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL = 4,
7946
7948 PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING = 8,
7949
7951 PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY = 16,
7952} pm_shareable_constant_node_flags_t;
7953
7957typedef enum pm_string_flags {
7959 PM_STRING_FLAGS_FORCED_UTF8_ENCODING = 4,
7960
7962 PM_STRING_FLAGS_FORCED_BINARY_ENCODING = 8,
7963
7965 PM_STRING_FLAGS_FROZEN = 16,
7966
7968 PM_STRING_FLAGS_MUTABLE = 32,
7969} pm_string_flags_t;
7970
7974typedef enum pm_symbol_flags {
7976 PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING = 4,
7977
7979 PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING = 8,
7980
7982 PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING = 16,
7983} pm_symbol_flags_t;
7984
7991#define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS 0
7992
7993#endif
A data structure that stores a set of strings.
uint32_t pm_constant_id_t
A constant id is a unique identifier for a constant in the constant pool.
This module provides functions for working with arbitrary-sized integers.
A generic string type that can have various ownership semantics.
Macro definitions used throughout the prism library.
AliasGlobalVariableNode.
Definition ast.h:1106
struct pm_node * old_name
AliasGlobalVariableNode::old_name.
Definition ast.h:1129
pm_node_t base
The embedded base node.
Definition ast.h:1108
struct pm_node * new_name
AliasGlobalVariableNode::new_name.
Definition ast.h:1119
pm_location_t keyword_loc
AliasGlobalVariableNode::keyword_loc.
Definition ast.h:1139
AliasMethodNode.
Definition ast.h:1154
struct pm_node * old_name
AliasMethodNode::old_name.
Definition ast.h:1189
struct pm_node * new_name
AliasMethodNode::new_name.
Definition ast.h:1173
pm_node_t base
The embedded base node.
Definition ast.h:1156
pm_location_t keyword_loc
AliasMethodNode::keyword_loc.
Definition ast.h:1199
AlternationPatternNode.
Definition ast.h:1214
pm_location_t operator_loc
AlternationPatternNode::operator_loc.
Definition ast.h:1247
struct pm_node * left
AlternationPatternNode::left.
Definition ast.h:1227
struct pm_node * right
AlternationPatternNode::right.
Definition ast.h:1237
pm_node_t base
The embedded base node.
Definition ast.h:1216
AndNode.
Definition ast.h:1262
struct pm_node * left
AndNode::left.
Definition ast.h:1278
struct pm_node * right
AndNode::right.
Definition ast.h:1291
pm_location_t operator_loc
AndNode::operator_loc.
Definition ast.h:1301
pm_node_t base
The embedded base node.
Definition ast.h:1264
ArgumentsNode.
Definition ast.h:1323
pm_node_t base
The embedded base node.
Definition ast.h:1325
struct pm_node_list arguments
ArgumentsNode::arguments.
Definition ast.h:1336
ArrayNode.
Definition ast.h:1354
pm_node_t base
The embedded base node.
Definition ast.h:1356
pm_location_t closing_loc
ArrayNode::closing_loc.
Definition ast.h:1388
struct pm_node_list elements
ArrayNode::elements.
Definition ast.h:1364
pm_location_t opening_loc
ArrayNode::opening_loc.
Definition ast.h:1376
ArrayPatternNode.
Definition ast.h:1415
struct pm_node_list requireds
ArrayPatternNode::requireds.
Definition ast.h:1433
struct pm_node * rest
ArrayPatternNode::rest.
Definition ast.h:1443
struct pm_node * constant
ArrayPatternNode::constant.
Definition ast.h:1423
pm_location_t opening_loc
ArrayPatternNode::opening_loc.
Definition ast.h:1463
pm_node_t base
The embedded base node.
Definition ast.h:1417
pm_location_t closing_loc
ArrayPatternNode::closing_loc.
Definition ast.h:1473
struct pm_node_list posts
ArrayPatternNode::posts.
Definition ast.h:1453
AssocNode.
Definition ast.h:1488
pm_node_t base
The embedded base node.
Definition ast.h:1490
struct pm_node * value
AssocNode::value.
Definition ast.h:1520
struct pm_node * key
AssocNode::key.
Definition ast.h:1507
pm_location_t operator_loc
AssocNode::operator_loc.
Definition ast.h:1530
AssocSplatNode.
Definition ast.h:1545
struct pm_node * value
AssocSplatNode::value.
Definition ast.h:1558
pm_node_t base
The embedded base node.
Definition ast.h:1547
pm_location_t operator_loc
AssocSplatNode::operator_loc.
Definition ast.h:1568
BackReferenceReadNode.
Definition ast.h:1583
pm_constant_id_t name
BackReferenceReadNode::name.
Definition ast.h:1597
pm_node_t base
The embedded base node.
Definition ast.h:1585
BeginNode.
Definition ast.h:1614
struct pm_ensure_node * ensure_clause
BeginNode::ensure_clause.
Definition ast.h:1667
struct pm_rescue_node * rescue_clause
BeginNode::rescue_clause.
Definition ast.h:1647
struct pm_statements_node * statements
BeginNode::statements.
Definition ast.h:1637
pm_node_t base
The embedded base node.
Definition ast.h:1616
pm_location_t end_keyword_loc
BeginNode::end_keyword_loc.
Definition ast.h:1677
pm_location_t begin_keyword_loc
BeginNode::begin_keyword_loc.
Definition ast.h:1627
struct pm_else_node * else_clause
BeginNode::else_clause.
Definition ast.h:1657
BlockArgumentNode.
Definition ast.h:1692
pm_node_t base
The embedded base node.
Definition ast.h:1694
struct pm_node * expression
BlockArgumentNode::expression.
Definition ast.h:1705
pm_location_t operator_loc
BlockArgumentNode::operator_loc.
Definition ast.h:1715
BlockLocalVariableNode.
Definition ast.h:1733
pm_node_t base
The embedded base node.
Definition ast.h:1735
pm_constant_id_t name
BlockLocalVariableNode::name.
Definition ast.h:1746
BlockNode.
Definition ast.h:1761
pm_node_t base
The embedded base node.
Definition ast.h:1763
pm_location_t closing_loc
BlockNode::closing_loc.
Definition ast.h:1818
struct pm_node * parameters
BlockNode::parameters.
Definition ast.h:1788
pm_location_t opening_loc
BlockNode::opening_loc.
Definition ast.h:1808
struct pm_node * body
BlockNode::body.
Definition ast.h:1798
pm_constant_id_list_t locals
BlockNode::locals.
Definition ast.h:1774
BlockParameterNode.
Definition ast.h:1837
pm_location_t operator_loc
BlockParameterNode::operator_loc.
Definition ast.h:1872
pm_location_t name_loc
BlockParameterNode::name_loc.
Definition ast.h:1861
pm_constant_id_t name
BlockParameterNode::name.
Definition ast.h:1851
pm_node_t base
The embedded base node.
Definition ast.h:1839
BlockParametersNode.
Definition ast.h:1891
struct pm_parameters_node * parameters
BlockParametersNode::parameters.
Definition ast.h:1908
pm_node_t base
The embedded base node.
Definition ast.h:1893
struct pm_node_list locals
BlockParametersNode::locals.
Definition ast.h:1922
pm_location_t closing_loc
BlockParametersNode::closing_loc.
Definition ast.h:1950
pm_location_t opening_loc
BlockParametersNode::opening_loc.
Definition ast.h:1936
BreakNode.
Definition ast.h:1965
struct pm_arguments_node * arguments
BreakNode::arguments.
Definition ast.h:1978
pm_location_t keyword_loc
BreakNode::keyword_loc.
Definition ast.h:1988
pm_node_t base
The embedded base node.
Definition ast.h:1967
CallAndWriteNode.
Definition ast.h:2009
pm_location_t operator_loc
CallAndWriteNode::operator_loc.
Definition ast.h:2072
struct pm_node * value
CallAndWriteNode::value.
Definition ast.h:2082
pm_node_t base
The embedded base node.
Definition ast.h:2011
pm_location_t call_operator_loc
CallAndWriteNode::call_operator_loc.
Definition ast.h:2032
pm_location_t message_loc
CallAndWriteNode::message_loc.
Definition ast.h:2042
pm_constant_id_t read_name
CallAndWriteNode::read_name.
Definition ast.h:2052
pm_constant_id_t write_name
CallAndWriteNode::write_name.
Definition ast.h:2062
struct pm_node * receiver
CallAndWriteNode::receiver.
Definition ast.h:2022
CallNode.
Definition ast.h:2118
pm_location_t opening_loc
CallNode::opening_loc.
Definition ast.h:2179
pm_location_t closing_loc
CallNode::closing_loc.
Definition ast.h:2199
struct pm_node * receiver
CallNode::receiver.
Definition ast.h:2137
pm_constant_id_t name
CallNode::name.
Definition ast.h:2160
pm_node_t base
The embedded base node.
Definition ast.h:2120
pm_location_t call_operator_loc
CallNode::call_operator_loc.
Definition ast.h:2150
pm_location_t message_loc
CallNode::message_loc.
Definition ast.h:2170
struct pm_arguments_node * arguments
CallNode::arguments.
Definition ast.h:2189
struct pm_node * block
CallNode::block.
Definition ast.h:2209
CallOperatorWriteNode.
Definition ast.h:2230
pm_constant_id_t read_name
CallOperatorWriteNode::read_name.
Definition ast.h:2273
pm_constant_id_t binary_operator
CallOperatorWriteNode::binary_operator.
Definition ast.h:2293
pm_location_t binary_operator_loc
CallOperatorWriteNode::binary_operator_loc.
Definition ast.h:2303
struct pm_node * receiver
CallOperatorWriteNode::receiver.
Definition ast.h:2243
pm_node_t base
The embedded base node.
Definition ast.h:2232
pm_constant_id_t write_name
CallOperatorWriteNode::write_name.
Definition ast.h:2283
pm_location_t message_loc
CallOperatorWriteNode::message_loc.
Definition ast.h:2263
struct pm_node * value
CallOperatorWriteNode::value.
Definition ast.h:2313
pm_location_t call_operator_loc
CallOperatorWriteNode::call_operator_loc.
Definition ast.h:2253
CallOrWriteNode.
Definition ast.h:2334
pm_location_t operator_loc
CallOrWriteNode::operator_loc.
Definition ast.h:2397
pm_location_t call_operator_loc
CallOrWriteNode::call_operator_loc.
Definition ast.h:2357
pm_node_t base
The embedded base node.
Definition ast.h:2336
struct pm_node * receiver
CallOrWriteNode::receiver.
Definition ast.h:2347
struct pm_node * value
CallOrWriteNode::value.
Definition ast.h:2407
pm_constant_id_t write_name
CallOrWriteNode::write_name.
Definition ast.h:2387
pm_constant_id_t read_name
CallOrWriteNode::read_name.
Definition ast.h:2377
pm_location_t message_loc
CallOrWriteNode::message_loc.
Definition ast.h:2367
CallTargetNode.
Definition ast.h:2436
pm_node_t base
The embedded base node.
Definition ast.h:2438
pm_constant_id_t name
CallTargetNode::name.
Definition ast.h:2469
struct pm_node * receiver
CallTargetNode::receiver.
Definition ast.h:2449
pm_location_t call_operator_loc
CallTargetNode::call_operator_loc.
Definition ast.h:2459
pm_location_t message_loc
CallTargetNode::message_loc.
Definition ast.h:2479
CapturePatternNode.
Definition ast.h:2494
struct pm_local_variable_target_node * target
CapturePatternNode::target.
Definition ast.h:2517
pm_location_t operator_loc
CapturePatternNode::operator_loc.
Definition ast.h:2527
struct pm_node * value
CapturePatternNode::value.
Definition ast.h:2507
pm_node_t base
The embedded base node.
Definition ast.h:2496
CaseMatchNode.
Definition ast.h:2544
pm_location_t end_keyword_loc
CaseMatchNode::end_keyword_loc.
Definition ast.h:2597
struct pm_node_list conditions
CaseMatchNode::conditions.
Definition ast.h:2567
pm_node_t base
The embedded base node.
Definition ast.h:2546
pm_location_t case_keyword_loc
CaseMatchNode::case_keyword_loc.
Definition ast.h:2587
struct pm_else_node * else_clause
CaseMatchNode::else_clause.
Definition ast.h:2577
struct pm_node * predicate
CaseMatchNode::predicate.
Definition ast.h:2557
CaseNode.
Definition ast.h:2614
struct pm_node * predicate
CaseNode::predicate.
Definition ast.h:2627
struct pm_else_node * else_clause
CaseNode::else_clause.
Definition ast.h:2647
struct pm_node_list conditions
CaseNode::conditions.
Definition ast.h:2637
pm_node_t base
The embedded base node.
Definition ast.h:2616
pm_location_t case_keyword_loc
CaseNode::case_keyword_loc.
Definition ast.h:2657
pm_location_t end_keyword_loc
CaseNode::end_keyword_loc.
Definition ast.h:2667
ClassNode.
Definition ast.h:2682
pm_location_t class_keyword_loc
ClassNode::class_keyword_loc.
Definition ast.h:2700
pm_location_t end_keyword_loc
ClassNode::end_keyword_loc.
Definition ast.h:2746
struct pm_node * constant_path
ClassNode::constant_path.
Definition ast.h:2705
pm_constant_id_list_t locals
ClassNode::locals.
Definition ast.h:2690
pm_location_t inheritance_operator_loc
ClassNode::inheritance_operator_loc.
Definition ast.h:2715
pm_constant_id_t name
ClassNode::name.
Definition ast.h:2755
pm_node_t base
The embedded base node.
Definition ast.h:2684
struct pm_node * body
ClassNode::body.
Definition ast.h:2736
struct pm_node * superclass
ClassNode::superclass.
Definition ast.h:2725
ClassVariableAndWriteNode.
Definition ast.h:2770
struct pm_node * value
ClassVariableAndWriteNode::value.
Definition ast.h:2813
pm_constant_id_t name
ClassVariableAndWriteNode::name.
Definition ast.h:2783
pm_location_t operator_loc
ClassVariableAndWriteNode::operator_loc.
Definition ast.h:2803
pm_node_t base
The embedded base node.
Definition ast.h:2772
pm_location_t name_loc
ClassVariableAndWriteNode::name_loc.
Definition ast.h:2793
ClassVariableOperatorWriteNode.
Definition ast.h:2828
pm_node_t base
The embedded base node.
Definition ast.h:2830
pm_constant_id_t name
ClassVariableOperatorWriteNode::name.
Definition ast.h:2836
pm_location_t name_loc
ClassVariableOperatorWriteNode::name_loc.
Definition ast.h:2841
pm_constant_id_t binary_operator
ClassVariableOperatorWriteNode::binary_operator.
Definition ast.h:2856
struct pm_node * value
ClassVariableOperatorWriteNode::value.
Definition ast.h:2851
pm_location_t binary_operator_loc
ClassVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:2846
ClassVariableOrWriteNode.
Definition ast.h:2871
pm_node_t base
The embedded base node.
Definition ast.h:2873
pm_location_t name_loc
ClassVariableOrWriteNode::name_loc.
Definition ast.h:2884
pm_location_t operator_loc
ClassVariableOrWriteNode::operator_loc.
Definition ast.h:2889
pm_constant_id_t name
ClassVariableOrWriteNode::name.
Definition ast.h:2879
struct pm_node * value
ClassVariableOrWriteNode::value.
Definition ast.h:2894
ClassVariableReadNode.
Definition ast.h:2909
pm_node_t base
The embedded base node.
Definition ast.h:2911
pm_constant_id_t name
ClassVariableReadNode::name.
Definition ast.h:2923
ClassVariableTargetNode.
Definition ast.h:2938
pm_node_t base
The embedded base node.
Definition ast.h:2940
pm_constant_id_t name
ClassVariableTargetNode::name.
Definition ast.h:2946
ClassVariableWriteNode.
Definition ast.h:2961
pm_location_t name_loc
ClassVariableWriteNode::name_loc.
Definition ast.h:2985
pm_node_t base
The embedded base node.
Definition ast.h:2963
struct pm_node * value
ClassVariableWriteNode::value.
Definition ast.h:2998
pm_location_t operator_loc
ClassVariableWriteNode::operator_loc.
Definition ast.h:3008
pm_constant_id_t name
ClassVariableWriteNode::name.
Definition ast.h:2975
ConstantAndWriteNode.
Definition ast.h:3023
pm_location_t operator_loc
ConstantAndWriteNode::operator_loc.
Definition ast.h:3041
pm_location_t name_loc
ConstantAndWriteNode::name_loc.
Definition ast.h:3036
pm_constant_id_t name
ConstantAndWriteNode::name.
Definition ast.h:3031
struct pm_node * value
ConstantAndWriteNode::value.
Definition ast.h:3046
pm_node_t base
The embedded base node.
Definition ast.h:3025
A list of constant IDs.
ConstantOperatorWriteNode.
Definition ast.h:3061
pm_constant_id_t name
ConstantOperatorWriteNode::name.
Definition ast.h:3069
pm_location_t name_loc
ConstantOperatorWriteNode::name_loc.
Definition ast.h:3074
pm_constant_id_t binary_operator
ConstantOperatorWriteNode::binary_operator.
Definition ast.h:3089
pm_location_t binary_operator_loc
ConstantOperatorWriteNode::binary_operator_loc.
Definition ast.h:3079
struct pm_node * value
ConstantOperatorWriteNode::value.
Definition ast.h:3084
pm_node_t base
The embedded base node.
Definition ast.h:3063
ConstantOrWriteNode.
Definition ast.h:3104
pm_location_t operator_loc
ConstantOrWriteNode::operator_loc.
Definition ast.h:3122
pm_location_t name_loc
ConstantOrWriteNode::name_loc.
Definition ast.h:3117
pm_constant_id_t name
ConstantOrWriteNode::name.
Definition ast.h:3112
pm_node_t base
The embedded base node.
Definition ast.h:3106
struct pm_node * value
ConstantOrWriteNode::value.
Definition ast.h:3127
ConstantPathAndWriteNode.
Definition ast.h:3142
pm_node_t base
The embedded base node.
Definition ast.h:3144
struct pm_constant_path_node * target
ConstantPathAndWriteNode::target.
Definition ast.h:3150
pm_location_t operator_loc
ConstantPathAndWriteNode::operator_loc.
Definition ast.h:3155
struct pm_node * value
ConstantPathAndWriteNode::value.
Definition ast.h:3160
ConstantPathNode.
Definition ast.h:3175
pm_location_t delimiter_loc
ConstantPathNode::delimiter_loc.
Definition ast.h:3214
pm_node_t base
The embedded base node.
Definition ast.h:3177
pm_location_t name_loc
ConstantPathNode::name_loc.
Definition ast.h:3227
pm_constant_id_t name
ConstantPathNode::name.
Definition ast.h:3201
struct pm_node * parent
ConstantPathNode::parent.
Definition ast.h:3194
ConstantPathOperatorWriteNode.
Definition ast.h:3242
struct pm_constant_path_node * target
ConstantPathOperatorWriteNode::target.
Definition ast.h:3250
struct pm_node * value
ConstantPathOperatorWriteNode::value.
Definition ast.h:3260
pm_constant_id_t binary_operator
ConstantPathOperatorWriteNode::binary_operator.
Definition ast.h:3265
pm_node_t base
The embedded base node.
Definition ast.h:3244
pm_location_t binary_operator_loc
ConstantPathOperatorWriteNode::binary_operator_loc.
Definition ast.h:3255
ConstantPathOrWriteNode.
Definition ast.h:3280
pm_location_t operator_loc
ConstantPathOrWriteNode::operator_loc.
Definition ast.h:3293
pm_node_t base
The embedded base node.
Definition ast.h:3282
struct pm_node * value
ConstantPathOrWriteNode::value.
Definition ast.h:3298
struct pm_constant_path_node * target
ConstantPathOrWriteNode::target.
Definition ast.h:3288
ConstantPathTargetNode.
Definition ast.h:3313
pm_node_t base
The embedded base node.
Definition ast.h:3315
struct pm_node * parent
ConstantPathTargetNode::parent.
Definition ast.h:3321
pm_location_t delimiter_loc
ConstantPathTargetNode::delimiter_loc.
Definition ast.h:3331
pm_constant_id_t name
ConstantPathTargetNode::name.
Definition ast.h:3326
pm_location_t name_loc
ConstantPathTargetNode::name_loc.
Definition ast.h:3336
ConstantPathWriteNode.
Definition ast.h:3357
struct pm_constant_path_node * target
ConstantPathWriteNode::target.
Definition ast.h:3373
pm_location_t operator_loc
ConstantPathWriteNode::operator_loc.
Definition ast.h:3383
pm_node_t base
The embedded base node.
Definition ast.h:3359
struct pm_node * value
ConstantPathWriteNode::value.
Definition ast.h:3393
ConstantReadNode.
Definition ast.h:3408
pm_node_t base
The embedded base node.
Definition ast.h:3410
pm_constant_id_t name
ConstantReadNode::name.
Definition ast.h:3422
ConstantTargetNode.
Definition ast.h:3437
pm_node_t base
The embedded base node.
Definition ast.h:3439
pm_constant_id_t name
ConstantTargetNode::name.
Definition ast.h:3445
ConstantWriteNode.
Definition ast.h:3460
pm_node_t base
The embedded base node.
Definition ast.h:3462
struct pm_node * value
ConstantWriteNode::value.
Definition ast.h:3497
pm_constant_id_t name
ConstantWriteNode::name.
Definition ast.h:3474
pm_location_t name_loc
ConstantWriteNode::name_loc.
Definition ast.h:3484
pm_location_t operator_loc
ConstantWriteNode::operator_loc.
Definition ast.h:3507
DefNode.
Definition ast.h:3523
struct pm_parameters_node * parameters
DefNode::parameters.
Definition ast.h:3546
pm_location_t end_keyword_loc
DefNode::end_keyword_loc.
Definition ast.h:3586
pm_constant_id_t name
DefNode::name.
Definition ast.h:3531
pm_location_t name_loc
DefNode::name_loc.
Definition ast.h:3536
pm_location_t rparen_loc
DefNode::rparen_loc.
Definition ast.h:3576
struct pm_node * body
DefNode::body.
Definition ast.h:3551
pm_location_t equal_loc
DefNode::equal_loc.
Definition ast.h:3581
pm_location_t def_keyword_loc
DefNode::def_keyword_loc.
Definition ast.h:3561
struct pm_node * receiver
DefNode::receiver.
Definition ast.h:3541
pm_node_t base
The embedded base node.
Definition ast.h:3525
pm_location_t lparen_loc
DefNode::lparen_loc.
Definition ast.h:3571
pm_location_t operator_loc
DefNode::operator_loc.
Definition ast.h:3566
pm_constant_id_list_t locals
DefNode::locals.
Definition ast.h:3556
DefinedNode.
Definition ast.h:3601
pm_location_t lparen_loc
DefinedNode::lparen_loc.
Definition ast.h:3609
pm_node_t base
The embedded base node.
Definition ast.h:3603
pm_location_t rparen_loc
DefinedNode::rparen_loc.
Definition ast.h:3619
pm_location_t keyword_loc
DefinedNode::keyword_loc.
Definition ast.h:3624
struct pm_node * value
DefinedNode::value.
Definition ast.h:3614
ElseNode.
Definition ast.h:3639
struct pm_statements_node * statements
ElseNode::statements.
Definition ast.h:3652
pm_location_t else_keyword_loc
ElseNode::else_keyword_loc.
Definition ast.h:3647
pm_node_t base
The embedded base node.
Definition ast.h:3641
pm_location_t end_keyword_loc
ElseNode::end_keyword_loc.
Definition ast.h:3657
EmbeddedStatementsNode.
Definition ast.h:3672
pm_location_t closing_loc
EmbeddedStatementsNode::closing_loc.
Definition ast.h:3690
struct pm_statements_node * statements
EmbeddedStatementsNode::statements.
Definition ast.h:3685
pm_node_t base
The embedded base node.
Definition ast.h:3674
pm_location_t opening_loc
EmbeddedStatementsNode::opening_loc.
Definition ast.h:3680
EmbeddedVariableNode.
Definition ast.h:3705
struct pm_node * variable
EmbeddedVariableNode::variable.
Definition ast.h:3718
pm_location_t operator_loc
EmbeddedVariableNode::operator_loc.
Definition ast.h:3713
pm_node_t base
The embedded base node.
Definition ast.h:3707
EnsureNode.
Definition ast.h:3737
struct pm_statements_node * statements
EnsureNode::statements.
Definition ast.h:3750
pm_node_t base
The embedded base node.
Definition ast.h:3739
pm_location_t ensure_keyword_loc
EnsureNode::ensure_keyword_loc.
Definition ast.h:3745
pm_location_t end_keyword_loc
EnsureNode::end_keyword_loc.
Definition ast.h:3755
FalseNode.
Definition ast.h:3770
pm_node_t base
The embedded base node.
Definition ast.h:3772
FindPatternNode.
Definition ast.h:3794
struct pm_node * constant
FindPatternNode::constant.
Definition ast.h:3802
struct pm_node * right
FindPatternNode::right.
Definition ast.h:3817
pm_location_t opening_loc
FindPatternNode::opening_loc.
Definition ast.h:3822
pm_node_t base
The embedded base node.
Definition ast.h:3796
struct pm_node_list requireds
FindPatternNode::requireds.
Definition ast.h:3812
struct pm_splat_node * left
FindPatternNode::left.
Definition ast.h:3807
pm_location_t closing_loc
FindPatternNode::closing_loc.
Definition ast.h:3827
FlipFlopNode.
Definition ast.h:3845
pm_node_t base
The embedded base node.
Definition ast.h:3847
pm_location_t operator_loc
FlipFlopNode::operator_loc.
Definition ast.h:3863
struct pm_node * left
FlipFlopNode::left.
Definition ast.h:3853
struct pm_node * right
FlipFlopNode::right.
Definition ast.h:3858
FloatNode.
Definition ast.h:3878
double value
FloatNode::value.
Definition ast.h:3888
pm_node_t base
The embedded base node.
Definition ast.h:3880
ForNode.
Definition ast.h:3903
struct pm_statements_node * statements
ForNode::statements.
Definition ast.h:3938
struct pm_node * index
ForNode::index.
Definition ast.h:3916
struct pm_node * collection
ForNode::collection.
Definition ast.h:3926
pm_node_t base
The embedded base node.
Definition ast.h:3905
pm_location_t end_keyword_loc
ForNode::end_keyword_loc.
Definition ast.h:3978
pm_location_t for_keyword_loc
ForNode::for_keyword_loc.
Definition ast.h:3948
pm_location_t do_keyword_loc
ForNode::do_keyword_loc.
Definition ast.h:3968
pm_location_t in_keyword_loc
ForNode::in_keyword_loc.
Definition ast.h:3958
ForwardingArgumentsNode.
Definition ast.h:3995
pm_node_t base
The embedded base node.
Definition ast.h:3997
ForwardingParameterNode.
Definition ast.h:4014
pm_node_t base
The embedded base node.
Definition ast.h:4016
ForwardingSuperNode.
Definition ast.h:4032
pm_node_t base
The embedded base node.
Definition ast.h:4034
struct pm_block_node * block
ForwardingSuperNode::block.
Definition ast.h:4040
GlobalVariableAndWriteNode.
Definition ast.h:4055
pm_location_t operator_loc
GlobalVariableAndWriteNode::operator_loc.
Definition ast.h:4073
pm_node_t base
The embedded base node.
Definition ast.h:4057
pm_location_t name_loc
GlobalVariableAndWriteNode::name_loc.
Definition ast.h:4068
struct pm_node * value
GlobalVariableAndWriteNode::value.
Definition ast.h:4078
pm_constant_id_t name
GlobalVariableAndWriteNode::name.
Definition ast.h:4063
GlobalVariableOperatorWriteNode.
Definition ast.h:4093
pm_constant_id_t name
GlobalVariableOperatorWriteNode::name.
Definition ast.h:4101
pm_constant_id_t binary_operator
GlobalVariableOperatorWriteNode::binary_operator.
Definition ast.h:4121
struct pm_node * value
GlobalVariableOperatorWriteNode::value.
Definition ast.h:4116
pm_location_t name_loc
GlobalVariableOperatorWriteNode::name_loc.
Definition ast.h:4106
pm_node_t base
The embedded base node.
Definition ast.h:4095
pm_location_t binary_operator_loc
GlobalVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:4111
GlobalVariableOrWriteNode.
Definition ast.h:4136
pm_constant_id_t name
GlobalVariableOrWriteNode::name.
Definition ast.h:4144
pm_location_t name_loc
GlobalVariableOrWriteNode::name_loc.
Definition ast.h:4149
pm_node_t base
The embedded base node.
Definition ast.h:4138
pm_location_t operator_loc
GlobalVariableOrWriteNode::operator_loc.
Definition ast.h:4154
struct pm_node * value
GlobalVariableOrWriteNode::value.
Definition ast.h:4159
GlobalVariableReadNode.
Definition ast.h:4174
pm_node_t base
The embedded base node.
Definition ast.h:4176
pm_constant_id_t name
GlobalVariableReadNode::name.
Definition ast.h:4188
GlobalVariableTargetNode.
Definition ast.h:4203
pm_constant_id_t name
GlobalVariableTargetNode::name.
Definition ast.h:4211
pm_node_t base
The embedded base node.
Definition ast.h:4205
GlobalVariableWriteNode.
Definition ast.h:4226
struct pm_node * value
GlobalVariableWriteNode::value.
Definition ast.h:4263
pm_location_t name_loc
GlobalVariableWriteNode::name_loc.
Definition ast.h:4250
pm_location_t operator_loc
GlobalVariableWriteNode::operator_loc.
Definition ast.h:4273
pm_constant_id_t name
GlobalVariableWriteNode::name.
Definition ast.h:4240
pm_node_t base
The embedded base node.
Definition ast.h:4228
HashNode.
Definition ast.h:4288
struct pm_node_list elements
HashNode::elements.
Definition ast.h:4314
pm_node_t base
The embedded base node.
Definition ast.h:4290
pm_location_t closing_loc
HashNode::closing_loc.
Definition ast.h:4324
pm_location_t opening_loc
HashNode::opening_loc.
Definition ast.h:4301
HashPatternNode.
Definition ast.h:4342
struct pm_node_list elements
HashPatternNode::elements.
Definition ast.h:4355
pm_location_t opening_loc
HashPatternNode::opening_loc.
Definition ast.h:4365
pm_node_t base
The embedded base node.
Definition ast.h:4344
struct pm_node * rest
HashPatternNode::rest.
Definition ast.h:4360
pm_location_t closing_loc
HashPatternNode::closing_loc.
Definition ast.h:4370
struct pm_node * constant
HashPatternNode::constant.
Definition ast.h:4350
IfNode.
Definition ast.h:4391
struct pm_node * predicate
IfNode::predicate.
Definition ast.h:4424
pm_location_t end_keyword_loc
IfNode::end_keyword_loc.
Definition ast.h:4482
pm_location_t if_keyword_loc
IfNode::if_keyword_loc.
Definition ast.h:4406
struct pm_statements_node * statements
IfNode::statements.
Definition ast.h:4451
pm_node_t base
The embedded base node.
Definition ast.h:4393
struct pm_node * subsequent
IfNode::subsequent.
Definition ast.h:4470
pm_location_t then_keyword_loc
IfNode::then_keyword_loc.
Definition ast.h:4437
ImaginaryNode.
Definition ast.h:4497
struct pm_node * numeric
ImaginaryNode::numeric.
Definition ast.h:4505
pm_node_t base
The embedded base node.
Definition ast.h:4499
ImplicitNode.
Definition ast.h:4526
struct pm_node * value
ImplicitNode::value.
Definition ast.h:4534
pm_node_t base
The embedded base node.
Definition ast.h:4528
ImplicitRestNode.
Definition ast.h:4558
pm_node_t base
The embedded base node.
Definition ast.h:4560
InNode.
Definition ast.h:4576
struct pm_statements_node * statements
InNode::statements.
Definition ast.h:4589
struct pm_node * pattern
InNode::pattern.
Definition ast.h:4584
pm_node_t base
The embedded base node.
Definition ast.h:4578
pm_location_t then_loc
InNode::then_loc.
Definition ast.h:4599
pm_location_t in_loc
InNode::in_loc.
Definition ast.h:4594
IndexAndWriteNode.
Definition ast.h:4620
struct pm_arguments_node * arguments
IndexAndWriteNode::arguments.
Definition ast.h:4643
struct pm_node * receiver
IndexAndWriteNode::receiver.
Definition ast.h:4628
pm_node_t base
The embedded base node.
Definition ast.h:4622
struct pm_block_argument_node * block
IndexAndWriteNode::block.
Definition ast.h:4653
struct pm_node * value
IndexAndWriteNode::value.
Definition ast.h:4663
pm_location_t operator_loc
IndexAndWriteNode::operator_loc.
Definition ast.h:4658
pm_location_t closing_loc
IndexAndWriteNode::closing_loc.
Definition ast.h:4648
pm_location_t opening_loc
IndexAndWriteNode::opening_loc.
Definition ast.h:4638
pm_location_t call_operator_loc
IndexAndWriteNode::call_operator_loc.
Definition ast.h:4633
IndexOperatorWriteNode.
Definition ast.h:4684
pm_node_t base
The embedded base node.
Definition ast.h:4686
struct pm_block_argument_node * block
IndexOperatorWriteNode::block.
Definition ast.h:4717
pm_location_t binary_operator_loc
IndexOperatorWriteNode::binary_operator_loc.
Definition ast.h:4727
struct pm_node * value
IndexOperatorWriteNode::value.
Definition ast.h:4732
pm_location_t opening_loc
IndexOperatorWriteNode::opening_loc.
Definition ast.h:4702
pm_location_t call_operator_loc
IndexOperatorWriteNode::call_operator_loc.
Definition ast.h:4697
pm_location_t closing_loc
IndexOperatorWriteNode::closing_loc.
Definition ast.h:4712
struct pm_arguments_node * arguments
IndexOperatorWriteNode::arguments.
Definition ast.h:4707
pm_constant_id_t binary_operator
IndexOperatorWriteNode::binary_operator.
Definition ast.h:4722
struct pm_node * receiver
IndexOperatorWriteNode::receiver.
Definition ast.h:4692
IndexOrWriteNode.
Definition ast.h:4753
pm_location_t closing_loc
IndexOrWriteNode::closing_loc.
Definition ast.h:4781
pm_location_t call_operator_loc
IndexOrWriteNode::call_operator_loc.
Definition ast.h:4766
pm_node_t base
The embedded base node.
Definition ast.h:4755
struct pm_block_argument_node * block
IndexOrWriteNode::block.
Definition ast.h:4786
pm_location_t operator_loc
IndexOrWriteNode::operator_loc.
Definition ast.h:4791
struct pm_node * receiver
IndexOrWriteNode::receiver.
Definition ast.h:4761
pm_location_t opening_loc
IndexOrWriteNode::opening_loc.
Definition ast.h:4771
struct pm_node * value
IndexOrWriteNode::value.
Definition ast.h:4796
struct pm_arguments_node * arguments
IndexOrWriteNode::arguments.
Definition ast.h:4776
IndexTargetNode.
Definition ast.h:4825
pm_node_t base
The embedded base node.
Definition ast.h:4827
struct pm_node * receiver
IndexTargetNode::receiver.
Definition ast.h:4833
pm_location_t closing_loc
IndexTargetNode::closing_loc.
Definition ast.h:4848
struct pm_arguments_node * arguments
IndexTargetNode::arguments.
Definition ast.h:4843
pm_location_t opening_loc
IndexTargetNode::opening_loc.
Definition ast.h:4838
struct pm_block_argument_node * block
IndexTargetNode::block.
Definition ast.h:4853
InstanceVariableAndWriteNode.
Definition ast.h:4868
pm_location_t operator_loc
InstanceVariableAndWriteNode::operator_loc.
Definition ast.h:4886
pm_location_t name_loc
InstanceVariableAndWriteNode::name_loc.
Definition ast.h:4881
struct pm_node * value
InstanceVariableAndWriteNode::value.
Definition ast.h:4891
pm_node_t base
The embedded base node.
Definition ast.h:4870
pm_constant_id_t name
InstanceVariableAndWriteNode::name.
Definition ast.h:4876
InstanceVariableOperatorWriteNode.
Definition ast.h:4906
struct pm_node * value
InstanceVariableOperatorWriteNode::value.
Definition ast.h:4929
pm_constant_id_t binary_operator
InstanceVariableOperatorWriteNode::binary_operator.
Definition ast.h:4934
pm_location_t binary_operator_loc
InstanceVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:4924
pm_constant_id_t name
InstanceVariableOperatorWriteNode::name.
Definition ast.h:4914
pm_node_t base
The embedded base node.
Definition ast.h:4908
pm_location_t name_loc
InstanceVariableOperatorWriteNode::name_loc.
Definition ast.h:4919
InstanceVariableOrWriteNode.
Definition ast.h:4949
pm_location_t operator_loc
InstanceVariableOrWriteNode::operator_loc.
Definition ast.h:4967
struct pm_node * value
InstanceVariableOrWriteNode::value.
Definition ast.h:4972
pm_node_t base
The embedded base node.
Definition ast.h:4951
pm_location_t name_loc
InstanceVariableOrWriteNode::name_loc.
Definition ast.h:4962
pm_constant_id_t name
InstanceVariableOrWriteNode::name.
Definition ast.h:4957
InstanceVariableReadNode.
Definition ast.h:4987
pm_constant_id_t name
InstanceVariableReadNode::name.
Definition ast.h:5001
pm_node_t base
The embedded base node.
Definition ast.h:4989
InstanceVariableTargetNode.
Definition ast.h:5016
pm_constant_id_t name
InstanceVariableTargetNode::name.
Definition ast.h:5024
pm_node_t base
The embedded base node.
Definition ast.h:5018
InstanceVariableWriteNode.
Definition ast.h:5039
pm_location_t operator_loc
InstanceVariableWriteNode::operator_loc.
Definition ast.h:5086
pm_constant_id_t name
InstanceVariableWriteNode::name.
Definition ast.h:5053
pm_node_t base
The embedded base node.
Definition ast.h:5041
struct pm_node * value
InstanceVariableWriteNode::value.
Definition ast.h:5076
pm_location_t name_loc
InstanceVariableWriteNode::name_loc.
Definition ast.h:5063
IntegerNode.
Definition ast.h:5107
pm_integer_t value
IntegerNode::value.
Definition ast.h:5117
pm_node_t base
The embedded base node.
Definition ast.h:5109
A structure represents an arbitrary-sized integer.
Definition pm_integer.h:20
InterpolatedMatchLastLineNode.
Definition ast.h:5145
pm_node_t base
The embedded base node.
Definition ast.h:5147
pm_location_t closing_loc
InterpolatedMatchLastLineNode::closing_loc.
Definition ast.h:5163
struct pm_node_list parts
InterpolatedMatchLastLineNode::parts.
Definition ast.h:5158
pm_location_t opening_loc
InterpolatedMatchLastLineNode::opening_loc.
Definition ast.h:5153
InterpolatedRegularExpressionNode.
Definition ast.h:5191
pm_location_t opening_loc
InterpolatedRegularExpressionNode::opening_loc.
Definition ast.h:5199
struct pm_node_list parts
InterpolatedRegularExpressionNode::parts.
Definition ast.h:5204
pm_node_t base
The embedded base node.
Definition ast.h:5193
pm_location_t closing_loc
InterpolatedRegularExpressionNode::closing_loc.
Definition ast.h:5209
InterpolatedStringNode.
Definition ast.h:5228
pm_node_t base
The embedded base node.
Definition ast.h:5230
pm_location_t closing_loc
InterpolatedStringNode::closing_loc.
Definition ast.h:5246
pm_location_t opening_loc
InterpolatedStringNode::opening_loc.
Definition ast.h:5236
struct pm_node_list parts
InterpolatedStringNode::parts.
Definition ast.h:5241
InterpolatedSymbolNode.
Definition ast.h:5261
struct pm_node_list parts
InterpolatedSymbolNode::parts.
Definition ast.h:5274
pm_location_t closing_loc
InterpolatedSymbolNode::closing_loc.
Definition ast.h:5279
pm_location_t opening_loc
InterpolatedSymbolNode::opening_loc.
Definition ast.h:5269
pm_node_t base
The embedded base node.
Definition ast.h:5263
InterpolatedXStringNode.
Definition ast.h:5294
pm_location_t opening_loc
InterpolatedXStringNode::opening_loc.
Definition ast.h:5302
pm_location_t closing_loc
InterpolatedXStringNode::closing_loc.
Definition ast.h:5312
pm_node_t base
The embedded base node.
Definition ast.h:5296
struct pm_node_list parts
InterpolatedXStringNode::parts.
Definition ast.h:5307
ItLocalVariableReadNode.
Definition ast.h:5327
pm_node_t base
The embedded base node.
Definition ast.h:5329
ItParametersNode.
Definition ast.h:5345
pm_node_t base
The embedded base node.
Definition ast.h:5347
KeywordHashNode.
Definition ast.h:5366
pm_node_t base
The embedded base node.
Definition ast.h:5368
struct pm_node_list elements
KeywordHashNode::elements.
Definition ast.h:5374
KeywordRestParameterNode.
Definition ast.h:5393
pm_node_t base
The embedded base node.
Definition ast.h:5395
pm_constant_id_t name
KeywordRestParameterNode::name.
Definition ast.h:5401
pm_location_t operator_loc
KeywordRestParameterNode::operator_loc.
Definition ast.h:5411
pm_location_t name_loc
KeywordRestParameterNode::name_loc.
Definition ast.h:5406
LambdaNode.
Definition ast.h:5426
pm_location_t closing_loc
LambdaNode::closing_loc.
Definition ast.h:5449
pm_node_t base
The embedded base node.
Definition ast.h:5428
struct pm_node * body
LambdaNode::body.
Definition ast.h:5459
pm_location_t opening_loc
LambdaNode::opening_loc.
Definition ast.h:5444
struct pm_node * parameters
LambdaNode::parameters.
Definition ast.h:5454
pm_location_t operator_loc
LambdaNode::operator_loc.
Definition ast.h:5439
pm_constant_id_list_t locals
LambdaNode::locals.
Definition ast.h:5434
LocalVariableAndWriteNode.
Definition ast.h:5474
pm_constant_id_t name
LocalVariableAndWriteNode::name.
Definition ast.h:5497
pm_node_t base
The embedded base node.
Definition ast.h:5476
uint32_t depth
LocalVariableAndWriteNode::depth.
Definition ast.h:5502
pm_location_t operator_loc
LocalVariableAndWriteNode::operator_loc.
Definition ast.h:5487
struct pm_node * value
LocalVariableAndWriteNode::value.
Definition ast.h:5492
pm_location_t name_loc
LocalVariableAndWriteNode::name_loc.
Definition ast.h:5482
LocalVariableOperatorWriteNode.
Definition ast.h:5517
uint32_t depth
LocalVariableOperatorWriteNode::depth.
Definition ast.h:5550
pm_constant_id_t binary_operator
LocalVariableOperatorWriteNode::binary_operator.
Definition ast.h:5545
pm_node_t base
The embedded base node.
Definition ast.h:5519
struct pm_node * value
LocalVariableOperatorWriteNode::value.
Definition ast.h:5535
pm_location_t name_loc
LocalVariableOperatorWriteNode::name_loc.
Definition ast.h:5525
pm_location_t binary_operator_loc
LocalVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:5530
pm_constant_id_t name
LocalVariableOperatorWriteNode::name.
Definition ast.h:5540
LocalVariableOrWriteNode.
Definition ast.h:5565
uint32_t depth
LocalVariableOrWriteNode::depth.
Definition ast.h:5593
pm_location_t operator_loc
LocalVariableOrWriteNode::operator_loc.
Definition ast.h:5578
struct pm_node * value
LocalVariableOrWriteNode::value.
Definition ast.h:5583
pm_node_t base
The embedded base node.
Definition ast.h:5567
pm_constant_id_t name
LocalVariableOrWriteNode::name.
Definition ast.h:5588
pm_location_t name_loc
LocalVariableOrWriteNode::name_loc.
Definition ast.h:5573
LocalVariableReadNode.
Definition ast.h:5608
uint32_t depth
LocalVariableReadNode::depth.
Definition ast.h:5639
pm_constant_id_t name
LocalVariableReadNode::name.
Definition ast.h:5626
pm_node_t base
The embedded base node.
Definition ast.h:5610
LocalVariableTargetNode.
Definition ast.h:5654
uint32_t depth
LocalVariableTargetNode::depth.
Definition ast.h:5667
pm_constant_id_t name
LocalVariableTargetNode::name.
Definition ast.h:5662
pm_node_t base
The embedded base node.
Definition ast.h:5656
LocalVariableWriteNode.
Definition ast.h:5682
pm_location_t operator_loc
LocalVariableWriteNode::operator_loc.
Definition ast.h:5746
pm_location_t name_loc
LocalVariableWriteNode::name_loc.
Definition ast.h:5719
pm_node_t base
The embedded base node.
Definition ast.h:5684
struct pm_node * value
LocalVariableWriteNode::value.
Definition ast.h:5736
uint32_t depth
LocalVariableWriteNode::depth.
Definition ast.h:5709
pm_constant_id_t name
LocalVariableWriteNode::name.
Definition ast.h:5696
This represents a range of bytes in the source string to which a node or token corresponds.
Definition ast.h:544
const uint8_t * start
A pointer to the start location of the range in the source.
Definition ast.h:546
const uint8_t * end
A pointer to the end location of the range in the source.
Definition ast.h:549
MatchLastLineNode.
Definition ast.h:5774
pm_location_t content_loc
MatchLastLineNode::content_loc.
Definition ast.h:5787
pm_location_t opening_loc
MatchLastLineNode::opening_loc.
Definition ast.h:5782
pm_location_t closing_loc
MatchLastLineNode::closing_loc.
Definition ast.h:5792
pm_string_t unescaped
MatchLastLineNode::unescaped.
Definition ast.h:5797
pm_node_t base
The embedded base node.
Definition ast.h:5776
MatchPredicateNode.
Definition ast.h:5812
pm_location_t operator_loc
MatchPredicateNode::operator_loc.
Definition ast.h:5830
struct pm_node * pattern
MatchPredicateNode::pattern.
Definition ast.h:5825
struct pm_node * value
MatchPredicateNode::value.
Definition ast.h:5820
pm_node_t base
The embedded base node.
Definition ast.h:5814
MatchRequiredNode.
Definition ast.h:5845
pm_node_t base
The embedded base node.
Definition ast.h:5847
pm_location_t operator_loc
MatchRequiredNode::operator_loc.
Definition ast.h:5863
struct pm_node * value
MatchRequiredNode::value.
Definition ast.h:5853
struct pm_node * pattern
MatchRequiredNode::pattern.
Definition ast.h:5858
MatchWriteNode.
Definition ast.h:5878
pm_node_t base
The embedded base node.
Definition ast.h:5880
struct pm_node_list targets
MatchWriteNode::targets.
Definition ast.h:5891
struct pm_call_node * call
MatchWriteNode::call.
Definition ast.h:5886
MissingNode.
Definition ast.h:5903
pm_node_t base
The embedded base node.
Definition ast.h:5905
ModuleNode.
Definition ast.h:5921
pm_location_t end_keyword_loc
ModuleNode::end_keyword_loc.
Definition ast.h:5949
struct pm_node * constant_path
ModuleNode::constant_path.
Definition ast.h:5939
struct pm_node * body
ModuleNode::body.
Definition ast.h:5944
pm_constant_id_list_t locals
ModuleNode::locals.
Definition ast.h:5929
pm_node_t base
The embedded base node.
Definition ast.h:5923
pm_location_t module_keyword_loc
ModuleNode::module_keyword_loc.
Definition ast.h:5934
pm_constant_id_t name
ModuleNode::name.
Definition ast.h:5954
MultiTargetNode.
Definition ast.h:5974
pm_node_t base
The embedded base node.
Definition ast.h:5976
pm_location_t lparen_loc
MultiTargetNode::lparen_loc.
Definition ast.h:6032
struct pm_node_list lefts
MultiTargetNode::lefts.
Definition ast.h:5992
struct pm_node * rest
MultiTargetNode::rest.
Definition ast.h:6012
pm_location_t rparen_loc
MultiTargetNode::rparen_loc.
Definition ast.h:6042
struct pm_node_list rights
MultiTargetNode::rights.
Definition ast.h:6022
MultiWriteNode.
Definition ast.h:6057
pm_location_t rparen_loc
MultiWriteNode::rparen_loc.
Definition ast.h:6125
struct pm_node * value
MultiWriteNode::value.
Definition ast.h:6145
struct pm_node * rest
MultiWriteNode::rest.
Definition ast.h:6095
struct pm_node_list rights
MultiWriteNode::rights.
Definition ast.h:6105
pm_location_t operator_loc
MultiWriteNode::operator_loc.
Definition ast.h:6135
pm_location_t lparen_loc
MultiWriteNode::lparen_loc.
Definition ast.h:6115
struct pm_node_list lefts
MultiWriteNode::lefts.
Definition ast.h:6075
pm_node_t base
The embedded base node.
Definition ast.h:6059
NextNode.
Definition ast.h:6160
struct pm_arguments_node * arguments
NextNode::arguments.
Definition ast.h:6168
pm_node_t base
The embedded base node.
Definition ast.h:6162
pm_location_t keyword_loc
NextNode::keyword_loc.
Definition ast.h:6173
NilNode.
Definition ast.h:6188
pm_node_t base
The embedded base node.
Definition ast.h:6190
NoKeywordsParameterNode.
Definition ast.h:6207
pm_location_t keyword_loc
NoKeywordsParameterNode::keyword_loc.
Definition ast.h:6220
pm_location_t operator_loc
NoKeywordsParameterNode::operator_loc.
Definition ast.h:6215
pm_node_t base
The embedded base node.
Definition ast.h:6209
A list of nodes in the source, most often used for lists of children.
Definition ast.h:557
size_t size
The number of nodes in the list.
Definition ast.h:559
struct pm_node ** nodes
The nodes in the list.
Definition ast.h:565
size_t capacity
The capacity of the list that has been allocated.
Definition ast.h:562
This is the base structure that represents a node in the syntax tree.
Definition ast.h:1068
pm_node_type_t type
This represents the type of the node.
Definition ast.h:1073
uint32_t node_id
The unique identifier for this node, which is deterministic based on the source.
Definition ast.h:1085
pm_node_flags_t flags
This represents any flags on the node.
Definition ast.h:1079
pm_location_t location
This is the location of the node in the source.
Definition ast.h:1091
NumberedParametersNode.
Definition ast.h:6235
pm_node_t base
The embedded base node.
Definition ast.h:6237
uint8_t maximum
NumberedParametersNode::maximum.
Definition ast.h:6243
NumberedReferenceReadNode.
Definition ast.h:6258
pm_node_t base
The embedded base node.
Definition ast.h:6260
uint32_t number
NumberedReferenceReadNode::number.
Definition ast.h:6274
OptionalKeywordParameterNode.
Definition ast.h:6293
pm_node_t base
The embedded base node.
Definition ast.h:6295
pm_constant_id_t name
OptionalKeywordParameterNode::name.
Definition ast.h:6301
struct pm_node * value
OptionalKeywordParameterNode::value.
Definition ast.h:6311
pm_location_t name_loc
OptionalKeywordParameterNode::name_loc.
Definition ast.h:6306
OptionalParameterNode.
Definition ast.h:6330
pm_location_t name_loc
OptionalParameterNode::name_loc.
Definition ast.h:6343
struct pm_node * value
OptionalParameterNode::value.
Definition ast.h:6353
pm_constant_id_t name
OptionalParameterNode::name.
Definition ast.h:6338
pm_node_t base
The embedded base node.
Definition ast.h:6332
pm_location_t operator_loc
OptionalParameterNode::operator_loc.
Definition ast.h:6348
OrNode.
Definition ast.h:6368
struct pm_node * left
OrNode::left.
Definition ast.h:6384
struct pm_node * right
OrNode::right.
Definition ast.h:6397
pm_node_t base
The embedded base node.
Definition ast.h:6370
pm_location_t operator_loc
OrNode::operator_loc.
Definition ast.h:6407
ParametersNode.
Definition ast.h:6423
struct pm_node * rest
ParametersNode::rest.
Definition ast.h:6441
struct pm_node_list requireds
ParametersNode::requireds.
Definition ast.h:6431
struct pm_block_parameter_node * block
ParametersNode::block.
Definition ast.h:6461
struct pm_node_list optionals
ParametersNode::optionals.
Definition ast.h:6436
struct pm_node_list posts
ParametersNode::posts.
Definition ast.h:6446
pm_node_t base
The embedded base node.
Definition ast.h:6425
struct pm_node * keyword_rest
ParametersNode::keyword_rest.
Definition ast.h:6456
struct pm_node_list keywords
ParametersNode::keywords.
Definition ast.h:6451
ParenthesesNode.
Definition ast.h:6479
struct pm_node * body
ParenthesesNode::body.
Definition ast.h:6487
pm_location_t closing_loc
ParenthesesNode::closing_loc.
Definition ast.h:6497
pm_node_t base
The embedded base node.
Definition ast.h:6481
pm_location_t opening_loc
ParenthesesNode::opening_loc.
Definition ast.h:6492
PinnedExpressionNode.
Definition ast.h:6512
pm_node_t base
The embedded base node.
Definition ast.h:6514
pm_location_t rparen_loc
PinnedExpressionNode::rparen_loc.
Definition ast.h:6535
struct pm_node * expression
PinnedExpressionNode::expression.
Definition ast.h:6520
pm_location_t lparen_loc
PinnedExpressionNode::lparen_loc.
Definition ast.h:6530
pm_location_t operator_loc
PinnedExpressionNode::operator_loc.
Definition ast.h:6525
PinnedVariableNode.
Definition ast.h:6550
struct pm_node * variable
PinnedVariableNode::variable.
Definition ast.h:6558
pm_node_t base
The embedded base node.
Definition ast.h:6552
pm_location_t operator_loc
PinnedVariableNode::operator_loc.
Definition ast.h:6563
PostExecutionNode.
Definition ast.h:6578
pm_location_t closing_loc
PostExecutionNode::closing_loc.
Definition ast.h:6601
struct pm_statements_node * statements
PostExecutionNode::statements.
Definition ast.h:6586
pm_node_t base
The embedded base node.
Definition ast.h:6580
pm_location_t opening_loc
PostExecutionNode::opening_loc.
Definition ast.h:6596
pm_location_t keyword_loc
PostExecutionNode::keyword_loc.
Definition ast.h:6591
PreExecutionNode.
Definition ast.h:6616
struct pm_statements_node * statements
PreExecutionNode::statements.
Definition ast.h:6624
pm_location_t closing_loc
PreExecutionNode::closing_loc.
Definition ast.h:6639
pm_location_t opening_loc
PreExecutionNode::opening_loc.
Definition ast.h:6634
pm_node_t base
The embedded base node.
Definition ast.h:6618
pm_location_t keyword_loc
PreExecutionNode::keyword_loc.
Definition ast.h:6629
ProgramNode.
Definition ast.h:6651
struct pm_statements_node * statements
ProgramNode::statements.
Definition ast.h:6664
pm_node_t base
The embedded base node.
Definition ast.h:6653
pm_constant_id_list_t locals
ProgramNode::locals.
Definition ast.h:6659
RangeNode.
Definition ast.h:6685
struct pm_node * right
RangeNode::right.
Definition ast.h:6715
pm_location_t operator_loc
RangeNode::operator_loc.
Definition ast.h:6722
pm_node_t base
The embedded base node.
Definition ast.h:6687
struct pm_node * left
RangeNode::left.
Definition ast.h:6701
RationalNode.
Definition ast.h:6743
pm_node_t base
The embedded base node.
Definition ast.h:6745
pm_integer_t denominator
RationalNode::denominator.
Definition ast.h:6764
pm_integer_t numerator
RationalNode::numerator.
Definition ast.h:6755
RedoNode.
Definition ast.h:6779
pm_node_t base
The embedded base node.
Definition ast.h:6781
RegularExpressionNode.
Definition ast.h:6810
pm_location_t closing_loc
RegularExpressionNode::closing_loc.
Definition ast.h:6828
pm_node_t base
The embedded base node.
Definition ast.h:6812
pm_string_t unescaped
RegularExpressionNode::unescaped.
Definition ast.h:6833
pm_location_t opening_loc
RegularExpressionNode::opening_loc.
Definition ast.h:6818
pm_location_t content_loc
RegularExpressionNode::content_loc.
Definition ast.h:6823
RequiredKeywordParameterNode.
Definition ast.h:6852
pm_location_t name_loc
RequiredKeywordParameterNode::name_loc.
Definition ast.h:6865
pm_node_t base
The embedded base node.
Definition ast.h:6854
pm_constant_id_t name
RequiredKeywordParameterNode::name.
Definition ast.h:6860
RequiredParameterNode.
Definition ast.h:6884
pm_constant_id_t name
RequiredParameterNode::name.
Definition ast.h:6892
pm_node_t base
The embedded base node.
Definition ast.h:6886
RescueModifierNode.
Definition ast.h:6907
pm_node_t base
The embedded base node.
Definition ast.h:6909
struct pm_node * rescue_expression
RescueModifierNode::rescue_expression.
Definition ast.h:6925
pm_location_t keyword_loc
RescueModifierNode::keyword_loc.
Definition ast.h:6920
struct pm_node * expression
RescueModifierNode::expression.
Definition ast.h:6915
RescueNode.
Definition ast.h:6945
pm_location_t keyword_loc
RescueNode::keyword_loc.
Definition ast.h:6953
struct pm_rescue_node * subsequent
RescueNode::subsequent.
Definition ast.h:6983
pm_location_t then_keyword_loc
RescueNode::then_keyword_loc.
Definition ast.h:6973
pm_location_t operator_loc
RescueNode::operator_loc.
Definition ast.h:6963
struct pm_node * reference
RescueNode::reference.
Definition ast.h:6968
struct pm_node_list exceptions
RescueNode::exceptions.
Definition ast.h:6958
struct pm_statements_node * statements
RescueNode::statements.
Definition ast.h:6978
pm_node_t base
The embedded base node.
Definition ast.h:6947
RestParameterNode.
Definition ast.h:7002
pm_constant_id_t name
RestParameterNode::name.
Definition ast.h:7010
pm_location_t name_loc
RestParameterNode::name_loc.
Definition ast.h:7015
pm_node_t base
The embedded base node.
Definition ast.h:7004
pm_location_t operator_loc
RestParameterNode::operator_loc.
Definition ast.h:7020
RetryNode.
Definition ast.h:7035
pm_node_t base
The embedded base node.
Definition ast.h:7037
ReturnNode.
Definition ast.h:7053
pm_location_t keyword_loc
ReturnNode::keyword_loc.
Definition ast.h:7061
pm_node_t base
The embedded base node.
Definition ast.h:7055
struct pm_arguments_node * arguments
ReturnNode::arguments.
Definition ast.h:7066
SelfNode.
Definition ast.h:7081
pm_node_t base
The embedded base node.
Definition ast.h:7083
ShareableConstantNode.
Definition ast.h:7105
struct pm_node * write
ShareableConstantNode::write.
Definition ast.h:7115
pm_node_t base
The embedded base node.
Definition ast.h:7107
SingletonClassNode.
Definition ast.h:7130
pm_node_t base
The embedded base node.
Definition ast.h:7132
pm_constant_id_list_t locals
SingletonClassNode::locals.
Definition ast.h:7138
pm_location_t operator_loc
SingletonClassNode::operator_loc.
Definition ast.h:7148
struct pm_node * expression
SingletonClassNode::expression.
Definition ast.h:7153
pm_location_t end_keyword_loc
SingletonClassNode::end_keyword_loc.
Definition ast.h:7163
pm_location_t class_keyword_loc
SingletonClassNode::class_keyword_loc.
Definition ast.h:7143
struct pm_node * body
SingletonClassNode::body.
Definition ast.h:7158
SourceEncodingNode.
Definition ast.h:7178
pm_node_t base
The embedded base node.
Definition ast.h:7180
SourceFileNode.
Definition ast.h:7202
pm_string_t filepath
SourceFileNode::filepath.
Definition ast.h:7212
pm_node_t base
The embedded base node.
Definition ast.h:7204
SourceLineNode.
Definition ast.h:7227
pm_node_t base
The embedded base node.
Definition ast.h:7229
SplatNode.
Definition ast.h:7245
struct pm_node * expression
SplatNode::expression.
Definition ast.h:7258
pm_node_t base
The embedded base node.
Definition ast.h:7247
pm_location_t operator_loc
SplatNode::operator_loc.
Definition ast.h:7253
StatementsNode.
Definition ast.h:7273
struct pm_node_list body
StatementsNode::body.
Definition ast.h:7281
pm_node_t base
The embedded base node.
Definition ast.h:7275
StringNode.
Definition ast.h:7308
pm_node_t base
The embedded base node.
Definition ast.h:7310
pm_string_t unescaped
StringNode::unescaped.
Definition ast.h:7331
pm_location_t content_loc
StringNode::content_loc.
Definition ast.h:7321
pm_location_t closing_loc
StringNode::closing_loc.
Definition ast.h:7326
pm_location_t opening_loc
StringNode::opening_loc.
Definition ast.h:7316
A generic string type that can have various ownership semantics.
Definition pm_string.h:33
SuperNode.
Definition ast.h:7349
struct pm_arguments_node * arguments
SuperNode::arguments.
Definition ast.h:7367
pm_location_t lparen_loc
SuperNode::lparen_loc.
Definition ast.h:7362
pm_node_t base
The embedded base node.
Definition ast.h:7351
pm_location_t keyword_loc
SuperNode::keyword_loc.
Definition ast.h:7357
pm_location_t rparen_loc
SuperNode::rparen_loc.
Definition ast.h:7372
struct pm_node * block
SuperNode::block.
Definition ast.h:7377
SymbolNode.
Definition ast.h:7400
pm_location_t opening_loc
SymbolNode::opening_loc.
Definition ast.h:7408
pm_location_t value_loc
SymbolNode::value_loc.
Definition ast.h:7413
pm_location_t closing_loc
SymbolNode::closing_loc.
Definition ast.h:7418
pm_string_t unescaped
SymbolNode::unescaped.
Definition ast.h:7423
pm_node_t base
The embedded base node.
Definition ast.h:7402
This struct represents a token in the Ruby source.
Definition ast.h:529
const uint8_t * end
A pointer to the end location of the token in the source.
Definition ast.h:537
const uint8_t * start
A pointer to the start location of the token in the source.
Definition ast.h:534
pm_token_type_t type
The type of the token.
Definition ast.h:531
TrueNode.
Definition ast.h:7438
pm_node_t base
The embedded base node.
Definition ast.h:7440
UndefNode.
Definition ast.h:7456
pm_node_t base
The embedded base node.
Definition ast.h:7458
pm_location_t keyword_loc
UndefNode::keyword_loc.
Definition ast.h:7469
struct pm_node_list names
UndefNode::names.
Definition ast.h:7464
UnlessNode.
Definition ast.h:7487
pm_location_t keyword_loc
UnlessNode::keyword_loc.
Definition ast.h:7503
pm_location_t then_keyword_loc
UnlessNode::then_keyword_loc.
Definition ast.h:7526
pm_location_t end_keyword_loc
UnlessNode::end_keyword_loc.
Definition ast.h:7557
pm_node_t base
The embedded base node.
Definition ast.h:7489
struct pm_statements_node * statements
UnlessNode::statements.
Definition ast.h:7537
struct pm_node * predicate
UnlessNode::predicate.
Definition ast.h:7516
struct pm_else_node * else_clause
UnlessNode::else_clause.
Definition ast.h:7547
UntilNode.
Definition ast.h:7578
struct pm_statements_node * statements
UntilNode::statements.
Definition ast.h:7606
pm_location_t closing_loc
UntilNode::closing_loc.
Definition ast.h:7596
struct pm_node * predicate
UntilNode::predicate.
Definition ast.h:7601
pm_location_t keyword_loc
UntilNode::keyword_loc.
Definition ast.h:7586
pm_node_t base
The embedded base node.
Definition ast.h:7580
pm_location_t do_keyword_loc
UntilNode::do_keyword_loc.
Definition ast.h:7591
WhenNode.
Definition ast.h:7623
struct pm_statements_node * statements
WhenNode::statements.
Definition ast.h:7646
pm_node_t base
The embedded base node.
Definition ast.h:7625
pm_location_t then_keyword_loc
WhenNode::then_keyword_loc.
Definition ast.h:7641
pm_location_t keyword_loc
WhenNode::keyword_loc.
Definition ast.h:7631
struct pm_node_list conditions
WhenNode::conditions.
Definition ast.h:7636
WhileNode.
Definition ast.h:7667
pm_location_t closing_loc
WhileNode::closing_loc.
Definition ast.h:7685
pm_location_t keyword_loc
WhileNode::keyword_loc.
Definition ast.h:7675
struct pm_statements_node * statements
WhileNode::statements.
Definition ast.h:7695
pm_node_t base
The embedded base node.
Definition ast.h:7669
pm_location_t do_keyword_loc
WhileNode::do_keyword_loc.
Definition ast.h:7680
struct pm_node * predicate
WhileNode::predicate.
Definition ast.h:7690
XStringNode.
Definition ast.h:7714
pm_location_t closing_loc
XStringNode::closing_loc.
Definition ast.h:7732
pm_location_t opening_loc
XStringNode::opening_loc.
Definition ast.h:7722
pm_location_t content_loc
XStringNode::content_loc.
Definition ast.h:7727
pm_string_t unescaped
XStringNode::unescaped.
Definition ast.h:7737
pm_node_t base
The embedded base node.
Definition ast.h:7716
YieldNode.
Definition ast.h:7752
pm_location_t keyword_loc
YieldNode::keyword_loc.
Definition ast.h:7760
pm_location_t lparen_loc
YieldNode::lparen_loc.
Definition ast.h:7765
pm_node_t base
The embedded base node.
Definition ast.h:7754
pm_location_t rparen_loc
YieldNode::rparen_loc.
Definition ast.h:7775
struct pm_arguments_node * arguments
YieldNode::arguments.
Definition ast.h:7770