ruby_prism_sys/bindings.rs
1/* Generated by `bundle exec rake cargo:bindings`. Do not edit by hand.
2 * prism 1.9.0, bindgen 0.72.1, layout_tests(false)
3 * so the file stays portable across pointer widths.
4 */
5/* automatically generated by rust-bindgen 0.72.1 */
6
7/** A constant id is a unique identifier for a constant in the constant pool.
8*/
9pub type pm_constant_id_t = u32;
10/** The type of the string. This field determines how the string should be freed.
11*/
12pub type pm_string_t__bindgen_ty_1 = ::std::os::raw::c_uint;
13/** This is the type of node embedded in the node struct. We explicitly control
14 the size of it here to avoid having the variable-width enum.
15*/
16pub type pm_node_type_t = u16;
17/** These are the flags embedded in the node struct. We explicitly control the
18 size of it here to avoid having the variable-width enum.
19*/
20pub type pm_node_flags_t = u16;
21/** This is the base structure that represents a node in the syntax tree. It is
22 embedded into every node type.
23*/
24pub type pm_node_t = pm_node;
25/** AliasGlobalVariableNode
26
27 Represents the use of the `alias` keyword to alias a global variable.
28
29``` ruby
30 alias $foo $bar
31 ^^^^^^^^^^^^^^^
32```
33
34 Type: ::PM_ALIAS_GLOBAL_VARIABLE_NODE
35
36 @extends pm_node_t
37*/
38pub type pm_alias_global_variable_node_t = pm_alias_global_variable_node;
39/** AliasMethodNode
40
41 Represents the use of the `alias` keyword to alias a method.
42
43``` ruby
44 alias foo bar
45 ^^^^^^^^^^^^^
46```
47
48 Type: ::PM_ALIAS_METHOD_NODE
49
50 @extends pm_node_t
51*/
52pub type pm_alias_method_node_t = pm_alias_method_node;
53/** AlternationPatternNode
54
55 Represents an alternation pattern in pattern matching.
56
57``` ruby
58 foo => bar | baz
59 ^^^^^^^^^
60```
61
62 Type: ::PM_ALTERNATION_PATTERN_NODE
63
64 @extends pm_node_t
65*/
66pub type pm_alternation_pattern_node_t = pm_alternation_pattern_node;
67/** AndNode
68
69 Represents the use of the `&&` operator or the `and` keyword.
70
71``` ruby
72 left and right
73 ^^^^^^^^^^^^^^
74```
75
76 Type: ::PM_AND_NODE
77
78 @extends pm_node_t
79*/
80pub type pm_and_node_t = pm_and_node;
81/** ArgumentsNode
82
83 Represents a set of arguments to a method or a keyword.
84
85``` ruby
86 return foo, bar, baz
87 ^^^^^^^^^^^^^
88```
89
90 Type: ::PM_ARGUMENTS_NODE
91
92 Flags (#pm_arguments_node_flags):
93 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING
94 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS
95 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT
96 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT
97 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS
98
99 @extends pm_node_t
100*/
101pub type pm_arguments_node_t = pm_arguments_node;
102/** ArrayNode
103
104 Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.
105
106``` ruby
107 [1, 2, 3]
108 ^^^^^^^^^
109```
110
111 Type: ::PM_ARRAY_NODE
112
113 Flags (#pm_array_node_flags):
114 * ::PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT
115
116 @extends pm_node_t
117*/
118pub type pm_array_node_t = pm_array_node;
119/** ArrayPatternNode
120
121 Represents an array pattern in pattern matching.
122
123``` ruby
124 foo in 1, 2
125 ^^^^
126```
127
128``` ruby
129 foo in [1, 2]
130 ^^^^^^
131```
132
133``` ruby
134 foo in *bar
135 ^^^^
136```
137
138``` ruby
139 foo in Bar[]
140 ^^^^^
141```
142
143``` ruby
144 foo in Bar[1, 2, 3]
145 ^^^^^^^^^^^^
146```
147
148 Type: ::PM_ARRAY_PATTERN_NODE
149
150 @extends pm_node_t
151*/
152pub type pm_array_pattern_node_t = pm_array_pattern_node;
153/** AssocNode
154
155 Represents a hash key/value pair.
156
157``` ruby
158 { a => b }
159 ^^^^^^
160```
161
162 Type: ::PM_ASSOC_NODE
163
164 @extends pm_node_t
165*/
166pub type pm_assoc_node_t = pm_assoc_node;
167/** AssocSplatNode
168
169 Represents a splat in a hash literal.
170
171``` ruby
172 { **foo }
173 ^^^^^
174```
175
176 Type: ::PM_ASSOC_SPLAT_NODE
177
178 @extends pm_node_t
179*/
180pub type pm_assoc_splat_node_t = pm_assoc_splat_node;
181/** BackReferenceReadNode
182
183 Represents reading a reference to a field in the previous match.
184
185``` ruby
186 $'
187 ^^
188```
189
190 Type: ::PM_BACK_REFERENCE_READ_NODE
191
192 @extends pm_node_t
193*/
194pub type pm_back_reference_read_node_t = pm_back_reference_read_node;
195/** BeginNode
196
197 Represents a begin statement.
198
199``` ruby
200 begin
201 foo
202 end
203 ^^^^^
204```
205
206 Type: ::PM_BEGIN_NODE
207
208 @extends pm_node_t
209*/
210pub type pm_begin_node_t = pm_begin_node;
211/** BlockArgumentNode
212
213 Represents a block argument using `&`.
214
215``` ruby
216 bar(&args)
217 ^^^^^
218```
219
220 Type: ::PM_BLOCK_ARGUMENT_NODE
221
222 @extends pm_node_t
223*/
224pub type pm_block_argument_node_t = pm_block_argument_node;
225/** BlockLocalVariableNode
226
227 Represents a block local variable.
228
229``` ruby
230 a { |; b| }
231 ^
232```
233
234 Type: ::PM_BLOCK_LOCAL_VARIABLE_NODE
235
236 Flags (#pm_parameter_flags):
237 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
238
239 @extends pm_node_t
240*/
241pub type pm_block_local_variable_node_t = pm_block_local_variable_node;
242/** BlockNode
243
244 Represents a block of ruby code.
245
246``` ruby
247 [1, 2, 3].each { |i| puts x }
248 ^^^^^^^^^^^^^^
249```
250
251 Type: ::PM_BLOCK_NODE
252
253 @extends pm_node_t
254*/
255pub type pm_block_node_t = pm_block_node;
256/** BlockParameterNode
257
258 Represents a block parameter of a method, block, or lambda definition.
259
260``` ruby
261 def a(&b)
262 ^^
263 end
264```
265
266 Type: ::PM_BLOCK_PARAMETER_NODE
267
268 Flags (#pm_parameter_flags):
269 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
270
271 @extends pm_node_t
272*/
273pub type pm_block_parameter_node_t = pm_block_parameter_node;
274/** BlockParametersNode
275
276 Represents a block's parameters declaration.
277
278``` ruby
279 -> (a, b = 1; local) { }
280 ^^^^^^^^^^^^^^^^^
281```
282
283``` ruby
284 foo do |a, b = 1; local|
285 ^^^^^^^^^^^^^^^^^
286 end
287```
288
289 Type: ::PM_BLOCK_PARAMETERS_NODE
290
291 @extends pm_node_t
292*/
293pub type pm_block_parameters_node_t = pm_block_parameters_node;
294/** BreakNode
295
296 Represents the use of the `break` keyword.
297
298``` ruby
299 break foo
300 ^^^^^^^^^
301```
302
303 Type: ::PM_BREAK_NODE
304
305 @extends pm_node_t
306*/
307pub type pm_break_node_t = pm_break_node;
308/** CallAndWriteNode
309
310 Represents the use of the `&&=` operator on a call.
311
312``` ruby
313 foo.bar &&= value
314 ^^^^^^^^^^^^^^^^^
315```
316
317 Type: ::PM_CALL_AND_WRITE_NODE
318
319 Flags (#pm_call_node_flags):
320 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
321 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
322 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
323 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
324
325 @extends pm_node_t
326*/
327pub type pm_call_and_write_node_t = pm_call_and_write_node;
328/** CallNode
329
330 Represents a method call, in all of the various forms that can take.
331
332``` ruby
333 foo
334 ^^^
335```
336
337``` ruby
338 foo()
339 ^^^^^
340```
341
342``` ruby
343 +foo
344 ^^^^
345```
346
347``` ruby
348 foo + bar
349 ^^^^^^^^^
350```
351
352``` ruby
353 foo.bar
354 ^^^^^^^
355```
356
357``` ruby
358 foo&.bar
359 ^^^^^^^^
360```
361
362 Type: ::PM_CALL_NODE
363
364 Flags (#pm_call_node_flags):
365 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
366 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
367 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
368 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
369
370 @extends pm_node_t
371*/
372pub type pm_call_node_t = pm_call_node;
373/** CallOperatorWriteNode
374
375 Represents the use of an assignment operator on a call.
376
377``` ruby
378 foo.bar += baz
379 ^^^^^^^^^^^^^^
380```
381
382 Type: ::PM_CALL_OPERATOR_WRITE_NODE
383
384 Flags (#pm_call_node_flags):
385 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
386 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
387 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
388 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
389
390 @extends pm_node_t
391*/
392pub type pm_call_operator_write_node_t = pm_call_operator_write_node;
393/** CallOrWriteNode
394
395 Represents the use of the `||=` operator on a call.
396
397``` ruby
398 foo.bar ||= value
399 ^^^^^^^^^^^^^^^^^
400```
401
402 Type: ::PM_CALL_OR_WRITE_NODE
403
404 Flags (#pm_call_node_flags):
405 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
406 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
407 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
408 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
409
410 @extends pm_node_t
411*/
412pub type pm_call_or_write_node_t = pm_call_or_write_node;
413/** CallTargetNode
414
415 Represents assigning to a method call.
416
417``` ruby
418 foo.bar, = 1
419 ^^^^^^^
420```
421
422``` ruby
423 begin
424 rescue => foo.bar
425 ^^^^^^^
426 end
427```
428
429``` ruby
430 for foo.bar in baz do end
431 ^^^^^^^
432```
433
434 Type: ::PM_CALL_TARGET_NODE
435
436 Flags (#pm_call_node_flags):
437 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
438 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
439 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
440 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
441
442 @extends pm_node_t
443*/
444pub type pm_call_target_node_t = pm_call_target_node;
445/** CapturePatternNode
446
447 Represents assigning to a local variable in pattern matching.
448
449``` ruby
450 foo => [bar => baz]
451 ^^^^^^^^^^
452```
453
454 Type: ::PM_CAPTURE_PATTERN_NODE
455
456 @extends pm_node_t
457*/
458pub type pm_capture_pattern_node_t = pm_capture_pattern_node;
459/** CaseMatchNode
460
461 Represents the use of a case statement for pattern matching.
462
463``` ruby
464 case true
465 in false
466 end
467 ^^^^^^^^^
468```
469
470 Type: ::PM_CASE_MATCH_NODE
471
472 @extends pm_node_t
473*/
474pub type pm_case_match_node_t = pm_case_match_node;
475/** CaseNode
476
477 Represents the use of a case statement.
478
479``` ruby
480 case true
481 when false
482 end
483 ^^^^^^^^^^
484```
485
486 Type: ::PM_CASE_NODE
487
488 @extends pm_node_t
489*/
490pub type pm_case_node_t = pm_case_node;
491/** ClassNode
492
493 Represents a class declaration involving the `class` keyword.
494
495``` ruby
496 class Foo end
497 ^^^^^^^^^^^^^
498```
499
500 Type: ::PM_CLASS_NODE
501
502 @extends pm_node_t
503*/
504pub type pm_class_node_t = pm_class_node;
505/** ClassVariableAndWriteNode
506
507 Represents the use of the `&&=` operator for assignment to a class variable.
508
509``` ruby
510 @@target &&= value
511 ^^^^^^^^^^^^^^^^^^
512```
513
514 Type: ::PM_CLASS_VARIABLE_AND_WRITE_NODE
515
516 @extends pm_node_t
517*/
518pub type pm_class_variable_and_write_node_t = pm_class_variable_and_write_node;
519/** ClassVariableOperatorWriteNode
520
521 Represents assigning to a class variable using an operator that isn't `=`.
522
523``` ruby
524 @@target += value
525 ^^^^^^^^^^^^^^^^^
526```
527
528 Type: ::PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
529
530 @extends pm_node_t
531*/
532pub type pm_class_variable_operator_write_node_t = pm_class_variable_operator_write_node;
533/** ClassVariableOrWriteNode
534
535 Represents the use of the `||=` operator for assignment to a class variable.
536
537``` ruby
538 @@target ||= value
539 ^^^^^^^^^^^^^^^^^^
540```
541
542 Type: ::PM_CLASS_VARIABLE_OR_WRITE_NODE
543
544 @extends pm_node_t
545*/
546pub type pm_class_variable_or_write_node_t = pm_class_variable_or_write_node;
547/** ClassVariableReadNode
548
549 Represents referencing a class variable.
550
551``` ruby
552 @@foo
553 ^^^^^
554```
555
556 Type: ::PM_CLASS_VARIABLE_READ_NODE
557
558 @extends pm_node_t
559*/
560pub type pm_class_variable_read_node_t = pm_class_variable_read_node;
561/** ClassVariableTargetNode
562
563 Represents writing to a class variable in a context that doesn't have an explicit value.
564
565``` ruby
566 @@foo, @@bar = baz
567 ^^^^^ ^^^^^
568```
569
570 Type: ::PM_CLASS_VARIABLE_TARGET_NODE
571
572 @extends pm_node_t
573*/
574pub type pm_class_variable_target_node_t = pm_class_variable_target_node;
575/** ClassVariableWriteNode
576
577 Represents writing to a class variable.
578
579``` ruby
580 @@foo = 1
581 ^^^^^^^^^
582```
583
584 Type: ::PM_CLASS_VARIABLE_WRITE_NODE
585
586 @extends pm_node_t
587*/
588pub type pm_class_variable_write_node_t = pm_class_variable_write_node;
589/** ConstantAndWriteNode
590
591 Represents the use of the `&&=` operator for assignment to a constant.
592
593``` ruby
594 Target &&= value
595 ^^^^^^^^^^^^^^^^
596```
597
598 Type: ::PM_CONSTANT_AND_WRITE_NODE
599
600 @extends pm_node_t
601*/
602pub type pm_constant_and_write_node_t = pm_constant_and_write_node;
603/** ConstantOperatorWriteNode
604
605 Represents assigning to a constant using an operator that isn't `=`.
606
607``` ruby
608 Target += value
609 ^^^^^^^^^^^^^^^
610```
611
612 Type: ::PM_CONSTANT_OPERATOR_WRITE_NODE
613
614 @extends pm_node_t
615*/
616pub type pm_constant_operator_write_node_t = pm_constant_operator_write_node;
617/** ConstantOrWriteNode
618
619 Represents the use of the `||=` operator for assignment to a constant.
620
621``` ruby
622 Target ||= value
623 ^^^^^^^^^^^^^^^^
624```
625
626 Type: ::PM_CONSTANT_OR_WRITE_NODE
627
628 @extends pm_node_t
629*/
630pub type pm_constant_or_write_node_t = pm_constant_or_write_node;
631/** ConstantPathAndWriteNode
632
633 Represents the use of the `&&=` operator for assignment to a constant path.
634
635``` ruby
636 Parent::Child &&= value
637 ^^^^^^^^^^^^^^^^^^^^^^^
638```
639
640 Type: ::PM_CONSTANT_PATH_AND_WRITE_NODE
641
642 @extends pm_node_t
643*/
644pub type pm_constant_path_and_write_node_t = pm_constant_path_and_write_node;
645/** ConstantPathNode
646
647 Represents accessing a constant through a path of `::` operators.
648
649``` ruby
650 Foo::Bar
651 ^^^^^^^^
652```
653
654 Type: ::PM_CONSTANT_PATH_NODE
655
656 @extends pm_node_t
657*/
658pub type pm_constant_path_node_t = pm_constant_path_node;
659/** ConstantPathOperatorWriteNode
660
661 Represents assigning to a constant path using an operator that isn't `=`.
662
663``` ruby
664 Parent::Child += value
665 ^^^^^^^^^^^^^^^^^^^^^^
666```
667
668 Type: ::PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
669
670 @extends pm_node_t
671*/
672pub type pm_constant_path_operator_write_node_t = pm_constant_path_operator_write_node;
673/** ConstantPathOrWriteNode
674
675 Represents the use of the `||=` operator for assignment to a constant path.
676
677``` ruby
678 Parent::Child ||= value
679 ^^^^^^^^^^^^^^^^^^^^^^^
680```
681
682 Type: ::PM_CONSTANT_PATH_OR_WRITE_NODE
683
684 @extends pm_node_t
685*/
686pub type pm_constant_path_or_write_node_t = pm_constant_path_or_write_node;
687/** ConstantPathTargetNode
688
689 Represents writing to a constant path in a context that doesn't have an explicit value.
690
691``` ruby
692 Foo::Foo, Bar::Bar = baz
693 ^^^^^^^^ ^^^^^^^^
694```
695
696 Type: ::PM_CONSTANT_PATH_TARGET_NODE
697
698 @extends pm_node_t
699*/
700pub type pm_constant_path_target_node_t = pm_constant_path_target_node;
701/** ConstantPathWriteNode
702
703 Represents writing to a constant path.
704
705``` ruby
706 ::Foo = 1
707 ^^^^^^^^^
708```
709
710``` ruby
711 Foo::Bar = 1
712 ^^^^^^^^^^^^
713```
714
715``` ruby
716 ::Foo::Bar = 1
717 ^^^^^^^^^^^^^^
718```
719
720 Type: ::PM_CONSTANT_PATH_WRITE_NODE
721
722 @extends pm_node_t
723*/
724pub type pm_constant_path_write_node_t = pm_constant_path_write_node;
725/** ConstantReadNode
726
727 Represents referencing a constant.
728
729``` ruby
730 Foo
731 ^^^
732```
733
734 Type: ::PM_CONSTANT_READ_NODE
735
736 @extends pm_node_t
737*/
738pub type pm_constant_read_node_t = pm_constant_read_node;
739/** ConstantTargetNode
740
741 Represents writing to a constant in a context that doesn't have an explicit value.
742
743``` ruby
744 Foo, Bar = baz
745 ^^^ ^^^
746```
747
748 Type: ::PM_CONSTANT_TARGET_NODE
749
750 @extends pm_node_t
751*/
752pub type pm_constant_target_node_t = pm_constant_target_node;
753/** ConstantWriteNode
754
755 Represents writing to a constant.
756
757``` ruby
758 Foo = 1
759 ^^^^^^^
760```
761
762 Type: ::PM_CONSTANT_WRITE_NODE
763
764 @extends pm_node_t
765*/
766pub type pm_constant_write_node_t = pm_constant_write_node;
767/** DefNode
768
769 Represents a method definition.
770
771``` ruby
772 def method
773 end
774 ^^^^^^^^^^
775```
776
777 Type: ::PM_DEF_NODE
778
779 @extends pm_node_t
780*/
781pub type pm_def_node_t = pm_def_node;
782/** DefinedNode
783
784 Represents the use of the `defined?` keyword.
785
786``` ruby
787 defined?(a)
788 ^^^^^^^^^^^
789```
790
791 Type: ::PM_DEFINED_NODE
792
793 @extends pm_node_t
794*/
795pub type pm_defined_node_t = pm_defined_node;
796/** ElseNode
797
798 Represents an `else` clause in a `case`, `if`, or `unless` statement.
799
800``` ruby
801 if a then b else c end
802 ^^^^^^^^^^
803```
804
805 Type: ::PM_ELSE_NODE
806
807 @extends pm_node_t
808*/
809pub type pm_else_node_t = pm_else_node;
810/** EmbeddedStatementsNode
811
812 Represents an interpolated set of statements.
813
814``` ruby
815 "foo #{bar}"
816 ^^^^^^
817```
818
819 Type: ::PM_EMBEDDED_STATEMENTS_NODE
820
821 @extends pm_node_t
822*/
823pub type pm_embedded_statements_node_t = pm_embedded_statements_node;
824/** EmbeddedVariableNode
825
826 Represents an interpolated variable.
827
828``` ruby
829 "foo #@bar"
830 ^^^^^
831```
832
833 Type: ::PM_EMBEDDED_VARIABLE_NODE
834
835 @extends pm_node_t
836*/
837pub type pm_embedded_variable_node_t = pm_embedded_variable_node;
838/** EnsureNode
839
840 Represents an `ensure` clause in a `begin` statement.
841
842``` ruby
843 begin
844 foo
845 ensure
846 ^^^^^^
847 bar
848 end
849```
850
851 Type: ::PM_ENSURE_NODE
852
853 @extends pm_node_t
854*/
855pub type pm_ensure_node_t = pm_ensure_node;
856/** ErrorRecoveryNode
857
858 Represents a node that is either missing or unexpected and results in a syntax error.
859
860 Type: ::PM_ERROR_RECOVERY_NODE
861
862 @extends pm_node_t
863*/
864pub type pm_error_recovery_node_t = pm_error_recovery_node;
865/** FalseNode
866
867 Represents the use of the literal `false` keyword.
868
869``` ruby
870 false
871 ^^^^^
872```
873
874 Type: ::PM_FALSE_NODE
875
876 @extends pm_node_t
877*/
878pub type pm_false_node_t = pm_false_node;
879/** FindPatternNode
880
881 Represents a find pattern in pattern matching.
882
883``` ruby
884 foo in *bar, baz, *qux
885 ^^^^^^^^^^^^^^^
886```
887
888``` ruby
889 foo in [*bar, baz, *qux]
890 ^^^^^^^^^^^^^^^^^
891```
892
893``` ruby
894 foo in Foo(*bar, baz, *qux)
895 ^^^^^^^^^^^^^^^^^^^^
896```
897
898``` ruby
899 foo => *bar, baz, *qux
900 ^^^^^^^^^^^^^^^
901```
902
903 Type: ::PM_FIND_PATTERN_NODE
904
905 @extends pm_node_t
906*/
907pub type pm_find_pattern_node_t = pm_find_pattern_node;
908/** FlipFlopNode
909
910 Represents the use of the `..` or `...` operators to create flip flops.
911
912``` ruby
913 baz if foo .. bar
914 ^^^^^^^^^^
915```
916
917 Type: ::PM_FLIP_FLOP_NODE
918
919 Flags (#pm_range_flags):
920 * ::PM_RANGE_FLAGS_EXCLUDE_END
921
922 @extends pm_node_t
923*/
924pub type pm_flip_flop_node_t = pm_flip_flop_node;
925/** FloatNode
926
927 Represents a floating point number literal.
928
929``` ruby
930 1.0
931 ^^^
932```
933
934 Type: ::PM_FLOAT_NODE
935
936 @extends pm_node_t
937*/
938pub type pm_float_node_t = pm_float_node;
939/** ForNode
940
941 Represents the use of the `for` keyword.
942
943``` ruby
944 for i in a end
945 ^^^^^^^^^^^^^^
946```
947
948 Type: ::PM_FOR_NODE
949
950 @extends pm_node_t
951*/
952pub type pm_for_node_t = pm_for_node;
953/** ForwardingArgumentsNode
954
955 Represents forwarding all arguments to this method to another method.
956
957``` ruby
958 def foo(...)
959 bar(...)
960 ^^^
961 end
962```
963
964 Type: ::PM_FORWARDING_ARGUMENTS_NODE
965
966 @extends pm_node_t
967*/
968pub type pm_forwarding_arguments_node_t = pm_forwarding_arguments_node;
969/** ForwardingParameterNode
970
971 Represents the use of the forwarding parameter in a method, block, or lambda declaration.
972
973``` ruby
974 def foo(...)
975 ^^^
976 end
977```
978
979 Type: ::PM_FORWARDING_PARAMETER_NODE
980
981 @extends pm_node_t
982*/
983pub type pm_forwarding_parameter_node_t = pm_forwarding_parameter_node;
984/** ForwardingSuperNode
985
986 Represents the use of the `super` keyword without parentheses or arguments, but which might have a block.
987
988``` ruby
989 super
990 ^^^^^
991```
992
993``` ruby
994 super { 123 }
995 ^^^^^^^^^^^^^
996```
997
998 If it has any other arguments, it would be a `SuperNode` instead.
999
1000 Type: ::PM_FORWARDING_SUPER_NODE
1001
1002 @extends pm_node_t
1003*/
1004pub type pm_forwarding_super_node_t = pm_forwarding_super_node;
1005/** GlobalVariableAndWriteNode
1006
1007 Represents the use of the `&&=` operator for assignment to a global variable.
1008
1009``` ruby
1010 $target &&= value
1011 ^^^^^^^^^^^^^^^^^
1012```
1013
1014 Type: ::PM_GLOBAL_VARIABLE_AND_WRITE_NODE
1015
1016 @extends pm_node_t
1017*/
1018pub type pm_global_variable_and_write_node_t = pm_global_variable_and_write_node;
1019/** GlobalVariableOperatorWriteNode
1020
1021 Represents assigning to a global variable using an operator that isn't `=`.
1022
1023``` ruby
1024 $target += value
1025 ^^^^^^^^^^^^^^^^
1026```
1027
1028 Type: ::PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
1029
1030 @extends pm_node_t
1031*/
1032pub type pm_global_variable_operator_write_node_t = pm_global_variable_operator_write_node;
1033/** GlobalVariableOrWriteNode
1034
1035 Represents the use of the `||=` operator for assignment to a global variable.
1036
1037``` ruby
1038 $target ||= value
1039 ^^^^^^^^^^^^^^^^^
1040```
1041
1042 Type: ::PM_GLOBAL_VARIABLE_OR_WRITE_NODE
1043
1044 @extends pm_node_t
1045*/
1046pub type pm_global_variable_or_write_node_t = pm_global_variable_or_write_node;
1047/** GlobalVariableReadNode
1048
1049 Represents referencing a global variable.
1050
1051``` ruby
1052 $foo
1053 ^^^^
1054```
1055
1056 Type: ::PM_GLOBAL_VARIABLE_READ_NODE
1057
1058 @extends pm_node_t
1059*/
1060pub type pm_global_variable_read_node_t = pm_global_variable_read_node;
1061/** GlobalVariableTargetNode
1062
1063 Represents writing to a global variable in a context that doesn't have an explicit value.
1064
1065``` ruby
1066 $foo, $bar = baz
1067 ^^^^ ^^^^
1068```
1069
1070 Type: ::PM_GLOBAL_VARIABLE_TARGET_NODE
1071
1072 @extends pm_node_t
1073*/
1074pub type pm_global_variable_target_node_t = pm_global_variable_target_node;
1075/** GlobalVariableWriteNode
1076
1077 Represents writing to a global variable.
1078
1079``` ruby
1080 $foo = 1
1081 ^^^^^^^^
1082```
1083
1084 Type: ::PM_GLOBAL_VARIABLE_WRITE_NODE
1085
1086 @extends pm_node_t
1087*/
1088pub type pm_global_variable_write_node_t = pm_global_variable_write_node;
1089/** HashNode
1090
1091 Represents a hash literal.
1092
1093``` ruby
1094 { a => b }
1095 ^^^^^^^^^^
1096```
1097
1098 Type: ::PM_HASH_NODE
1099
1100 @extends pm_node_t
1101*/
1102pub type pm_hash_node_t = pm_hash_node;
1103/** HashPatternNode
1104
1105 Represents a hash pattern in pattern matching.
1106
1107``` ruby
1108 foo => { a: 1, b: 2 }
1109 ^^^^^^^^^^^^^^
1110```
1111
1112``` ruby
1113 foo => { a: 1, b: 2, **c }
1114 ^^^^^^^^^^^^^^^^^^^
1115```
1116
1117``` ruby
1118 foo => Bar[a: 1, b: 2]
1119 ^^^^^^^^^^^^^^^
1120```
1121
1122``` ruby
1123 foo in { a: 1, b: 2 }
1124 ^^^^^^^^^^^^^^
1125```
1126
1127 Type: ::PM_HASH_PATTERN_NODE
1128
1129 @extends pm_node_t
1130*/
1131pub type pm_hash_pattern_node_t = pm_hash_pattern_node;
1132/** IfNode
1133
1134 Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression.
1135
1136``` ruby
1137 bar if foo
1138 ^^^^^^^^^^
1139```
1140
1141``` ruby
1142 if foo then bar end
1143 ^^^^^^^^^^^^^^^^^^^
1144```
1145
1146``` ruby
1147 foo ? bar : baz
1148 ^^^^^^^^^^^^^^^
1149```
1150
1151 Type: ::PM_IF_NODE
1152
1153 @extends pm_node_t
1154*/
1155pub type pm_if_node_t = pm_if_node;
1156/** ImaginaryNode
1157
1158 Represents an imaginary number literal.
1159
1160``` ruby
1161 1.0i
1162 ^^^^
1163```
1164
1165 Type: ::PM_IMAGINARY_NODE
1166
1167 @extends pm_node_t
1168*/
1169pub type pm_imaginary_node_t = pm_imaginary_node;
1170/** ImplicitNode
1171
1172 Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
1173
1174``` ruby
1175 { foo: }
1176 ^^^^
1177```
1178
1179``` ruby
1180 { Foo: }
1181 ^^^^
1182```
1183
1184``` ruby
1185 foo in { bar: }
1186 ^^^^
1187```
1188
1189 Type: ::PM_IMPLICIT_NODE
1190
1191 @extends pm_node_t
1192*/
1193pub type pm_implicit_node_t = pm_implicit_node;
1194/** ImplicitRestNode
1195
1196 Represents using a trailing comma to indicate an implicit rest parameter.
1197
1198``` ruby
1199 foo { |bar,| }
1200 ^
1201```
1202
1203``` ruby
1204 foo in [bar,]
1205 ^
1206```
1207
1208``` ruby
1209 for foo, in bar do end
1210 ^
1211```
1212
1213``` ruby
1214 foo, = bar
1215 ^
1216```
1217
1218 Type: ::PM_IMPLICIT_REST_NODE
1219
1220 @extends pm_node_t
1221*/
1222pub type pm_implicit_rest_node_t = pm_implicit_rest_node;
1223/** InNode
1224
1225 Represents the use of the `in` keyword in a case statement.
1226
1227``` ruby
1228 case a; in b then c end
1229 ^^^^^^^^^^^
1230```
1231
1232 Type: ::PM_IN_NODE
1233
1234 @extends pm_node_t
1235*/
1236pub type pm_in_node_t = pm_in_node;
1237/** IndexAndWriteNode
1238
1239 Represents the use of the `&&=` operator on a call to the `[]` method.
1240
1241``` ruby
1242 foo.bar[baz] &&= value
1243 ^^^^^^^^^^^^^^^^^^^^^^
1244```
1245
1246 Type: ::PM_INDEX_AND_WRITE_NODE
1247
1248 Flags (#pm_call_node_flags):
1249 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
1250 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
1251 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
1252 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
1253
1254 @extends pm_node_t
1255*/
1256pub type pm_index_and_write_node_t = pm_index_and_write_node;
1257/** IndexOperatorWriteNode
1258
1259 Represents the use of an assignment operator on a call to `[]`.
1260
1261``` ruby
1262 foo.bar[baz] += value
1263 ^^^^^^^^^^^^^^^^^^^^^
1264```
1265
1266 Type: ::PM_INDEX_OPERATOR_WRITE_NODE
1267
1268 Flags (#pm_call_node_flags):
1269 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
1270 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
1271 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
1272 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
1273
1274 @extends pm_node_t
1275*/
1276pub type pm_index_operator_write_node_t = pm_index_operator_write_node;
1277/** IndexOrWriteNode
1278
1279 Represents the use of the `||=` operator on a call to `[]`.
1280
1281``` ruby
1282 foo.bar[baz] ||= value
1283 ^^^^^^^^^^^^^^^^^^^^^^
1284```
1285
1286 Type: ::PM_INDEX_OR_WRITE_NODE
1287
1288 Flags (#pm_call_node_flags):
1289 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
1290 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
1291 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
1292 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
1293
1294 @extends pm_node_t
1295*/
1296pub type pm_index_or_write_node_t = pm_index_or_write_node;
1297/** IndexTargetNode
1298
1299 Represents assigning to an index.
1300
1301``` ruby
1302 foo[bar], = 1
1303 ^^^^^^^^
1304```
1305
1306``` ruby
1307 begin
1308 rescue => foo[bar]
1309 ^^^^^^^^
1310 end
1311```
1312
1313``` ruby
1314 for foo[bar] in baz do end
1315 ^^^^^^^^
1316```
1317
1318 Type: ::PM_INDEX_TARGET_NODE
1319
1320 Flags (#pm_call_node_flags):
1321 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
1322 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
1323 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
1324 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
1325
1326 @extends pm_node_t
1327*/
1328pub type pm_index_target_node_t = pm_index_target_node;
1329/** InstanceVariableAndWriteNode
1330
1331 Represents the use of the `&&=` operator for assignment to an instance variable.
1332
1333``` ruby
1334 @target &&= value
1335 ^^^^^^^^^^^^^^^^^
1336```
1337
1338 Type: ::PM_INSTANCE_VARIABLE_AND_WRITE_NODE
1339
1340 @extends pm_node_t
1341*/
1342pub type pm_instance_variable_and_write_node_t = pm_instance_variable_and_write_node;
1343/** InstanceVariableOperatorWriteNode
1344
1345 Represents assigning to an instance variable using an operator that isn't `=`.
1346
1347``` ruby
1348 @target += value
1349 ^^^^^^^^^^^^^^^^
1350```
1351
1352 Type: ::PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
1353
1354 @extends pm_node_t
1355*/
1356pub type pm_instance_variable_operator_write_node_t = pm_instance_variable_operator_write_node;
1357/** InstanceVariableOrWriteNode
1358
1359 Represents the use of the `||=` operator for assignment to an instance variable.
1360
1361``` ruby
1362 @target ||= value
1363 ^^^^^^^^^^^^^^^^^
1364```
1365
1366 Type: ::PM_INSTANCE_VARIABLE_OR_WRITE_NODE
1367
1368 @extends pm_node_t
1369*/
1370pub type pm_instance_variable_or_write_node_t = pm_instance_variable_or_write_node;
1371/** InstanceVariableReadNode
1372
1373 Represents referencing an instance variable.
1374
1375``` ruby
1376 @foo
1377 ^^^^
1378```
1379
1380 Type: ::PM_INSTANCE_VARIABLE_READ_NODE
1381
1382 @extends pm_node_t
1383*/
1384pub type pm_instance_variable_read_node_t = pm_instance_variable_read_node;
1385/** InstanceVariableTargetNode
1386
1387 Represents writing to an instance variable in a context that doesn't have an explicit value.
1388
1389``` ruby
1390 @foo, @bar = baz
1391 ^^^^ ^^^^
1392```
1393
1394 Type: ::PM_INSTANCE_VARIABLE_TARGET_NODE
1395
1396 @extends pm_node_t
1397*/
1398pub type pm_instance_variable_target_node_t = pm_instance_variable_target_node;
1399/** InstanceVariableWriteNode
1400
1401 Represents writing to an instance variable.
1402
1403``` ruby
1404 @foo = 1
1405 ^^^^^^^^
1406```
1407
1408 Type: ::PM_INSTANCE_VARIABLE_WRITE_NODE
1409
1410 @extends pm_node_t
1411*/
1412pub type pm_instance_variable_write_node_t = pm_instance_variable_write_node;
1413/** IntegerNode
1414
1415 Represents an integer number literal.
1416
1417``` ruby
1418 1
1419 ^
1420```
1421
1422 Type: ::PM_INTEGER_NODE
1423
1424 Flags (#pm_integer_base_flags):
1425 * ::PM_INTEGER_BASE_FLAGS_BINARY
1426 * ::PM_INTEGER_BASE_FLAGS_DECIMAL
1427 * ::PM_INTEGER_BASE_FLAGS_OCTAL
1428 * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
1429
1430 @extends pm_node_t
1431*/
1432pub type pm_integer_node_t = pm_integer_node;
1433/** InterpolatedMatchLastLineNode
1434
1435 Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object.
1436
1437``` ruby
1438 if /foo #{bar} baz/ then end
1439 ^^^^^^^^^^^^^^^^
1440```
1441
1442 Type: ::PM_INTERPOLATED_MATCH_LAST_LINE_NODE
1443
1444 Flags (#pm_regular_expression_flags):
1445 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
1446 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
1447 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
1448 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
1449 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
1450 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
1451 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
1452 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
1453 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
1454 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
1455 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
1456
1457 @extends pm_node_t
1458*/
1459pub type pm_interpolated_match_last_line_node_t = pm_interpolated_match_last_line_node;
1460/** InterpolatedRegularExpressionNode
1461
1462 Represents a regular expression literal that contains interpolation.
1463
1464``` ruby
1465 /foo #{bar} baz/
1466 ^^^^^^^^^^^^^^^^
1467```
1468
1469 Type: ::PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
1470
1471 Flags (#pm_regular_expression_flags):
1472 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
1473 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
1474 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
1475 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
1476 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
1477 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
1478 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
1479 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
1480 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
1481 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
1482 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
1483
1484 @extends pm_node_t
1485*/
1486pub type pm_interpolated_regular_expression_node_t = pm_interpolated_regular_expression_node;
1487/** InterpolatedStringNode
1488
1489 Represents a string literal that contains interpolation.
1490
1491``` ruby
1492 "foo #{bar} baz"
1493 ^^^^^^^^^^^^^^^^
1494```
1495
1496 Type: ::PM_INTERPOLATED_STRING_NODE
1497
1498 Flags (#pm_interpolated_string_node_flags):
1499 * ::PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN
1500 * ::PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE
1501
1502 @extends pm_node_t
1503*/
1504pub type pm_interpolated_string_node_t = pm_interpolated_string_node;
1505/** InterpolatedSymbolNode
1506
1507 Represents a symbol literal that contains interpolation.
1508
1509``` ruby
1510 :"foo #{bar} baz"
1511 ^^^^^^^^^^^^^^^^^
1512```
1513
1514 Type: ::PM_INTERPOLATED_SYMBOL_NODE
1515
1516 @extends pm_node_t
1517*/
1518pub type pm_interpolated_symbol_node_t = pm_interpolated_symbol_node;
1519/** InterpolatedXStringNode
1520
1521 Represents an xstring literal that contains interpolation.
1522
1523``` ruby
1524 `foo #{bar} baz`
1525 ^^^^^^^^^^^^^^^^
1526```
1527
1528 Type: ::PM_INTERPOLATED_X_STRING_NODE
1529
1530 @extends pm_node_t
1531*/
1532pub type pm_interpolated_x_string_node_t = pm_interpolated_x_string_node;
1533/** ItLocalVariableReadNode
1534
1535 Represents reading from the implicit `it` local variable.
1536
1537``` ruby
1538 -> { it }
1539 ^^
1540```
1541
1542 Type: ::PM_IT_LOCAL_VARIABLE_READ_NODE
1543
1544 @extends pm_node_t
1545*/
1546pub type pm_it_local_variable_read_node_t = pm_it_local_variable_read_node;
1547/** ItParametersNode
1548
1549 Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda.
1550
1551``` ruby
1552 -> { it + it }
1553 ^^^^^^^^^^^^^^
1554```
1555
1556 Type: ::PM_IT_PARAMETERS_NODE
1557
1558 @extends pm_node_t
1559*/
1560pub type pm_it_parameters_node_t = pm_it_parameters_node;
1561/** KeywordHashNode
1562
1563 Represents a hash literal without opening and closing braces.
1564
1565``` ruby
1566 foo(a: b)
1567 ^^^^
1568```
1569
1570 Type: ::PM_KEYWORD_HASH_NODE
1571
1572 Flags (#pm_keyword_hash_node_flags):
1573 * ::PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS
1574
1575 @extends pm_node_t
1576*/
1577pub type pm_keyword_hash_node_t = pm_keyword_hash_node;
1578/** KeywordRestParameterNode
1579
1580 Represents a keyword rest parameter to a method, block, or lambda definition.
1581
1582``` ruby
1583 def a(**b)
1584 ^^^
1585 end
1586```
1587
1588 Type: ::PM_KEYWORD_REST_PARAMETER_NODE
1589
1590 Flags (#pm_parameter_flags):
1591 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
1592
1593 @extends pm_node_t
1594*/
1595pub type pm_keyword_rest_parameter_node_t = pm_keyword_rest_parameter_node;
1596/** LambdaNode
1597
1598 Represents using a lambda literal (not the lambda method call).
1599
1600``` ruby
1601 ->(value) { value * 2 }
1602 ^^^^^^^^^^^^^^^^^^^^^^^
1603```
1604
1605 Type: ::PM_LAMBDA_NODE
1606
1607 @extends pm_node_t
1608*/
1609pub type pm_lambda_node_t = pm_lambda_node;
1610/** LocalVariableAndWriteNode
1611
1612 Represents the use of the `&&=` operator for assignment to a local variable.
1613
1614``` ruby
1615 target &&= value
1616 ^^^^^^^^^^^^^^^^
1617```
1618
1619 Type: ::PM_LOCAL_VARIABLE_AND_WRITE_NODE
1620
1621 @extends pm_node_t
1622*/
1623pub type pm_local_variable_and_write_node_t = pm_local_variable_and_write_node;
1624/** LocalVariableOperatorWriteNode
1625
1626 Represents assigning to a local variable using an operator that isn't `=`.
1627
1628``` ruby
1629 target += value
1630 ^^^^^^^^^^^^^^^
1631```
1632
1633 Type: ::PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
1634
1635 @extends pm_node_t
1636*/
1637pub type pm_local_variable_operator_write_node_t = pm_local_variable_operator_write_node;
1638/** LocalVariableOrWriteNode
1639
1640 Represents the use of the `||=` operator for assignment to a local variable.
1641
1642``` ruby
1643 target ||= value
1644 ^^^^^^^^^^^^^^^^
1645```
1646
1647 Type: ::PM_LOCAL_VARIABLE_OR_WRITE_NODE
1648
1649 @extends pm_node_t
1650*/
1651pub type pm_local_variable_or_write_node_t = pm_local_variable_or_write_node;
1652/** LocalVariableReadNode
1653
1654 Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
1655
1656``` ruby
1657 foo
1658 ^^^
1659```
1660
1661 Type: ::PM_LOCAL_VARIABLE_READ_NODE
1662
1663 @extends pm_node_t
1664*/
1665pub type pm_local_variable_read_node_t = pm_local_variable_read_node;
1666/** LocalVariableTargetNode
1667
1668 Represents writing to a local variable in a context that doesn't have an explicit value.
1669
1670``` ruby
1671 foo, bar = baz
1672 ^^^ ^^^
1673```
1674
1675``` ruby
1676 foo => baz
1677 ^^^
1678```
1679
1680 Type: ::PM_LOCAL_VARIABLE_TARGET_NODE
1681
1682 @extends pm_node_t
1683*/
1684pub type pm_local_variable_target_node_t = pm_local_variable_target_node;
1685/** LocalVariableWriteNode
1686
1687 Represents writing to a local variable.
1688
1689``` ruby
1690 foo = 1
1691 ^^^^^^^
1692```
1693
1694 Type: ::PM_LOCAL_VARIABLE_WRITE_NODE
1695
1696 @extends pm_node_t
1697*/
1698pub type pm_local_variable_write_node_t = pm_local_variable_write_node;
1699/** MatchLastLineNode
1700
1701 Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.
1702
1703``` ruby
1704 if /foo/i then end
1705 ^^^^^^
1706```
1707
1708 Type: ::PM_MATCH_LAST_LINE_NODE
1709
1710 Flags (#pm_regular_expression_flags):
1711 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
1712 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
1713 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
1714 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
1715 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
1716 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
1717 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
1718 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
1719 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
1720 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
1721 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
1722
1723 @extends pm_node_t
1724*/
1725pub type pm_match_last_line_node_t = pm_match_last_line_node;
1726/** MatchPredicateNode
1727
1728 Represents the use of the modifier `in` operator.
1729
1730``` ruby
1731 foo in bar
1732 ^^^^^^^^^^
1733```
1734
1735 Type: ::PM_MATCH_PREDICATE_NODE
1736
1737 @extends pm_node_t
1738*/
1739pub type pm_match_predicate_node_t = pm_match_predicate_node;
1740/** MatchRequiredNode
1741
1742 Represents the use of the `=>` operator.
1743
1744``` ruby
1745 foo => bar
1746 ^^^^^^^^^^
1747```
1748
1749 Type: ::PM_MATCH_REQUIRED_NODE
1750
1751 @extends pm_node_t
1752*/
1753pub type pm_match_required_node_t = pm_match_required_node;
1754/** MatchWriteNode
1755
1756 Represents writing local variables using a regular expression match with named capture groups.
1757
1758``` ruby
1759 /(?<foo>bar)/ =~ baz
1760 ^^^^^^^^^^^^^^^^^^^^
1761```
1762
1763 Type: ::PM_MATCH_WRITE_NODE
1764
1765 @extends pm_node_t
1766*/
1767pub type pm_match_write_node_t = pm_match_write_node;
1768/** ModuleNode
1769
1770 Represents a module declaration involving the `module` keyword.
1771
1772``` ruby
1773 module Foo end
1774 ^^^^^^^^^^^^^^
1775```
1776
1777 Type: ::PM_MODULE_NODE
1778
1779 @extends pm_node_t
1780*/
1781pub type pm_module_node_t = pm_module_node;
1782/** MultiTargetNode
1783
1784 Represents a multi-target expression.
1785
1786``` ruby
1787 a, (b, c) = 1, 2, 3
1788 ^^^^^^
1789```
1790
1791 This can be a part of `MultiWriteNode` as above, or the target of a `for` loop
1792
1793``` ruby
1794 for a, b in [[1, 2], [3, 4]]
1795 ^^^^
1796```
1797
1798 Type: ::PM_MULTI_TARGET_NODE
1799
1800 @extends pm_node_t
1801*/
1802pub type pm_multi_target_node_t = pm_multi_target_node;
1803/** MultiWriteNode
1804
1805 Represents a write to a multi-target expression.
1806
1807``` ruby
1808 a, b, c = 1, 2, 3
1809 ^^^^^^^^^^^^^^^^^
1810```
1811
1812 Type: ::PM_MULTI_WRITE_NODE
1813
1814 @extends pm_node_t
1815*/
1816pub type pm_multi_write_node_t = pm_multi_write_node;
1817/** NextNode
1818
1819 Represents the use of the `next` keyword.
1820
1821``` ruby
1822 next 1
1823 ^^^^^^
1824```
1825
1826 Type: ::PM_NEXT_NODE
1827
1828 @extends pm_node_t
1829*/
1830pub type pm_next_node_t = pm_next_node;
1831/** NilNode
1832
1833 Represents the use of the `nil` keyword.
1834
1835``` ruby
1836 nil
1837 ^^^
1838```
1839
1840 Type: ::PM_NIL_NODE
1841
1842 @extends pm_node_t
1843*/
1844pub type pm_nil_node_t = pm_nil_node;
1845/** NoBlockParameterNode
1846
1847 Represents the use of `&nil` inside method arguments.
1848
1849``` ruby
1850 def a(&nil)
1851 ^^^^
1852 end
1853```
1854
1855 Type: ::PM_NO_BLOCK_PARAMETER_NODE
1856
1857 @extends pm_node_t
1858*/
1859pub type pm_no_block_parameter_node_t = pm_no_block_parameter_node;
1860/** NoKeywordsParameterNode
1861
1862 Represents the use of `**nil` inside method arguments.
1863
1864``` ruby
1865 def a(**nil)
1866 ^^^^^
1867 end
1868```
1869
1870 Type: ::PM_NO_KEYWORDS_PARAMETER_NODE
1871
1872 @extends pm_node_t
1873*/
1874pub type pm_no_keywords_parameter_node_t = pm_no_keywords_parameter_node;
1875/** NumberedParametersNode
1876
1877 Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
1878
1879``` ruby
1880 -> { _1 + _2 }
1881 ^^^^^^^^^^^^^^
1882```
1883
1884 Type: ::PM_NUMBERED_PARAMETERS_NODE
1885
1886 @extends pm_node_t
1887*/
1888pub type pm_numbered_parameters_node_t = pm_numbered_parameters_node;
1889/** NumberedReferenceReadNode
1890
1891 Represents reading a numbered reference to a capture in the previous match.
1892
1893``` ruby
1894 $1
1895 ^^
1896```
1897
1898 Type: ::PM_NUMBERED_REFERENCE_READ_NODE
1899
1900 @extends pm_node_t
1901*/
1902pub type pm_numbered_reference_read_node_t = pm_numbered_reference_read_node;
1903/** OptionalKeywordParameterNode
1904
1905 Represents an optional keyword parameter to a method, block, or lambda definition.
1906
1907``` ruby
1908 def a(b: 1)
1909 ^^^^
1910 end
1911```
1912
1913 Type: ::PM_OPTIONAL_KEYWORD_PARAMETER_NODE
1914
1915 Flags (#pm_parameter_flags):
1916 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
1917
1918 @extends pm_node_t
1919*/
1920pub type pm_optional_keyword_parameter_node_t = pm_optional_keyword_parameter_node;
1921/** OptionalParameterNode
1922
1923 Represents an optional parameter to a method, block, or lambda definition.
1924
1925``` ruby
1926 def a(b = 1)
1927 ^^^^^
1928 end
1929```
1930
1931 Type: ::PM_OPTIONAL_PARAMETER_NODE
1932
1933 Flags (#pm_parameter_flags):
1934 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
1935
1936 @extends pm_node_t
1937*/
1938pub type pm_optional_parameter_node_t = pm_optional_parameter_node;
1939/** OrNode
1940
1941 Represents the use of the `||` operator or the `or` keyword.
1942
1943``` ruby
1944 left or right
1945 ^^^^^^^^^^^^^
1946```
1947
1948 Type: ::PM_OR_NODE
1949
1950 @extends pm_node_t
1951*/
1952pub type pm_or_node_t = pm_or_node;
1953/** ParametersNode
1954
1955 Represents the list of parameters on a method, block, or lambda definition.
1956
1957``` ruby
1958 def a(b, c, d)
1959 ^^^^^^^
1960 end
1961```
1962
1963 Type: ::PM_PARAMETERS_NODE
1964
1965 @extends pm_node_t
1966*/
1967pub type pm_parameters_node_t = pm_parameters_node;
1968/** ParenthesesNode
1969
1970 Represents a parenthesized expression
1971
1972``` ruby
1973 (10 + 34)
1974 ^^^^^^^^^
1975```
1976
1977 Type: ::PM_PARENTHESES_NODE
1978
1979 Flags (#pm_parentheses_node_flags):
1980 * ::PM_PARENTHESES_NODE_FLAGS_MULTIPLE_STATEMENTS
1981
1982 @extends pm_node_t
1983*/
1984pub type pm_parentheses_node_t = pm_parentheses_node;
1985/** PinnedExpressionNode
1986
1987 Represents the use of the `^` operator for pinning an expression in a pattern matching expression.
1988
1989``` ruby
1990 foo in ^(bar)
1991 ^^^^^^
1992```
1993
1994 Type: ::PM_PINNED_EXPRESSION_NODE
1995
1996 @extends pm_node_t
1997*/
1998pub type pm_pinned_expression_node_t = pm_pinned_expression_node;
1999/** PinnedVariableNode
2000
2001 Represents the use of the `^` operator for pinning a variable in a pattern matching expression.
2002
2003``` ruby
2004 foo in ^bar
2005 ^^^^
2006```
2007
2008 Type: ::PM_PINNED_VARIABLE_NODE
2009
2010 @extends pm_node_t
2011*/
2012pub type pm_pinned_variable_node_t = pm_pinned_variable_node;
2013/** PostExecutionNode
2014
2015 Represents the use of the `END` keyword.
2016
2017``` ruby
2018 END { foo }
2019 ^^^^^^^^^^^
2020```
2021
2022 Type: ::PM_POST_EXECUTION_NODE
2023
2024 @extends pm_node_t
2025*/
2026pub type pm_post_execution_node_t = pm_post_execution_node;
2027/** PreExecutionNode
2028
2029 Represents the use of the `BEGIN` keyword.
2030
2031``` ruby
2032 BEGIN { foo }
2033 ^^^^^^^^^^^^^
2034```
2035
2036 Type: ::PM_PRE_EXECUTION_NODE
2037
2038 @extends pm_node_t
2039*/
2040pub type pm_pre_execution_node_t = pm_pre_execution_node;
2041/** ProgramNode
2042
2043 The top level node of any parse tree.
2044
2045 Type: ::PM_PROGRAM_NODE
2046
2047 @extends pm_node_t
2048*/
2049pub type pm_program_node_t = pm_program_node;
2050/** RangeNode
2051
2052 Represents the use of the `..` or `...` operators.
2053
2054``` ruby
2055 1..2
2056 ^^^^
2057```
2058
2059``` ruby
2060 c if a =~ /left/ ... b =~ /right/
2061 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2062```
2063
2064 Type: ::PM_RANGE_NODE
2065
2066 Flags (#pm_range_flags):
2067 * ::PM_RANGE_FLAGS_EXCLUDE_END
2068
2069 @extends pm_node_t
2070*/
2071pub type pm_range_node_t = pm_range_node;
2072/** RationalNode
2073
2074 Represents a rational number literal.
2075
2076``` ruby
2077 1.0r
2078 ^^^^
2079```
2080
2081 Type: ::PM_RATIONAL_NODE
2082
2083 Flags (#pm_integer_base_flags):
2084 * ::PM_INTEGER_BASE_FLAGS_BINARY
2085 * ::PM_INTEGER_BASE_FLAGS_DECIMAL
2086 * ::PM_INTEGER_BASE_FLAGS_OCTAL
2087 * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
2088
2089 @extends pm_node_t
2090*/
2091pub type pm_rational_node_t = pm_rational_node;
2092/** RedoNode
2093
2094 Represents the use of the `redo` keyword.
2095
2096``` ruby
2097 redo
2098 ^^^^
2099```
2100
2101 Type: ::PM_REDO_NODE
2102
2103 @extends pm_node_t
2104*/
2105pub type pm_redo_node_t = pm_redo_node;
2106/** RegularExpressionNode
2107
2108 Represents a regular expression literal with no interpolation.
2109
2110``` ruby
2111 /foo/i
2112 ^^^^^^
2113```
2114
2115 Type: ::PM_REGULAR_EXPRESSION_NODE
2116
2117 Flags (#pm_regular_expression_flags):
2118 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
2119 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
2120 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
2121 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
2122 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
2123 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
2124 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
2125 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
2126 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
2127 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
2128 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
2129
2130 @extends pm_node_t
2131*/
2132pub type pm_regular_expression_node_t = pm_regular_expression_node;
2133/** RequiredKeywordParameterNode
2134
2135 Represents a required keyword parameter to a method, block, or lambda definition.
2136
2137``` ruby
2138 def a(b: )
2139 ^^
2140 end
2141```
2142
2143 Type: ::PM_REQUIRED_KEYWORD_PARAMETER_NODE
2144
2145 Flags (#pm_parameter_flags):
2146 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
2147
2148 @extends pm_node_t
2149*/
2150pub type pm_required_keyword_parameter_node_t = pm_required_keyword_parameter_node;
2151/** RequiredParameterNode
2152
2153 Represents a required parameter to a method, block, or lambda definition.
2154
2155``` ruby
2156 def a(b)
2157 ^
2158 end
2159```
2160
2161 Type: ::PM_REQUIRED_PARAMETER_NODE
2162
2163 Flags (#pm_parameter_flags):
2164 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
2165
2166 @extends pm_node_t
2167*/
2168pub type pm_required_parameter_node_t = pm_required_parameter_node;
2169/** RescueModifierNode
2170
2171 Represents an expression modified with a rescue.
2172
2173``` ruby
2174 foo rescue nil
2175 ^^^^^^^^^^^^^^
2176```
2177
2178 Type: ::PM_RESCUE_MODIFIER_NODE
2179
2180 @extends pm_node_t
2181*/
2182pub type pm_rescue_modifier_node_t = pm_rescue_modifier_node;
2183/** RescueNode
2184
2185 Represents a rescue statement.
2186
2187``` ruby
2188 begin
2189 rescue Foo, *splat, Bar => ex
2190 foo
2191 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2192 end
2193```
2194
2195 `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field.
2196
2197 Type: ::PM_RESCUE_NODE
2198
2199 @extends pm_node_t
2200*/
2201pub type pm_rescue_node_t = pm_rescue_node;
2202/** RestParameterNode
2203
2204 Represents a rest parameter to a method, block, or lambda definition.
2205
2206``` ruby
2207 def a(*b)
2208 ^^
2209 end
2210```
2211
2212 Type: ::PM_REST_PARAMETER_NODE
2213
2214 Flags (#pm_parameter_flags):
2215 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
2216
2217 @extends pm_node_t
2218*/
2219pub type pm_rest_parameter_node_t = pm_rest_parameter_node;
2220/** RetryNode
2221
2222 Represents the use of the `retry` keyword.
2223
2224``` ruby
2225 retry
2226 ^^^^^
2227```
2228
2229 Type: ::PM_RETRY_NODE
2230
2231 @extends pm_node_t
2232*/
2233pub type pm_retry_node_t = pm_retry_node;
2234/** ReturnNode
2235
2236 Represents the use of the `return` keyword.
2237
2238``` ruby
2239 return 1
2240 ^^^^^^^^
2241```
2242
2243 Type: ::PM_RETURN_NODE
2244
2245 @extends pm_node_t
2246*/
2247pub type pm_return_node_t = pm_return_node;
2248/** SelfNode
2249
2250 Represents the `self` keyword.
2251
2252``` ruby
2253 self
2254 ^^^^
2255```
2256
2257 Type: ::PM_SELF_NODE
2258
2259 @extends pm_node_t
2260*/
2261pub type pm_self_node_t = pm_self_node;
2262/** ShareableConstantNode
2263
2264 This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
2265
2266``` ruby
2267 # shareable_constant_value: literal
2268 C = { a: 1 }
2269 ^^^^^^^^^^^^
2270```
2271
2272 Type: ::PM_SHAREABLE_CONSTANT_NODE
2273
2274 Flags (#pm_shareable_constant_node_flags):
2275 * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL
2276 * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING
2277 * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY
2278
2279 @extends pm_node_t
2280*/
2281pub type pm_shareable_constant_node_t = pm_shareable_constant_node;
2282/** SingletonClassNode
2283
2284 Represents a singleton class declaration involving the `class` keyword.
2285
2286``` ruby
2287 class << self end
2288 ^^^^^^^^^^^^^^^^^
2289```
2290
2291 Type: ::PM_SINGLETON_CLASS_NODE
2292
2293 @extends pm_node_t
2294*/
2295pub type pm_singleton_class_node_t = pm_singleton_class_node;
2296/** SourceEncodingNode
2297
2298 Represents the use of the `__ENCODING__` keyword.
2299
2300``` ruby
2301 __ENCODING__
2302 ^^^^^^^^^^^^
2303```
2304
2305 Type: ::PM_SOURCE_ENCODING_NODE
2306
2307 @extends pm_node_t
2308*/
2309pub type pm_source_encoding_node_t = pm_source_encoding_node;
2310/** SourceFileNode
2311
2312 Represents the use of the `__FILE__` keyword.
2313
2314``` ruby
2315 __FILE__
2316 ^^^^^^^^
2317```
2318
2319 Type: ::PM_SOURCE_FILE_NODE
2320
2321 Flags (#pm_string_flags):
2322 * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING
2323 * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING
2324 * ::PM_STRING_FLAGS_FROZEN
2325 * ::PM_STRING_FLAGS_MUTABLE
2326
2327 @extends pm_node_t
2328*/
2329pub type pm_source_file_node_t = pm_source_file_node;
2330/** SourceLineNode
2331
2332 Represents the use of the `__LINE__` keyword.
2333
2334``` ruby
2335 __LINE__
2336 ^^^^^^^^
2337```
2338
2339 Type: ::PM_SOURCE_LINE_NODE
2340
2341 @extends pm_node_t
2342*/
2343pub type pm_source_line_node_t = pm_source_line_node;
2344/** SplatNode
2345
2346 Represents the use of the splat operator.
2347
2348``` ruby
2349 [*a]
2350 ^^
2351```
2352
2353 Type: ::PM_SPLAT_NODE
2354
2355 @extends pm_node_t
2356*/
2357pub type pm_splat_node_t = pm_splat_node;
2358/** StatementsNode
2359
2360 Represents a set of statements contained within some scope.
2361
2362``` ruby
2363 foo; bar; baz
2364 ^^^^^^^^^^^^^
2365```
2366
2367 Type: ::PM_STATEMENTS_NODE
2368
2369 @extends pm_node_t
2370*/
2371pub type pm_statements_node_t = pm_statements_node;
2372/** StringNode
2373
2374 Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string.
2375
2376``` ruby
2377 "foo"
2378 ^^^^^
2379```
2380
2381``` ruby
2382 %w[foo]
2383 ^^^
2384```
2385
2386``` ruby
2387 "foo #{bar} baz"
2388 ^^^^ ^^^^
2389```
2390
2391 Type: ::PM_STRING_NODE
2392
2393 Flags (#pm_string_flags):
2394 * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING
2395 * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING
2396 * ::PM_STRING_FLAGS_FROZEN
2397 * ::PM_STRING_FLAGS_MUTABLE
2398
2399 @extends pm_node_t
2400*/
2401pub type pm_string_node_t = pm_string_node;
2402/** SuperNode
2403
2404 Represents the use of the `super` keyword with parentheses or arguments.
2405
2406``` ruby
2407 super()
2408 ^^^^^^^
2409```
2410
2411``` ruby
2412 super foo, bar
2413 ^^^^^^^^^^^^^^
2414```
2415
2416 If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead.
2417
2418 Type: ::PM_SUPER_NODE
2419
2420 @extends pm_node_t
2421*/
2422pub type pm_super_node_t = pm_super_node;
2423/** SymbolNode
2424
2425 Represents a symbol literal or a symbol contained within a `%i` list.
2426
2427``` ruby
2428 :foo
2429 ^^^^
2430```
2431
2432``` ruby
2433 %i[foo]
2434 ^^^
2435```
2436
2437 Type: ::PM_SYMBOL_NODE
2438
2439 Flags (#pm_symbol_flags):
2440 * ::PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING
2441 * ::PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING
2442 * ::PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING
2443
2444 @extends pm_node_t
2445*/
2446pub type pm_symbol_node_t = pm_symbol_node;
2447/** TrueNode
2448
2449 Represents the use of the literal `true` keyword.
2450
2451``` ruby
2452 true
2453 ^^^^
2454```
2455
2456 Type: ::PM_TRUE_NODE
2457
2458 @extends pm_node_t
2459*/
2460pub type pm_true_node_t = pm_true_node;
2461/** UndefNode
2462
2463 Represents the use of the `undef` keyword.
2464
2465``` ruby
2466 undef :foo, :bar, :baz
2467 ^^^^^^^^^^^^^^^^^^^^^^
2468```
2469
2470 Type: ::PM_UNDEF_NODE
2471
2472 @extends pm_node_t
2473*/
2474pub type pm_undef_node_t = pm_undef_node;
2475/** UnlessNode
2476
2477 Represents the use of the `unless` keyword, either in the block form or the modifier form.
2478
2479``` ruby
2480 bar unless foo
2481 ^^^^^^^^^^^^^^
2482```
2483
2484``` ruby
2485 unless foo then bar end
2486 ^^^^^^^^^^^^^^^^^^^^^^^
2487```
2488
2489 Type: ::PM_UNLESS_NODE
2490
2491 @extends pm_node_t
2492*/
2493pub type pm_unless_node_t = pm_unless_node;
2494/** UntilNode
2495
2496 Represents the use of the `until` keyword, either in the block form or the modifier form.
2497
2498``` ruby
2499 bar until foo
2500 ^^^^^^^^^^^^^
2501```
2502
2503``` ruby
2504 until foo do bar end
2505 ^^^^^^^^^^^^^^^^^^^^
2506```
2507
2508 Type: ::PM_UNTIL_NODE
2509
2510 Flags (#pm_loop_flags):
2511 * ::PM_LOOP_FLAGS_BEGIN_MODIFIER
2512
2513 @extends pm_node_t
2514*/
2515pub type pm_until_node_t = pm_until_node;
2516/** WhenNode
2517
2518 Represents the use of the `when` keyword within a case statement.
2519
2520``` ruby
2521 case true
2522 when true
2523 ^^^^^^^^^
2524 end
2525```
2526
2527 Type: ::PM_WHEN_NODE
2528
2529 @extends pm_node_t
2530*/
2531pub type pm_when_node_t = pm_when_node;
2532/** WhileNode
2533
2534 Represents the use of the `while` keyword, either in the block form or the modifier form.
2535
2536``` ruby
2537 bar while foo
2538 ^^^^^^^^^^^^^
2539```
2540
2541``` ruby
2542 while foo do bar end
2543 ^^^^^^^^^^^^^^^^^^^^
2544```
2545
2546 Type: ::PM_WHILE_NODE
2547
2548 Flags (#pm_loop_flags):
2549 * ::PM_LOOP_FLAGS_BEGIN_MODIFIER
2550
2551 @extends pm_node_t
2552*/
2553pub type pm_while_node_t = pm_while_node;
2554/** XStringNode
2555
2556 Represents an xstring literal with no interpolation.
2557
2558``` ruby
2559 `foo`
2560 ^^^^^
2561```
2562
2563 Type: ::PM_X_STRING_NODE
2564
2565 Flags (#pm_encoding_flags):
2566 * ::PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING
2567 * ::PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING
2568
2569 @extends pm_node_t
2570*/
2571pub type pm_x_string_node_t = pm_x_string_node;
2572/** YieldNode
2573
2574 Represents the use of the `yield` keyword.
2575
2576``` ruby
2577 yield 1
2578 ^^^^^^^
2579```
2580
2581 Type: ::PM_YIELD_NODE
2582
2583 @extends pm_node_t
2584*/
2585pub type pm_yield_node_t = pm_yield_node;
2586/** A callback function that can be used to process comments found while parsing.
2587*/
2588pub type pm_comment_callback_t = ::std::option::Option<
2589 unsafe extern "C" fn(comment: *const pm_comment_t, data: *mut ::std::os::raw::c_void),
2590>;
2591/** A callback function that can be used to process magic comments found while parsing.
2592*/
2593pub type pm_magic_comment_callback_t = ::std::option::Option<
2594 unsafe extern "C" fn(
2595 magic_comment: *const pm_magic_comment_t,
2596 data: *mut ::std::os::raw::c_void,
2597 ),
2598>;
2599/** A callback function that can be used to process diagnostics found while
2600 parsing.
2601*/
2602pub type pm_diagnostic_callback_t = ::std::option::Option<
2603 unsafe extern "C" fn(
2604 diagnostic: *const pm_diagnostic_t,
2605 data: *mut ::std::os::raw::c_void,
2606 ),
2607>;
2608/** A callback function that can be used to process constants found while
2609 parsing.
2610*/
2611pub type pm_constant_callback_t = ::std::option::Option<
2612 unsafe extern "C" fn(
2613 constant: *const pm_constant_t,
2614 data: *mut ::std::os::raw::c_void,
2615 ),
2616>;
2617#[repr(C)]
2618#[derive(Debug, Copy, Clone)]
2619pub struct pm_arena_t {
2620 _unused: [u8; 0],
2621}
2622/** A list of constant IDs. Usually used to represent a set of locals.
2623*/
2624#[repr(C)]
2625#[derive(Debug, Copy, Clone)]
2626pub struct pm_constant_id_list_t {
2627 /** The number of constant ids in the list.
2628*/
2629 pub size: usize,
2630 /** The number of constant ids that have been allocated in the list.
2631*/
2632 pub capacity: usize,
2633 /** The constant ids in the list.
2634*/
2635 pub ids: *mut pm_constant_id_t,
2636}
2637#[repr(C)]
2638#[derive(Debug, Copy, Clone)]
2639pub struct pm_constant_t {
2640 _unused: [u8; 0],
2641}
2642/** A structure represents an arbitrary-sized integer.
2643*/
2644#[repr(C)]
2645#[derive(Debug, Copy, Clone)]
2646pub struct pm_integer_t {
2647 /** The number of allocated values. length is set to 0 if the integer fits
2648 into uint32_t.
2649*/
2650 pub length: usize,
2651 /** List of 32-bit integers. Set to NULL if the integer fits into uint32_t.
2652*/
2653 pub values: *mut u32,
2654 /** Embedded value for small integer. This value is set to 0 if the value
2655 does not fit into uint32_t.
2656*/
2657 pub value: u32,
2658 /** Whether or not the integer is negative. It is stored this way so that a
2659 zeroed pm_integer_t is always positive zero.
2660*/
2661 pub negative: bool,
2662}
2663/** A generic string type that can have various ownership semantics.
2664*/
2665#[repr(C)]
2666#[derive(Debug, Copy, Clone)]
2667pub struct pm_string_t {
2668 /** A pointer to the start of the string.
2669*/
2670 pub source: *const u8,
2671 /** The length of the string in bytes of memory.
2672*/
2673 pub length: usize,
2674 pub type_: pm_string_t__bindgen_ty_1,
2675}
2676/** This struct represents a slice in the source code, defined by an offset and
2677 a length. Note that we have confirmation that we can represent all locations
2678 within Ruby source files using 32-bit integers per:
2679
2680``` ruby
2681 https://bugs.ruby-lang.org/issues/20488#note-1
2682```
2683*/
2684#[repr(C)]
2685#[derive(Debug, Default, Copy, Clone)]
2686pub struct pm_location_t {
2687 /** The offset of the location from the start of the source.
2688*/
2689 pub start: u32,
2690 /** The length of the location.
2691*/
2692 pub length: u32,
2693}
2694/** A list of nodes in the source, most often used for lists of children.
2695*/
2696#[repr(C)]
2697#[derive(Debug, Copy, Clone)]
2698pub struct pm_node_list {
2699 /** The number of nodes in the list.
2700*/
2701 pub size: usize,
2702 /** The capacity of the list that has been allocated.
2703*/
2704 pub capacity: usize,
2705 /** The nodes in the list.
2706*/
2707 pub nodes: *mut *mut pm_node,
2708}
2709/** This is the base structure that represents a node in the syntax tree. It is
2710 embedded into every node type.
2711*/
2712#[repr(C)]
2713#[derive(Debug, Default, Copy, Clone)]
2714pub struct pm_node {
2715 /** This represents the type of the node. It somewhat maps to the nodes that
2716 existed in the original grammar and ripper, but it is not a 1:1 mapping.
2717*/
2718 pub type_: pm_node_type_t,
2719 /** This represents any flags on the node. Some are common to all nodes, and
2720 some are specific to the type of node.
2721*/
2722 pub flags: pm_node_flags_t,
2723 /** The unique identifier for this node, which is deterministic based on the
2724 source. It is used to identify unique nodes across parses.
2725*/
2726 pub node_id: u32,
2727 /** This is the location of the node in the source. It is a range of bytes
2728 containing a start and an end.
2729*/
2730 pub location: pm_location_t,
2731}
2732/** AliasGlobalVariableNode
2733
2734 Represents the use of the `alias` keyword to alias a global variable.
2735
2736``` ruby
2737 alias $foo $bar
2738 ^^^^^^^^^^^^^^^
2739```
2740
2741 Type: ::PM_ALIAS_GLOBAL_VARIABLE_NODE
2742
2743 @extends pm_node_t
2744*/
2745#[repr(C)]
2746#[derive(Debug, Copy, Clone)]
2747pub struct pm_alias_global_variable_node {
2748 /** The embedded base node.
2749*/
2750 pub base: pm_node_t,
2751 /** AliasGlobalVariableNode#new_name
2752
2753 Represents the new name of the global variable that can be used after aliasing.
2754
2755``` ruby
2756 alias $foo $bar
2757 ^^^^
2758```
2759*/
2760 pub new_name: *mut pm_node,
2761 /** AliasGlobalVariableNode#old_name
2762
2763 Represents the old name of the global variable that can be used before aliasing.
2764
2765``` ruby
2766 alias $foo $bar
2767 ^^^^
2768```
2769*/
2770 pub old_name: *mut pm_node,
2771 /** AliasGlobalVariableNode#keyword_loc
2772
2773 The Location of the `alias` keyword.
2774
2775``` ruby
2776 alias $foo $bar
2777 ^^^^^
2778```
2779*/
2780 pub keyword_loc: pm_location_t,
2781}
2782/** AliasMethodNode
2783
2784 Represents the use of the `alias` keyword to alias a method.
2785
2786``` ruby
2787 alias foo bar
2788 ^^^^^^^^^^^^^
2789```
2790
2791 Type: ::PM_ALIAS_METHOD_NODE
2792
2793 @extends pm_node_t
2794*/
2795#[repr(C)]
2796#[derive(Debug, Copy, Clone)]
2797pub struct pm_alias_method_node {
2798 /** The embedded base node.
2799*/
2800 pub base: pm_node_t,
2801 /** AliasMethodNode#new_name
2802
2803 Represents the new name of the method that will be aliased.
2804
2805``` ruby
2806 alias foo bar
2807 ^^^
2808```
2809
2810``` ruby
2811 alias :foo :bar
2812 ^^^^
2813```
2814
2815``` ruby
2816 alias :"#{foo}" :"#{bar}"
2817 ^^^^^^^^^
2818```
2819*/
2820 pub new_name: *mut pm_node,
2821 /** AliasMethodNode#old_name
2822
2823 Represents the old name of the method that will be aliased.
2824
2825``` ruby
2826 alias foo bar
2827 ^^^
2828```
2829
2830``` ruby
2831 alias :foo :bar
2832 ^^^^
2833```
2834
2835``` ruby
2836 alias :"#{foo}" :"#{bar}"
2837 ^^^^^^^^^
2838```
2839*/
2840 pub old_name: *mut pm_node,
2841 /** AliasMethodNode#keyword_loc
2842
2843 Represents the Location of the `alias` keyword.
2844
2845``` ruby
2846 alias foo bar
2847 ^^^^^
2848```
2849*/
2850 pub keyword_loc: pm_location_t,
2851}
2852/** AlternationPatternNode
2853
2854 Represents an alternation pattern in pattern matching.
2855
2856``` ruby
2857 foo => bar | baz
2858 ^^^^^^^^^
2859```
2860
2861 Type: ::PM_ALTERNATION_PATTERN_NODE
2862
2863 @extends pm_node_t
2864*/
2865#[repr(C)]
2866#[derive(Debug, Copy, Clone)]
2867pub struct pm_alternation_pattern_node {
2868 /** The embedded base node.
2869*/
2870 pub base: pm_node_t,
2871 /** AlternationPatternNode#left
2872
2873 Represents the left side of the expression.
2874
2875``` ruby
2876 foo => bar | baz
2877 ^^^
2878```
2879*/
2880 pub left: *mut pm_node,
2881 /** AlternationPatternNode#right
2882
2883 Represents the right side of the expression.
2884
2885``` ruby
2886 foo => bar | baz
2887 ^^^
2888```
2889*/
2890 pub right: *mut pm_node,
2891 /** AlternationPatternNode#operator_loc
2892
2893 Represents the alternation operator Location.
2894
2895``` ruby
2896 foo => bar | baz
2897 ^
2898```
2899*/
2900 pub operator_loc: pm_location_t,
2901}
2902/** AndNode
2903
2904 Represents the use of the `&&` operator or the `and` keyword.
2905
2906``` ruby
2907 left and right
2908 ^^^^^^^^^^^^^^
2909```
2910
2911 Type: ::PM_AND_NODE
2912
2913 @extends pm_node_t
2914*/
2915#[repr(C)]
2916#[derive(Debug, Copy, Clone)]
2917pub struct pm_and_node {
2918 /** The embedded base node.
2919*/
2920 pub base: pm_node_t,
2921 /** AndNode#left
2922
2923 Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
2924
2925``` ruby
2926 left and right
2927 ^^^^
2928```
2929
2930``` ruby
2931 1 && 2
2932 ^
2933```
2934*/
2935 pub left: *mut pm_node,
2936 /** AndNode#right
2937
2938 Represents the right side of the expression.
2939
2940``` ruby
2941 left && right
2942 ^^^^^
2943```
2944
2945``` ruby
2946 1 and 2
2947 ^
2948```
2949*/
2950 pub right: *mut pm_node,
2951 /** AndNode#operator_loc
2952
2953 The Location of the `and` keyword or the `&&` operator.
2954
2955``` ruby
2956 left and right
2957 ^^^
2958```
2959*/
2960 pub operator_loc: pm_location_t,
2961}
2962/** ArgumentsNode
2963
2964 Represents a set of arguments to a method or a keyword.
2965
2966``` ruby
2967 return foo, bar, baz
2968 ^^^^^^^^^^^^^
2969```
2970
2971 Type: ::PM_ARGUMENTS_NODE
2972
2973 Flags (#pm_arguments_node_flags):
2974 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING
2975 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS
2976 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT
2977 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT
2978 * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS
2979
2980 @extends pm_node_t
2981*/
2982#[repr(C)]
2983#[derive(Debug, Copy, Clone)]
2984pub struct pm_arguments_node {
2985 /** The embedded base node.
2986*/
2987 pub base: pm_node_t,
2988 /** ArgumentsNode#arguments
2989
2990 The list of arguments, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
2991
2992``` ruby
2993 foo(bar, baz)
2994 ^^^^^^^^
2995```
2996*/
2997 pub arguments: pm_node_list,
2998}
2999/** ArrayNode
3000
3001 Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.
3002
3003``` ruby
3004 [1, 2, 3]
3005 ^^^^^^^^^
3006```
3007
3008 Type: ::PM_ARRAY_NODE
3009
3010 Flags (#pm_array_node_flags):
3011 * ::PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT
3012
3013 @extends pm_node_t
3014*/
3015#[repr(C)]
3016#[derive(Debug, Copy, Clone)]
3017pub struct pm_array_node {
3018 /** The embedded base node.
3019*/
3020 pub base: pm_node_t,
3021 /** ArrayNode#elements
3022
3023 Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array.
3024*/
3025 pub elements: pm_node_list,
3026 /** ArrayNode#opening_loc
3027
3028 Represents the optional source Location for the opening token.
3029
3030``` ruby
3031 [1,2,3] # "["
3032 %w[foo bar baz] # "%w["
3033 %I(apple orange banana) # "%I("
3034 foo = 1, 2, 3 # nil
3035```
3036*/
3037 pub opening_loc: pm_location_t,
3038 /** ArrayNode#closing_loc
3039
3040 Represents the optional source Location for the closing token.
3041
3042``` ruby
3043 [1,2,3] # "]"
3044 %w[foo bar baz] # "]"
3045 %I(apple orange banana) # ")"
3046 foo = 1, 2, 3 # nil
3047```
3048*/
3049 pub closing_loc: pm_location_t,
3050}
3051/** ArrayPatternNode
3052
3053 Represents an array pattern in pattern matching.
3054
3055``` ruby
3056 foo in 1, 2
3057 ^^^^
3058```
3059
3060``` ruby
3061 foo in [1, 2]
3062 ^^^^^^
3063```
3064
3065``` ruby
3066 foo in *bar
3067 ^^^^
3068```
3069
3070``` ruby
3071 foo in Bar[]
3072 ^^^^^
3073```
3074
3075``` ruby
3076 foo in Bar[1, 2, 3]
3077 ^^^^^^^^^^^^
3078```
3079
3080 Type: ::PM_ARRAY_PATTERN_NODE
3081
3082 @extends pm_node_t
3083*/
3084#[repr(C)]
3085#[derive(Debug, Copy, Clone)]
3086pub struct pm_array_pattern_node {
3087 /** The embedded base node.
3088*/
3089 pub base: pm_node_t,
3090 /** ArrayPatternNode#constant
3091
3092 Represents the optional constant preceding the Array
3093
3094``` ruby
3095 foo in Bar[]
3096 ^^^
3097```
3098
3099``` ruby
3100 foo in Bar[1, 2, 3]
3101 ^^^
3102```
3103
3104``` ruby
3105 foo in Bar::Baz[1, 2, 3]
3106 ^^^^^^^^
3107```
3108*/
3109 pub constant: *mut pm_node,
3110 /** ArrayPatternNode#requireds
3111
3112 Represents the required elements of the array pattern.
3113
3114``` ruby
3115 foo in [1, 2]
3116 ^ ^
3117```
3118*/
3119 pub requireds: pm_node_list,
3120 /** ArrayPatternNode#rest
3121
3122 Represents the rest element of the array pattern.
3123
3124``` ruby
3125 foo in *bar
3126 ^^^^
3127```
3128*/
3129 pub rest: *mut pm_node,
3130 /** ArrayPatternNode#posts
3131
3132 Represents the elements after the rest element of the array pattern.
3133
3134``` ruby
3135 foo in *bar, baz
3136 ^^^
3137```
3138*/
3139 pub posts: pm_node_list,
3140 /** ArrayPatternNode#opening_loc
3141
3142 Represents the opening Location of the array pattern.
3143
3144``` ruby
3145 foo in [1, 2]
3146 ^
3147```
3148*/
3149 pub opening_loc: pm_location_t,
3150 /** ArrayPatternNode#closing_loc
3151
3152 Represents the closing Location of the array pattern.
3153
3154``` ruby
3155 foo in [1, 2]
3156 ^
3157```
3158*/
3159 pub closing_loc: pm_location_t,
3160}
3161/** AssocNode
3162
3163 Represents a hash key/value pair.
3164
3165``` ruby
3166 { a => b }
3167 ^^^^^^
3168```
3169
3170 Type: ::PM_ASSOC_NODE
3171
3172 @extends pm_node_t
3173*/
3174#[repr(C)]
3175#[derive(Debug, Copy, Clone)]
3176pub struct pm_assoc_node {
3177 /** The embedded base node.
3178*/
3179 pub base: pm_node_t,
3180 /** AssocNode#key
3181
3182 The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3183
3184``` ruby
3185 { a: b }
3186 ^
3187```
3188
3189``` ruby
3190 { foo => bar }
3191 ^^^
3192```
3193
3194``` ruby
3195 { def a; end => 1 }
3196 ^^^^^^^^^^
3197```
3198*/
3199 pub key: *mut pm_node,
3200 /** AssocNode#value
3201
3202 The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3203
3204``` ruby
3205 { foo => bar }
3206 ^^^
3207```
3208
3209``` ruby
3210 { x: 1 }
3211 ^
3212```
3213*/
3214 pub value: *mut pm_node,
3215 /** AssocNode#operator_loc
3216
3217 The Location of the `=>` operator, if present.
3218
3219``` ruby
3220 { foo => bar }
3221 ^^
3222```
3223*/
3224 pub operator_loc: pm_location_t,
3225}
3226/** AssocSplatNode
3227
3228 Represents a splat in a hash literal.
3229
3230``` ruby
3231 { **foo }
3232 ^^^^^
3233```
3234
3235 Type: ::PM_ASSOC_SPLAT_NODE
3236
3237 @extends pm_node_t
3238*/
3239#[repr(C)]
3240#[derive(Debug, Copy, Clone)]
3241pub struct pm_assoc_splat_node {
3242 /** The embedded base node.
3243*/
3244 pub base: pm_node_t,
3245 /** AssocSplatNode#value
3246
3247 The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used.
3248
3249``` ruby
3250 { **foo }
3251 ^^^
3252```
3253*/
3254 pub value: *mut pm_node,
3255 /** AssocSplatNode#operator_loc
3256
3257 The Location of the `**` operator.
3258
3259``` ruby
3260 { **x }
3261 ^^
3262```
3263*/
3264 pub operator_loc: pm_location_t,
3265}
3266/** BackReferenceReadNode
3267
3268 Represents reading a reference to a field in the previous match.
3269
3270``` ruby
3271 $'
3272 ^^
3273```
3274
3275 Type: ::PM_BACK_REFERENCE_READ_NODE
3276
3277 @extends pm_node_t
3278*/
3279#[repr(C)]
3280#[derive(Debug, Default, Copy, Clone)]
3281pub struct pm_back_reference_read_node {
3282 /** The embedded base node.
3283*/
3284 pub base: pm_node_t,
3285 /** BackReferenceReadNode#name
3286
3287 The name of the back-reference variable, including the leading `$`.
3288
3289``` ruby
3290 $& # name `:$&`
3291```
3292
3293``` ruby
3294 $+ # name `:$+`
3295```
3296*/
3297 pub name: pm_constant_id_t,
3298}
3299/** BeginNode
3300
3301 Represents a begin statement.
3302
3303``` ruby
3304 begin
3305 foo
3306 end
3307 ^^^^^
3308```
3309
3310 Type: ::PM_BEGIN_NODE
3311
3312 @extends pm_node_t
3313*/
3314#[repr(C)]
3315#[derive(Debug, Copy, Clone)]
3316pub struct pm_begin_node {
3317 /** The embedded base node.
3318*/
3319 pub base: pm_node_t,
3320 /** BeginNode#begin_keyword_loc
3321
3322 Represents the Location of the `begin` keyword.
3323
3324``` ruby
3325 begin x end
3326 ^^^^^
3327```
3328*/
3329 pub begin_keyword_loc: pm_location_t,
3330 /** BeginNode#statements
3331
3332 Represents the statements within the begin block.
3333
3334``` ruby
3335 begin x end
3336 ^
3337```
3338*/
3339 pub statements: *mut pm_statements_node,
3340 /** BeginNode#rescue_clause
3341
3342 Represents the rescue clause within the begin block.
3343
3344``` ruby
3345 begin x; rescue y; end
3346 ^^^^^^^^
3347```
3348*/
3349 pub rescue_clause: *mut pm_rescue_node,
3350 /** BeginNode#else_clause
3351
3352 Represents the else clause within the begin block.
3353
3354``` ruby
3355 begin x; rescue y; else z; end
3356 ^^^^^^^^^^^
3357```
3358*/
3359 pub else_clause: *mut pm_else_node,
3360 /** BeginNode#ensure_clause
3361
3362 Represents the ensure clause within the begin block.
3363
3364``` ruby
3365 begin x; ensure y; end
3366 ^^^^^^^^
3367```
3368*/
3369 pub ensure_clause: *mut pm_ensure_node,
3370 /** BeginNode#end_keyword_loc
3371
3372 Represents the Location of the `end` keyword.
3373
3374``` ruby
3375 begin x end
3376 ^^^
3377```
3378*/
3379 pub end_keyword_loc: pm_location_t,
3380}
3381/** BlockArgumentNode
3382
3383 Represents a block argument using `&`.
3384
3385``` ruby
3386 bar(&args)
3387 ^^^^^
3388```
3389
3390 Type: ::PM_BLOCK_ARGUMENT_NODE
3391
3392 @extends pm_node_t
3393*/
3394#[repr(C)]
3395#[derive(Debug, Copy, Clone)]
3396pub struct pm_block_argument_node {
3397 /** The embedded base node.
3398*/
3399 pub base: pm_node_t,
3400 /** BlockArgumentNode#expression
3401
3402 The expression that is being passed as a block argument. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3403
3404``` ruby
3405 foo(&args)
3406 ^^^^
3407```
3408*/
3409 pub expression: *mut pm_node,
3410 /** BlockArgumentNode#operator_loc
3411
3412 Represents the Location of the `&` operator.
3413
3414``` ruby
3415 foo(&args)
3416 ^
3417```
3418*/
3419 pub operator_loc: pm_location_t,
3420}
3421/** BlockLocalVariableNode
3422
3423 Represents a block local variable.
3424
3425``` ruby
3426 a { |; b| }
3427 ^
3428```
3429
3430 Type: ::PM_BLOCK_LOCAL_VARIABLE_NODE
3431
3432 Flags (#pm_parameter_flags):
3433 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
3434
3435 @extends pm_node_t
3436*/
3437#[repr(C)]
3438#[derive(Debug, Default, Copy, Clone)]
3439pub struct pm_block_local_variable_node {
3440 /** The embedded base node.
3441*/
3442 pub base: pm_node_t,
3443 /** BlockLocalVariableNode#name
3444
3445 The name of the block local variable.
3446
3447``` ruby
3448 a { |; b| } # name `:b`
3449 ^
3450```
3451*/
3452 pub name: pm_constant_id_t,
3453}
3454/** BlockNode
3455
3456 Represents a block of ruby code.
3457
3458``` ruby
3459 [1, 2, 3].each { |i| puts x }
3460 ^^^^^^^^^^^^^^
3461```
3462
3463 Type: ::PM_BLOCK_NODE
3464
3465 @extends pm_node_t
3466*/
3467#[repr(C)]
3468#[derive(Debug, Copy, Clone)]
3469pub struct pm_block_node {
3470 /** The embedded base node.
3471*/
3472 pub base: pm_node_t,
3473 /** BlockNode#locals
3474
3475 The local variables declared in the block.
3476
3477``` ruby
3478 [1, 2, 3].each { |i| puts x } # locals: [:i]
3479 ^
3480```
3481*/
3482 pub locals: pm_constant_id_list_t,
3483 /** BlockNode#parameters
3484
3485 The parameters of the block.
3486
3487``` ruby
3488 [1, 2, 3].each { |i| puts x }
3489 ^^^
3490 [1, 2, 3].each { puts _1 }
3491 ^^^^^^^^^^^
3492 [1, 2, 3].each { puts it }
3493 ^^^^^^^^^^^
3494```
3495*/
3496 pub parameters: *mut pm_node,
3497 /** BlockNode#body
3498
3499 The body of the block.
3500
3501``` ruby
3502 [1, 2, 3].each { |i| puts x }
3503 ^^^^^^
3504```
3505*/
3506 pub body: *mut pm_node,
3507 /** BlockNode#opening_loc
3508
3509 Represents the Location of the opening `{` or `do`.
3510
3511``` ruby
3512 [1, 2, 3].each { |i| puts x }
3513 ^
3514```
3515*/
3516 pub opening_loc: pm_location_t,
3517 /** BlockNode#closing_loc
3518
3519 Represents the Location of the closing `}` or `end`.
3520
3521``` ruby
3522 [1, 2, 3].each { |i| puts x }
3523 ^
3524```
3525*/
3526 pub closing_loc: pm_location_t,
3527}
3528/** BlockParameterNode
3529
3530 Represents a block parameter of a method, block, or lambda definition.
3531
3532``` ruby
3533 def a(&b)
3534 ^^
3535 end
3536```
3537
3538 Type: ::PM_BLOCK_PARAMETER_NODE
3539
3540 Flags (#pm_parameter_flags):
3541 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
3542
3543 @extends pm_node_t
3544*/
3545#[repr(C)]
3546#[derive(Debug, Default, Copy, Clone)]
3547pub struct pm_block_parameter_node {
3548 /** The embedded base node.
3549*/
3550 pub base: pm_node_t,
3551 /** BlockParameterNode#name
3552
3553 The name of the block parameter.
3554
3555``` ruby
3556 def a(&b) # name `:b`
3557 ^
3558 end
3559```
3560*/
3561 pub name: pm_constant_id_t,
3562 /** BlockParameterNode#name_loc
3563
3564 Represents the Location of the block parameter name.
3565
3566``` ruby
3567 def a(&b)
3568 ^
3569```
3570*/
3571 pub name_loc: pm_location_t,
3572 /** BlockParameterNode#operator_loc
3573
3574 Represents the Location of the `&` operator.
3575
3576``` ruby
3577 def a(&b)
3578 ^
3579 end
3580```
3581*/
3582 pub operator_loc: pm_location_t,
3583}
3584/** BlockParametersNode
3585
3586 Represents a block's parameters declaration.
3587
3588``` ruby
3589 -> (a, b = 1; local) { }
3590 ^^^^^^^^^^^^^^^^^
3591```
3592
3593``` ruby
3594 foo do |a, b = 1; local|
3595 ^^^^^^^^^^^^^^^^^
3596 end
3597```
3598
3599 Type: ::PM_BLOCK_PARAMETERS_NODE
3600
3601 @extends pm_node_t
3602*/
3603#[repr(C)]
3604#[derive(Debug, Copy, Clone)]
3605pub struct pm_block_parameters_node {
3606 /** The embedded base node.
3607*/
3608 pub base: pm_node_t,
3609 /** BlockParametersNode#parameters
3610
3611 Represents the parameters of the block.
3612
3613``` ruby
3614 -> (a, b = 1; local) { }
3615 ^^^^^^^^
3616```
3617
3618``` ruby
3619 foo do |a, b = 1; local|
3620 ^^^^^^^^
3621 end
3622```
3623*/
3624 pub parameters: *mut pm_parameters_node,
3625 /** BlockParametersNode#locals
3626
3627 Represents the local variables of the block.
3628
3629``` ruby
3630 -> (a, b = 1; local) { }
3631 ^^^^^
3632```
3633
3634``` ruby
3635 foo do |a, b = 1; local|
3636 ^^^^^
3637 end
3638```
3639*/
3640 pub locals: pm_node_list,
3641 /** BlockParametersNode#opening_loc
3642
3643 Represents the opening Location of the block parameters.
3644
3645``` ruby
3646 -> (a, b = 1; local) { }
3647 ^
3648```
3649
3650``` ruby
3651 foo do |a, b = 1; local|
3652 ^
3653 end
3654```
3655*/
3656 pub opening_loc: pm_location_t,
3657 /** BlockParametersNode#closing_loc
3658
3659 Represents the closing Location of the block parameters.
3660
3661``` ruby
3662 -> (a, b = 1; local) { }
3663 ^
3664```
3665
3666``` ruby
3667 foo do |a, b = 1; local|
3668 ^
3669 end
3670```
3671*/
3672 pub closing_loc: pm_location_t,
3673}
3674/** BreakNode
3675
3676 Represents the use of the `break` keyword.
3677
3678``` ruby
3679 break foo
3680 ^^^^^^^^^
3681```
3682
3683 Type: ::PM_BREAK_NODE
3684
3685 @extends pm_node_t
3686*/
3687#[repr(C)]
3688#[derive(Debug, Copy, Clone)]
3689pub struct pm_break_node {
3690 /** The embedded base node.
3691*/
3692 pub base: pm_node_t,
3693 /** BreakNode#arguments
3694
3695 The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3696
3697``` ruby
3698 break foo
3699 ^^^
3700```
3701*/
3702 pub arguments: *mut pm_arguments_node,
3703 /** BreakNode#keyword_loc
3704
3705 The Location of the `break` keyword.
3706
3707``` ruby
3708 break foo
3709 ^^^^^
3710```
3711*/
3712 pub keyword_loc: pm_location_t,
3713}
3714/** CallAndWriteNode
3715
3716 Represents the use of the `&&=` operator on a call.
3717
3718``` ruby
3719 foo.bar &&= value
3720 ^^^^^^^^^^^^^^^^^
3721```
3722
3723 Type: ::PM_CALL_AND_WRITE_NODE
3724
3725 Flags (#pm_call_node_flags):
3726 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
3727 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
3728 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
3729 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
3730
3731 @extends pm_node_t
3732*/
3733#[repr(C)]
3734#[derive(Debug, Copy, Clone)]
3735pub struct pm_call_and_write_node {
3736 /** The embedded base node.
3737*/
3738 pub base: pm_node_t,
3739 /** CallAndWriteNode#receiver
3740
3741 The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3742
3743``` ruby
3744 foo.bar &&= value
3745 ^^^
3746```
3747*/
3748 pub receiver: *mut pm_node,
3749 /** CallAndWriteNode#call_operator_loc
3750
3751 Represents the Location of the call operator.
3752
3753``` ruby
3754 foo.bar &&= value
3755 ^
3756```
3757*/
3758 pub call_operator_loc: pm_location_t,
3759 /** CallAndWriteNode#message_loc
3760
3761 Represents the Location of the message.
3762
3763``` ruby
3764 foo.bar &&= value
3765 ^^^
3766```
3767*/
3768 pub message_loc: pm_location_t,
3769 /** CallAndWriteNode#read_name
3770
3771 Represents the name of the method being called.
3772
3773``` ruby
3774 foo.bar &&= value # read_name `:bar`
3775 ^^^
3776```
3777*/
3778 pub read_name: pm_constant_id_t,
3779 /** CallAndWriteNode#write_name
3780
3781 Represents the name of the method being written to.
3782
3783``` ruby
3784 foo.bar &&= value # write_name `:bar=`
3785 ^^^
3786```
3787*/
3788 pub write_name: pm_constant_id_t,
3789 /** CallAndWriteNode#operator_loc
3790
3791 Represents the Location of the operator.
3792
3793``` ruby
3794 foo.bar &&= value
3795 ^^^
3796```
3797*/
3798 pub operator_loc: pm_location_t,
3799 /** CallAndWriteNode#value
3800
3801 Represents the value being assigned.
3802
3803``` ruby
3804 foo.bar &&= value
3805 ^^^^^
3806```
3807*/
3808 pub value: *mut pm_node,
3809}
3810/** CallNode
3811
3812 Represents a method call, in all of the various forms that can take.
3813
3814``` ruby
3815 foo
3816 ^^^
3817```
3818
3819``` ruby
3820 foo()
3821 ^^^^^
3822```
3823
3824``` ruby
3825 +foo
3826 ^^^^
3827```
3828
3829``` ruby
3830 foo + bar
3831 ^^^^^^^^^
3832```
3833
3834``` ruby
3835 foo.bar
3836 ^^^^^^^
3837```
3838
3839``` ruby
3840 foo&.bar
3841 ^^^^^^^^
3842```
3843
3844 Type: ::PM_CALL_NODE
3845
3846 Flags (#pm_call_node_flags):
3847 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
3848 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
3849 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
3850 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
3851
3852 @extends pm_node_t
3853*/
3854#[repr(C)]
3855#[derive(Debug, Copy, Clone)]
3856pub struct pm_call_node {
3857 /** The embedded base node.
3858*/
3859 pub base: pm_node_t,
3860 /** CallNode#receiver
3861
3862 The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3863
3864``` ruby
3865 foo.bar
3866 ^^^
3867```
3868
3869``` ruby
3870 +foo
3871 ^^^
3872```
3873
3874``` ruby
3875 foo + bar
3876 ^^^
3877```
3878*/
3879 pub receiver: *mut pm_node,
3880 /** CallNode#call_operator_loc
3881
3882 Represents the Location of the call operator.
3883
3884``` ruby
3885 foo.bar
3886 ^
3887```
3888
3889``` ruby
3890 foo&.bar
3891 ^^
3892```
3893*/
3894 pub call_operator_loc: pm_location_t,
3895 /** CallNode#name
3896
3897 Represents the name of the method being called.
3898
3899``` ruby
3900 foo.bar # name `:foo`
3901 ^^^
3902```
3903*/
3904 pub name: pm_constant_id_t,
3905 /** CallNode#message_loc
3906
3907 Represents the Location of the message.
3908
3909``` ruby
3910 foo.bar
3911 ^^^
3912```
3913*/
3914 pub message_loc: pm_location_t,
3915 /** CallNode#opening_loc
3916
3917 Represents the Location of the left parenthesis.
3918
3919``` ruby
3920 foo(bar)
3921 ^
3922```
3923*/
3924 pub opening_loc: pm_location_t,
3925 /** CallNode#arguments
3926
3927 Represents the arguments to the method call. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3928
3929``` ruby
3930 foo(bar)
3931 ^^^
3932```
3933*/
3934 pub arguments: *mut pm_arguments_node,
3935 /** CallNode#closing_loc
3936
3937 Represents the Location of the right parenthesis.
3938
3939``` ruby
3940 foo(bar)
3941 ^
3942```
3943*/
3944 pub closing_loc: pm_location_t,
3945 /** CallNode#equal_loc
3946
3947 Represents the Location of the equal sign, in the case that this is an attribute write.
3948
3949``` ruby
3950 foo.bar = value
3951 ^
3952```
3953
3954``` ruby
3955 foo[bar] = value
3956 ^
3957```
3958*/
3959 pub equal_loc: pm_location_t,
3960 /** CallNode#block
3961
3962 Represents the block that is being passed to the method.
3963
3964``` ruby
3965 foo { |a| a }
3966 ^^^^^^^^^
3967```
3968*/
3969 pub block: *mut pm_node,
3970}
3971/** CallOperatorWriteNode
3972
3973 Represents the use of an assignment operator on a call.
3974
3975``` ruby
3976 foo.bar += baz
3977 ^^^^^^^^^^^^^^
3978```
3979
3980 Type: ::PM_CALL_OPERATOR_WRITE_NODE
3981
3982 Flags (#pm_call_node_flags):
3983 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
3984 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
3985 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
3986 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
3987
3988 @extends pm_node_t
3989*/
3990#[repr(C)]
3991#[derive(Debug, Copy, Clone)]
3992pub struct pm_call_operator_write_node {
3993 /** The embedded base node.
3994*/
3995 pub base: pm_node_t,
3996 /** CallOperatorWriteNode#receiver
3997
3998 The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
3999
4000``` ruby
4001 foo.bar += value
4002 ^^^
4003```
4004*/
4005 pub receiver: *mut pm_node,
4006 /** CallOperatorWriteNode#call_operator_loc
4007
4008 Represents the Location of the call operator.
4009
4010``` ruby
4011 foo.bar += value
4012 ^
4013```
4014*/
4015 pub call_operator_loc: pm_location_t,
4016 /** CallOperatorWriteNode#message_loc
4017
4018 Represents the Location of the message.
4019
4020``` ruby
4021 foo.bar += value
4022 ^^^
4023```
4024*/
4025 pub message_loc: pm_location_t,
4026 /** CallOperatorWriteNode#read_name
4027
4028 Represents the name of the method being called.
4029
4030``` ruby
4031 foo.bar += value # read_name `:bar`
4032 ^^^
4033```
4034*/
4035 pub read_name: pm_constant_id_t,
4036 /** CallOperatorWriteNode#write_name
4037
4038 Represents the name of the method being written to.
4039
4040``` ruby
4041 foo.bar += value # write_name `:bar=`
4042 ^^^
4043```
4044*/
4045 pub write_name: pm_constant_id_t,
4046 /** CallOperatorWriteNode#binary_operator
4047
4048 Represents the binary operator being used.
4049
4050``` ruby
4051 foo.bar += value # binary_operator `:+`
4052 ^
4053```
4054*/
4055 pub binary_operator: pm_constant_id_t,
4056 /** CallOperatorWriteNode#binary_operator_loc
4057
4058 Represents the Location of the binary operator.
4059
4060``` ruby
4061 foo.bar += value
4062 ^^
4063```
4064*/
4065 pub binary_operator_loc: pm_location_t,
4066 /** CallOperatorWriteNode#value
4067
4068 Represents the value being assigned.
4069
4070``` ruby
4071 foo.bar += value
4072 ^^^^^
4073```
4074*/
4075 pub value: *mut pm_node,
4076}
4077/** CallOrWriteNode
4078
4079 Represents the use of the `||=` operator on a call.
4080
4081``` ruby
4082 foo.bar ||= value
4083 ^^^^^^^^^^^^^^^^^
4084```
4085
4086 Type: ::PM_CALL_OR_WRITE_NODE
4087
4088 Flags (#pm_call_node_flags):
4089 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
4090 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
4091 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
4092 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
4093
4094 @extends pm_node_t
4095*/
4096#[repr(C)]
4097#[derive(Debug, Copy, Clone)]
4098pub struct pm_call_or_write_node {
4099 /** The embedded base node.
4100*/
4101 pub base: pm_node_t,
4102 /** CallOrWriteNode#receiver
4103
4104 The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
4105
4106``` ruby
4107 foo.bar ||= value
4108 ^^^
4109```
4110*/
4111 pub receiver: *mut pm_node,
4112 /** CallOrWriteNode#call_operator_loc
4113
4114 Represents the Location of the call operator.
4115
4116``` ruby
4117 foo.bar ||= value
4118 ^
4119```
4120*/
4121 pub call_operator_loc: pm_location_t,
4122 /** CallOrWriteNode#message_loc
4123
4124 Represents the Location of the message.
4125
4126``` ruby
4127 foo.bar ||= value
4128 ^^^
4129```
4130*/
4131 pub message_loc: pm_location_t,
4132 /** CallOrWriteNode#read_name
4133
4134 Represents the name of the method being called.
4135
4136``` ruby
4137 foo.bar ||= value # read_name `:bar`
4138 ^^^
4139```
4140*/
4141 pub read_name: pm_constant_id_t,
4142 /** CallOrWriteNode#write_name
4143
4144 Represents the name of the method being written to.
4145
4146``` ruby
4147 foo.bar ||= value # write_name `:bar=`
4148 ^^^
4149```
4150*/
4151 pub write_name: pm_constant_id_t,
4152 /** CallOrWriteNode#operator_loc
4153
4154 Represents the Location of the operator.
4155
4156``` ruby
4157 foo.bar ||= value
4158 ^^^
4159```
4160*/
4161 pub operator_loc: pm_location_t,
4162 /** CallOrWriteNode#value
4163
4164 Represents the value being assigned.
4165
4166``` ruby
4167 foo.bar ||= value
4168 ^^^^^
4169```
4170*/
4171 pub value: *mut pm_node,
4172}
4173/** CallTargetNode
4174
4175 Represents assigning to a method call.
4176
4177``` ruby
4178 foo.bar, = 1
4179 ^^^^^^^
4180```
4181
4182``` ruby
4183 begin
4184 rescue => foo.bar
4185 ^^^^^^^
4186 end
4187```
4188
4189``` ruby
4190 for foo.bar in baz do end
4191 ^^^^^^^
4192```
4193
4194 Type: ::PM_CALL_TARGET_NODE
4195
4196 Flags (#pm_call_node_flags):
4197 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
4198 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
4199 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
4200 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
4201
4202 @extends pm_node_t
4203*/
4204#[repr(C)]
4205#[derive(Debug, Copy, Clone)]
4206pub struct pm_call_target_node {
4207 /** The embedded base node.
4208*/
4209 pub base: pm_node_t,
4210 /** CallTargetNode#receiver
4211
4212 The object that the method is being called on. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
4213
4214``` ruby
4215 foo.bar = 1
4216 ^^^
4217```
4218*/
4219 pub receiver: *mut pm_node,
4220 /** CallTargetNode#call_operator_loc
4221
4222 Represents the Location of the call operator.
4223
4224``` ruby
4225 foo.bar = 1
4226 ^
4227```
4228*/
4229 pub call_operator_loc: pm_location_t,
4230 /** CallTargetNode#name
4231
4232 Represents the name of the method being called.
4233
4234``` ruby
4235 foo.bar = 1 # name `:foo`
4236 ^^^
4237```
4238*/
4239 pub name: pm_constant_id_t,
4240 /** CallTargetNode#message_loc
4241
4242 Represents the Location of the message.
4243
4244``` ruby
4245 foo.bar = 1
4246 ^^^
4247```
4248*/
4249 pub message_loc: pm_location_t,
4250}
4251/** CapturePatternNode
4252
4253 Represents assigning to a local variable in pattern matching.
4254
4255``` ruby
4256 foo => [bar => baz]
4257 ^^^^^^^^^^
4258```
4259
4260 Type: ::PM_CAPTURE_PATTERN_NODE
4261
4262 @extends pm_node_t
4263*/
4264#[repr(C)]
4265#[derive(Debug, Copy, Clone)]
4266pub struct pm_capture_pattern_node {
4267 /** The embedded base node.
4268*/
4269 pub base: pm_node_t,
4270 /** CapturePatternNode#value
4271
4272 Represents the value to capture.
4273
4274``` ruby
4275 foo => bar
4276 ^^^
4277```
4278*/
4279 pub value: *mut pm_node,
4280 /** CapturePatternNode#target
4281
4282 Represents the target of the capture.
4283
4284``` ruby
4285 foo => bar
4286 ^^^
4287```
4288*/
4289 pub target: *mut pm_local_variable_target_node,
4290 /** CapturePatternNode#operator_loc
4291
4292 Represents the Location of the `=>` operator.
4293
4294``` ruby
4295 foo => bar
4296 ^^
4297```
4298*/
4299 pub operator_loc: pm_location_t,
4300}
4301/** CaseMatchNode
4302
4303 Represents the use of a case statement for pattern matching.
4304
4305``` ruby
4306 case true
4307 in false
4308 end
4309 ^^^^^^^^^
4310```
4311
4312 Type: ::PM_CASE_MATCH_NODE
4313
4314 @extends pm_node_t
4315*/
4316#[repr(C)]
4317#[derive(Debug, Copy, Clone)]
4318pub struct pm_case_match_node {
4319 /** The embedded base node.
4320*/
4321 pub base: pm_node_t,
4322 /** CaseMatchNode#predicate
4323
4324 Represents the predicate of the case match. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
4325
4326``` ruby
4327 case true; in false; end
4328 ^^^^
4329```
4330*/
4331 pub predicate: *mut pm_node,
4332 /** CaseMatchNode#conditions
4333
4334 Represents the conditions of the case match.
4335
4336``` ruby
4337 case true; in false; end
4338 ^^^^^^^^
4339```
4340*/
4341 pub conditions: pm_node_list,
4342 /** CaseMatchNode#else_clause
4343
4344 Represents the else clause of the case match.
4345
4346``` ruby
4347 case true; in false; else; end
4348 ^^^^^^^^^
4349```
4350*/
4351 pub else_clause: *mut pm_else_node,
4352 /** CaseMatchNode#case_keyword_loc
4353
4354 Represents the Location of the `case` keyword.
4355
4356``` ruby
4357 case true; in false; end
4358 ^^^^
4359```
4360*/
4361 pub case_keyword_loc: pm_location_t,
4362 /** CaseMatchNode#end_keyword_loc
4363
4364 Represents the Location of the `end` keyword.
4365
4366``` ruby
4367 case true; in false; end
4368 ^^^
4369```
4370*/
4371 pub end_keyword_loc: pm_location_t,
4372}
4373/** CaseNode
4374
4375 Represents the use of a case statement.
4376
4377``` ruby
4378 case true
4379 when false
4380 end
4381 ^^^^^^^^^^
4382```
4383
4384 Type: ::PM_CASE_NODE
4385
4386 @extends pm_node_t
4387*/
4388#[repr(C)]
4389#[derive(Debug, Copy, Clone)]
4390pub struct pm_case_node {
4391 /** The embedded base node.
4392*/
4393 pub base: pm_node_t,
4394 /** CaseNode#predicate
4395
4396 Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
4397
4398``` ruby
4399 case true; when false; end
4400 ^^^^
4401```
4402*/
4403 pub predicate: *mut pm_node,
4404 /** CaseNode#conditions
4405
4406 Represents the conditions of the case statement.
4407
4408``` ruby
4409 case true; when false; end
4410 ^^^^^^^^^^
4411```
4412*/
4413 pub conditions: pm_node_list,
4414 /** CaseNode#else_clause
4415
4416 Represents the else clause of the case statement.
4417
4418``` ruby
4419 case true; when false; else; end
4420 ^^^^^^^^^
4421```
4422*/
4423 pub else_clause: *mut pm_else_node,
4424 /** CaseNode#case_keyword_loc
4425
4426 Represents the Location of the `case` keyword.
4427
4428``` ruby
4429 case true; when false; end
4430 ^^^^
4431```
4432*/
4433 pub case_keyword_loc: pm_location_t,
4434 /** CaseNode#end_keyword_loc
4435
4436 Represents the Location of the `end` keyword.
4437
4438``` ruby
4439 case true; when false; end
4440 ^^^
4441```
4442*/
4443 pub end_keyword_loc: pm_location_t,
4444}
4445/** ClassNode
4446
4447 Represents a class declaration involving the `class` keyword.
4448
4449``` ruby
4450 class Foo end
4451 ^^^^^^^^^^^^^
4452```
4453
4454 Type: ::PM_CLASS_NODE
4455
4456 @extends pm_node_t
4457*/
4458#[repr(C)]
4459#[derive(Debug, Copy, Clone)]
4460pub struct pm_class_node {
4461 /** The embedded base node.
4462*/
4463 pub base: pm_node_t,
4464 /** ClassNode#locals
4465*/
4466 pub locals: pm_constant_id_list_t,
4467 /** ClassNode#class_keyword_loc
4468
4469 Represents the Location of the `class` keyword.
4470
4471``` ruby
4472 class Foo end
4473 ^^^^^
4474```
4475*/
4476 pub class_keyword_loc: pm_location_t,
4477 /** ClassNode#constant_path
4478*/
4479 pub constant_path: *mut pm_node,
4480 /** ClassNode#inheritance_operator_loc
4481
4482 Represents the Location of the `<` operator.
4483
4484``` ruby
4485 class Foo < Bar
4486 ^
4487```
4488*/
4489 pub inheritance_operator_loc: pm_location_t,
4490 /** ClassNode#superclass
4491
4492 Represents the superclass of the class.
4493
4494``` ruby
4495 class Foo < Bar
4496 ^^^
4497```
4498*/
4499 pub superclass: *mut pm_node,
4500 /** ClassNode#body
4501
4502 Represents the body of the class.
4503
4504``` ruby
4505 class Foo; bar; end
4506 ^^^
4507```
4508*/
4509 pub body: *mut pm_node,
4510 /** ClassNode#end_keyword_loc
4511
4512 Represents the Location of the `end` keyword.
4513
4514``` ruby
4515 class Foo end
4516 ^^^
4517```
4518*/
4519 pub end_keyword_loc: pm_location_t,
4520 /** ClassNode#name
4521
4522 The name of the class.
4523
4524``` ruby
4525 class Foo end # name `:Foo`
4526```
4527*/
4528 pub name: pm_constant_id_t,
4529}
4530/** ClassVariableAndWriteNode
4531
4532 Represents the use of the `&&=` operator for assignment to a class variable.
4533
4534``` ruby
4535 @@target &&= value
4536 ^^^^^^^^^^^^^^^^^^
4537```
4538
4539 Type: ::PM_CLASS_VARIABLE_AND_WRITE_NODE
4540
4541 @extends pm_node_t
4542*/
4543#[repr(C)]
4544#[derive(Debug, Copy, Clone)]
4545pub struct pm_class_variable_and_write_node {
4546 /** The embedded base node.
4547*/
4548 pub base: pm_node_t,
4549 /** ClassVariableAndWriteNode#name
4550
4551 The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
4552
4553``` ruby
4554 @@target &&= value # name `:@@target`
4555 ^^^^^^^^
4556```
4557*/
4558 pub name: pm_constant_id_t,
4559 /** ClassVariableAndWriteNode#name_loc
4560
4561 Represents the Location of the variable name.
4562
4563``` ruby
4564 @@target &&= value
4565 ^^^^^^^^
4566```
4567*/
4568 pub name_loc: pm_location_t,
4569 /** ClassVariableAndWriteNode#operator_loc
4570
4571 Represents the Location of the `&&=` operator.
4572
4573``` ruby
4574 @@target &&= value
4575 ^^^
4576```
4577*/
4578 pub operator_loc: pm_location_t,
4579 /** ClassVariableAndWriteNode#value
4580
4581 Represents the value being assigned. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
4582
4583``` ruby
4584 @@target &&= value
4585 ^^^^^
4586```
4587*/
4588 pub value: *mut pm_node,
4589}
4590/** ClassVariableOperatorWriteNode
4591
4592 Represents assigning to a class variable using an operator that isn't `=`.
4593
4594``` ruby
4595 @@target += value
4596 ^^^^^^^^^^^^^^^^^
4597```
4598
4599 Type: ::PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
4600
4601 @extends pm_node_t
4602*/
4603#[repr(C)]
4604#[derive(Debug, Copy, Clone)]
4605pub struct pm_class_variable_operator_write_node {
4606 /** The embedded base node.
4607*/
4608 pub base: pm_node_t,
4609 /** ClassVariableOperatorWriteNode#name
4610*/
4611 pub name: pm_constant_id_t,
4612 /** ClassVariableOperatorWriteNode#name_loc
4613*/
4614 pub name_loc: pm_location_t,
4615 /** ClassVariableOperatorWriteNode#binary_operator_loc
4616*/
4617 pub binary_operator_loc: pm_location_t,
4618 /** ClassVariableOperatorWriteNode#value
4619*/
4620 pub value: *mut pm_node,
4621 /** ClassVariableOperatorWriteNode#binary_operator
4622*/
4623 pub binary_operator: pm_constant_id_t,
4624}
4625/** ClassVariableOrWriteNode
4626
4627 Represents the use of the `||=` operator for assignment to a class variable.
4628
4629``` ruby
4630 @@target ||= value
4631 ^^^^^^^^^^^^^^^^^^
4632```
4633
4634 Type: ::PM_CLASS_VARIABLE_OR_WRITE_NODE
4635
4636 @extends pm_node_t
4637*/
4638#[repr(C)]
4639#[derive(Debug, Copy, Clone)]
4640pub struct pm_class_variable_or_write_node {
4641 /** The embedded base node.
4642*/
4643 pub base: pm_node_t,
4644 /** ClassVariableOrWriteNode#name
4645*/
4646 pub name: pm_constant_id_t,
4647 /** ClassVariableOrWriteNode#name_loc
4648*/
4649 pub name_loc: pm_location_t,
4650 /** ClassVariableOrWriteNode#operator_loc
4651*/
4652 pub operator_loc: pm_location_t,
4653 /** ClassVariableOrWriteNode#value
4654*/
4655 pub value: *mut pm_node,
4656}
4657/** ClassVariableReadNode
4658
4659 Represents referencing a class variable.
4660
4661``` ruby
4662 @@foo
4663 ^^^^^
4664```
4665
4666 Type: ::PM_CLASS_VARIABLE_READ_NODE
4667
4668 @extends pm_node_t
4669*/
4670#[repr(C)]
4671#[derive(Debug, Default, Copy, Clone)]
4672pub struct pm_class_variable_read_node {
4673 /** The embedded base node.
4674*/
4675 pub base: pm_node_t,
4676 /** ClassVariableReadNode#name
4677
4678 The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
4679
4680``` ruby
4681 @@abc # name `:@@abc`
4682```
4683
4684``` ruby
4685 @@_test # name `:@@_test`
4686```
4687*/
4688 pub name: pm_constant_id_t,
4689}
4690/** ClassVariableTargetNode
4691
4692 Represents writing to a class variable in a context that doesn't have an explicit value.
4693
4694``` ruby
4695 @@foo, @@bar = baz
4696 ^^^^^ ^^^^^
4697```
4698
4699 Type: ::PM_CLASS_VARIABLE_TARGET_NODE
4700
4701 @extends pm_node_t
4702*/
4703#[repr(C)]
4704#[derive(Debug, Default, Copy, Clone)]
4705pub struct pm_class_variable_target_node {
4706 /** The embedded base node.
4707*/
4708 pub base: pm_node_t,
4709 /** ClassVariableTargetNode#name
4710*/
4711 pub name: pm_constant_id_t,
4712}
4713/** ClassVariableWriteNode
4714
4715 Represents writing to a class variable.
4716
4717``` ruby
4718 @@foo = 1
4719 ^^^^^^^^^
4720```
4721
4722 Type: ::PM_CLASS_VARIABLE_WRITE_NODE
4723
4724 @extends pm_node_t
4725*/
4726#[repr(C)]
4727#[derive(Debug, Copy, Clone)]
4728pub struct pm_class_variable_write_node {
4729 /** The embedded base node.
4730*/
4731 pub base: pm_node_t,
4732 /** ClassVariableWriteNode#name
4733
4734 The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
4735
4736``` ruby
4737 @@abc = 123 # name `@@abc`
4738```
4739
4740``` ruby
4741 @@_test = :test # name `@@_test`
4742```
4743*/
4744 pub name: pm_constant_id_t,
4745 /** ClassVariableWriteNode#name_loc
4746
4747 The Location of the variable name.
4748
4749``` ruby
4750 @@foo = :bar
4751 ^^^^^
4752```
4753*/
4754 pub name_loc: pm_location_t,
4755 /** ClassVariableWriteNode#value
4756
4757 The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
4758
4759``` ruby
4760 @@foo = :bar
4761 ^^^^
4762```
4763
4764``` ruby
4765 @@_xyz = 123
4766 ^^^
4767```
4768*/
4769 pub value: *mut pm_node,
4770 /** ClassVariableWriteNode#operator_loc
4771
4772 The Location of the `=` operator.
4773
4774``` ruby
4775 @@foo = :bar
4776 ^
4777```
4778*/
4779 pub operator_loc: pm_location_t,
4780}
4781/** ConstantAndWriteNode
4782
4783 Represents the use of the `&&=` operator for assignment to a constant.
4784
4785``` ruby
4786 Target &&= value
4787 ^^^^^^^^^^^^^^^^
4788```
4789
4790 Type: ::PM_CONSTANT_AND_WRITE_NODE
4791
4792 @extends pm_node_t
4793*/
4794#[repr(C)]
4795#[derive(Debug, Copy, Clone)]
4796pub struct pm_constant_and_write_node {
4797 /** The embedded base node.
4798*/
4799 pub base: pm_node_t,
4800 /** ConstantAndWriteNode#name
4801*/
4802 pub name: pm_constant_id_t,
4803 /** ConstantAndWriteNode#name_loc
4804*/
4805 pub name_loc: pm_location_t,
4806 /** ConstantAndWriteNode#operator_loc
4807*/
4808 pub operator_loc: pm_location_t,
4809 /** ConstantAndWriteNode#value
4810*/
4811 pub value: *mut pm_node,
4812}
4813/** ConstantOperatorWriteNode
4814
4815 Represents assigning to a constant using an operator that isn't `=`.
4816
4817``` ruby
4818 Target += value
4819 ^^^^^^^^^^^^^^^
4820```
4821
4822 Type: ::PM_CONSTANT_OPERATOR_WRITE_NODE
4823
4824 @extends pm_node_t
4825*/
4826#[repr(C)]
4827#[derive(Debug, Copy, Clone)]
4828pub struct pm_constant_operator_write_node {
4829 /** The embedded base node.
4830*/
4831 pub base: pm_node_t,
4832 /** ConstantOperatorWriteNode#name
4833*/
4834 pub name: pm_constant_id_t,
4835 /** ConstantOperatorWriteNode#name_loc
4836*/
4837 pub name_loc: pm_location_t,
4838 /** ConstantOperatorWriteNode#binary_operator_loc
4839*/
4840 pub binary_operator_loc: pm_location_t,
4841 /** ConstantOperatorWriteNode#value
4842*/
4843 pub value: *mut pm_node,
4844 /** ConstantOperatorWriteNode#binary_operator
4845*/
4846 pub binary_operator: pm_constant_id_t,
4847}
4848/** ConstantOrWriteNode
4849
4850 Represents the use of the `||=` operator for assignment to a constant.
4851
4852``` ruby
4853 Target ||= value
4854 ^^^^^^^^^^^^^^^^
4855```
4856
4857 Type: ::PM_CONSTANT_OR_WRITE_NODE
4858
4859 @extends pm_node_t
4860*/
4861#[repr(C)]
4862#[derive(Debug, Copy, Clone)]
4863pub struct pm_constant_or_write_node {
4864 /** The embedded base node.
4865*/
4866 pub base: pm_node_t,
4867 /** ConstantOrWriteNode#name
4868*/
4869 pub name: pm_constant_id_t,
4870 /** ConstantOrWriteNode#name_loc
4871*/
4872 pub name_loc: pm_location_t,
4873 /** ConstantOrWriteNode#operator_loc
4874*/
4875 pub operator_loc: pm_location_t,
4876 /** ConstantOrWriteNode#value
4877*/
4878 pub value: *mut pm_node,
4879}
4880/** ConstantPathAndWriteNode
4881
4882 Represents the use of the `&&=` operator for assignment to a constant path.
4883
4884``` ruby
4885 Parent::Child &&= value
4886 ^^^^^^^^^^^^^^^^^^^^^^^
4887```
4888
4889 Type: ::PM_CONSTANT_PATH_AND_WRITE_NODE
4890
4891 @extends pm_node_t
4892*/
4893#[repr(C)]
4894#[derive(Debug, Copy, Clone)]
4895pub struct pm_constant_path_and_write_node {
4896 /** The embedded base node.
4897*/
4898 pub base: pm_node_t,
4899 /** ConstantPathAndWriteNode#target
4900*/
4901 pub target: *mut pm_constant_path_node,
4902 /** ConstantPathAndWriteNode#operator_loc
4903*/
4904 pub operator_loc: pm_location_t,
4905 /** ConstantPathAndWriteNode#value
4906*/
4907 pub value: *mut pm_node,
4908}
4909/** ConstantPathNode
4910
4911 Represents accessing a constant through a path of `::` operators.
4912
4913``` ruby
4914 Foo::Bar
4915 ^^^^^^^^
4916```
4917
4918 Type: ::PM_CONSTANT_PATH_NODE
4919
4920 @extends pm_node_t
4921*/
4922#[repr(C)]
4923#[derive(Debug, Copy, Clone)]
4924pub struct pm_constant_path_node {
4925 /** The embedded base node.
4926*/
4927 pub base: pm_node_t,
4928 /** ConstantPathNode#parent
4929
4930 The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree.
4931
4932``` ruby
4933 Foo::Bar
4934 ^^^
4935```
4936
4937``` ruby
4938 self::Test
4939 ^^^^
4940```
4941
4942``` ruby
4943 a.b::C
4944 ^^^
4945```
4946*/
4947 pub parent: *mut pm_node,
4948 /** ConstantPathNode#name
4949
4950 The name of the constant being accessed. This could be `nil` in the event of a syntax error.
4951*/
4952 pub name: pm_constant_id_t,
4953 /** ConstantPathNode#delimiter_loc
4954
4955 The Location of the `::` delimiter.
4956
4957``` ruby
4958 ::Foo
4959 ^^
4960```
4961
4962``` ruby
4963 One::Two
4964 ^^
4965```
4966*/
4967 pub delimiter_loc: pm_location_t,
4968 /** ConstantPathNode#name_loc
4969
4970 The Location of the name of the constant.
4971
4972``` ruby
4973 ::Foo
4974 ^^^
4975```
4976
4977``` ruby
4978 One::Two
4979 ^^^
4980```
4981*/
4982 pub name_loc: pm_location_t,
4983}
4984/** ConstantPathOperatorWriteNode
4985
4986 Represents assigning to a constant path using an operator that isn't `=`.
4987
4988``` ruby
4989 Parent::Child += value
4990 ^^^^^^^^^^^^^^^^^^^^^^
4991```
4992
4993 Type: ::PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
4994
4995 @extends pm_node_t
4996*/
4997#[repr(C)]
4998#[derive(Debug, Copy, Clone)]
4999pub struct pm_constant_path_operator_write_node {
5000 /** The embedded base node.
5001*/
5002 pub base: pm_node_t,
5003 /** ConstantPathOperatorWriteNode#target
5004*/
5005 pub target: *mut pm_constant_path_node,
5006 /** ConstantPathOperatorWriteNode#binary_operator_loc
5007*/
5008 pub binary_operator_loc: pm_location_t,
5009 /** ConstantPathOperatorWriteNode#value
5010*/
5011 pub value: *mut pm_node,
5012 /** ConstantPathOperatorWriteNode#binary_operator
5013*/
5014 pub binary_operator: pm_constant_id_t,
5015}
5016/** ConstantPathOrWriteNode
5017
5018 Represents the use of the `||=` operator for assignment to a constant path.
5019
5020``` ruby
5021 Parent::Child ||= value
5022 ^^^^^^^^^^^^^^^^^^^^^^^
5023```
5024
5025 Type: ::PM_CONSTANT_PATH_OR_WRITE_NODE
5026
5027 @extends pm_node_t
5028*/
5029#[repr(C)]
5030#[derive(Debug, Copy, Clone)]
5031pub struct pm_constant_path_or_write_node {
5032 /** The embedded base node.
5033*/
5034 pub base: pm_node_t,
5035 /** ConstantPathOrWriteNode#target
5036*/
5037 pub target: *mut pm_constant_path_node,
5038 /** ConstantPathOrWriteNode#operator_loc
5039*/
5040 pub operator_loc: pm_location_t,
5041 /** ConstantPathOrWriteNode#value
5042*/
5043 pub value: *mut pm_node,
5044}
5045/** ConstantPathTargetNode
5046
5047 Represents writing to a constant path in a context that doesn't have an explicit value.
5048
5049``` ruby
5050 Foo::Foo, Bar::Bar = baz
5051 ^^^^^^^^ ^^^^^^^^
5052```
5053
5054 Type: ::PM_CONSTANT_PATH_TARGET_NODE
5055
5056 @extends pm_node_t
5057*/
5058#[repr(C)]
5059#[derive(Debug, Copy, Clone)]
5060pub struct pm_constant_path_target_node {
5061 /** The embedded base node.
5062*/
5063 pub base: pm_node_t,
5064 /** ConstantPathTargetNode#parent
5065*/
5066 pub parent: *mut pm_node,
5067 /** ConstantPathTargetNode#name
5068*/
5069 pub name: pm_constant_id_t,
5070 /** ConstantPathTargetNode#delimiter_loc
5071*/
5072 pub delimiter_loc: pm_location_t,
5073 /** ConstantPathTargetNode#name_loc
5074*/
5075 pub name_loc: pm_location_t,
5076}
5077/** ConstantPathWriteNode
5078
5079 Represents writing to a constant path.
5080
5081``` ruby
5082 ::Foo = 1
5083 ^^^^^^^^^
5084```
5085
5086``` ruby
5087 Foo::Bar = 1
5088 ^^^^^^^^^^^^
5089```
5090
5091``` ruby
5092 ::Foo::Bar = 1
5093 ^^^^^^^^^^^^^^
5094```
5095
5096 Type: ::PM_CONSTANT_PATH_WRITE_NODE
5097
5098 @extends pm_node_t
5099*/
5100#[repr(C)]
5101#[derive(Debug, Copy, Clone)]
5102pub struct pm_constant_path_write_node {
5103 /** The embedded base node.
5104*/
5105 pub base: pm_node_t,
5106 /** ConstantPathWriteNode#target
5107
5108 A node representing the constant path being written to.
5109
5110``` ruby
5111 Foo::Bar = 1
5112 ^^^^^^^^
5113```
5114
5115``` ruby
5116 ::Foo = :abc
5117 ^^^^^
5118```
5119*/
5120 pub target: *mut pm_constant_path_node,
5121 /** ConstantPathWriteNode#operator_loc
5122
5123 The Location of the `=` operator.
5124
5125``` ruby
5126 ::ABC = 123
5127 ^
5128```
5129*/
5130 pub operator_loc: pm_location_t,
5131 /** ConstantPathWriteNode#value
5132
5133 The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
5134
5135``` ruby
5136 FOO::BAR = :abc
5137 ^^^^
5138```
5139*/
5140 pub value: *mut pm_node,
5141}
5142/** ConstantReadNode
5143
5144 Represents referencing a constant.
5145
5146``` ruby
5147 Foo
5148 ^^^
5149```
5150
5151 Type: ::PM_CONSTANT_READ_NODE
5152
5153 @extends pm_node_t
5154*/
5155#[repr(C)]
5156#[derive(Debug, Default, Copy, Clone)]
5157pub struct pm_constant_read_node {
5158 /** The embedded base node.
5159*/
5160 pub base: pm_node_t,
5161 /** ConstantReadNode#name
5162
5163 The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants).
5164
5165``` ruby
5166 X # name `:X`
5167```
5168
5169``` ruby
5170 SOME_CONSTANT # name `:SOME_CONSTANT`
5171```
5172*/
5173 pub name: pm_constant_id_t,
5174}
5175/** ConstantTargetNode
5176
5177 Represents writing to a constant in a context that doesn't have an explicit value.
5178
5179``` ruby
5180 Foo, Bar = baz
5181 ^^^ ^^^
5182```
5183
5184 Type: ::PM_CONSTANT_TARGET_NODE
5185
5186 @extends pm_node_t
5187*/
5188#[repr(C)]
5189#[derive(Debug, Default, Copy, Clone)]
5190pub struct pm_constant_target_node {
5191 /** The embedded base node.
5192*/
5193 pub base: pm_node_t,
5194 /** ConstantTargetNode#name
5195*/
5196 pub name: pm_constant_id_t,
5197}
5198/** ConstantWriteNode
5199
5200 Represents writing to a constant.
5201
5202``` ruby
5203 Foo = 1
5204 ^^^^^^^
5205```
5206
5207 Type: ::PM_CONSTANT_WRITE_NODE
5208
5209 @extends pm_node_t
5210*/
5211#[repr(C)]
5212#[derive(Debug, Copy, Clone)]
5213pub struct pm_constant_write_node {
5214 /** The embedded base node.
5215*/
5216 pub base: pm_node_t,
5217 /** ConstantWriteNode#name
5218
5219 The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants).
5220
5221``` ruby
5222 Foo = :bar # name `:Foo`
5223```
5224
5225``` ruby
5226 XYZ = 1 # name `:XYZ`
5227```
5228*/
5229 pub name: pm_constant_id_t,
5230 /** ConstantWriteNode#name_loc
5231
5232 The Location of the constant name.
5233
5234``` ruby
5235 FOO = 1
5236 ^^^
5237```
5238*/
5239 pub name_loc: pm_location_t,
5240 /** ConstantWriteNode#value
5241
5242 The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
5243
5244``` ruby
5245 FOO = :bar
5246 ^^^^
5247```
5248
5249``` ruby
5250 MyClass = Class.new
5251 ^^^^^^^^^
5252```
5253*/
5254 pub value: *mut pm_node,
5255 /** ConstantWriteNode#operator_loc
5256
5257 The Location of the `=` operator.
5258
5259``` ruby
5260 FOO = :bar
5261 ^
5262```
5263*/
5264 pub operator_loc: pm_location_t,
5265}
5266/** DefNode
5267
5268 Represents a method definition.
5269
5270``` ruby
5271 def method
5272 end
5273 ^^^^^^^^^^
5274```
5275
5276 Type: ::PM_DEF_NODE
5277
5278 @extends pm_node_t
5279*/
5280#[repr(C)]
5281#[derive(Debug, Copy, Clone)]
5282pub struct pm_def_node {
5283 /** The embedded base node.
5284*/
5285 pub base: pm_node_t,
5286 /** DefNode#name
5287*/
5288 pub name: pm_constant_id_t,
5289 /** DefNode#name_loc
5290*/
5291 pub name_loc: pm_location_t,
5292 /** DefNode#receiver
5293*/
5294 pub receiver: *mut pm_node,
5295 /** DefNode#parameters
5296*/
5297 pub parameters: *mut pm_parameters_node,
5298 /** DefNode#body
5299*/
5300 pub body: *mut pm_node,
5301 /** DefNode#locals
5302*/
5303 pub locals: pm_constant_id_list_t,
5304 /** DefNode#def_keyword_loc
5305*/
5306 pub def_keyword_loc: pm_location_t,
5307 /** DefNode#operator_loc
5308*/
5309 pub operator_loc: pm_location_t,
5310 /** DefNode#lparen_loc
5311*/
5312 pub lparen_loc: pm_location_t,
5313 /** DefNode#rparen_loc
5314*/
5315 pub rparen_loc: pm_location_t,
5316 /** DefNode#equal_loc
5317*/
5318 pub equal_loc: pm_location_t,
5319 /** DefNode#end_keyword_loc
5320*/
5321 pub end_keyword_loc: pm_location_t,
5322}
5323/** DefinedNode
5324
5325 Represents the use of the `defined?` keyword.
5326
5327``` ruby
5328 defined?(a)
5329 ^^^^^^^^^^^
5330```
5331
5332 Type: ::PM_DEFINED_NODE
5333
5334 @extends pm_node_t
5335*/
5336#[repr(C)]
5337#[derive(Debug, Copy, Clone)]
5338pub struct pm_defined_node {
5339 /** The embedded base node.
5340*/
5341 pub base: pm_node_t,
5342 /** DefinedNode#lparen_loc
5343*/
5344 pub lparen_loc: pm_location_t,
5345 /** DefinedNode#value
5346*/
5347 pub value: *mut pm_node,
5348 /** DefinedNode#rparen_loc
5349*/
5350 pub rparen_loc: pm_location_t,
5351 /** DefinedNode#keyword_loc
5352*/
5353 pub keyword_loc: pm_location_t,
5354}
5355/** ElseNode
5356
5357 Represents an `else` clause in a `case`, `if`, or `unless` statement.
5358
5359``` ruby
5360 if a then b else c end
5361 ^^^^^^^^^^
5362```
5363
5364 Type: ::PM_ELSE_NODE
5365
5366 @extends pm_node_t
5367*/
5368#[repr(C)]
5369#[derive(Debug, Copy, Clone)]
5370pub struct pm_else_node {
5371 /** The embedded base node.
5372*/
5373 pub base: pm_node_t,
5374 /** ElseNode#else_keyword_loc
5375*/
5376 pub else_keyword_loc: pm_location_t,
5377 /** ElseNode#statements
5378*/
5379 pub statements: *mut pm_statements_node,
5380 /** ElseNode#end_keyword_loc
5381*/
5382 pub end_keyword_loc: pm_location_t,
5383}
5384/** EmbeddedStatementsNode
5385
5386 Represents an interpolated set of statements.
5387
5388``` ruby
5389 "foo #{bar}"
5390 ^^^^^^
5391```
5392
5393 Type: ::PM_EMBEDDED_STATEMENTS_NODE
5394
5395 @extends pm_node_t
5396*/
5397#[repr(C)]
5398#[derive(Debug, Copy, Clone)]
5399pub struct pm_embedded_statements_node {
5400 /** The embedded base node.
5401*/
5402 pub base: pm_node_t,
5403 /** EmbeddedStatementsNode#opening_loc
5404*/
5405 pub opening_loc: pm_location_t,
5406 /** EmbeddedStatementsNode#statements
5407*/
5408 pub statements: *mut pm_statements_node,
5409 /** EmbeddedStatementsNode#closing_loc
5410*/
5411 pub closing_loc: pm_location_t,
5412}
5413/** EmbeddedVariableNode
5414
5415 Represents an interpolated variable.
5416
5417``` ruby
5418 "foo #@bar"
5419 ^^^^^
5420```
5421
5422 Type: ::PM_EMBEDDED_VARIABLE_NODE
5423
5424 @extends pm_node_t
5425*/
5426#[repr(C)]
5427#[derive(Debug, Copy, Clone)]
5428pub struct pm_embedded_variable_node {
5429 /** The embedded base node.
5430*/
5431 pub base: pm_node_t,
5432 /** EmbeddedVariableNode#operator_loc
5433*/
5434 pub operator_loc: pm_location_t,
5435 /** EmbeddedVariableNode#variable
5436*/
5437 pub variable: *mut pm_node,
5438}
5439/** EnsureNode
5440
5441 Represents an `ensure` clause in a `begin` statement.
5442
5443``` ruby
5444 begin
5445 foo
5446 ensure
5447 ^^^^^^
5448 bar
5449 end
5450```
5451
5452 Type: ::PM_ENSURE_NODE
5453
5454 @extends pm_node_t
5455*/
5456#[repr(C)]
5457#[derive(Debug, Copy, Clone)]
5458pub struct pm_ensure_node {
5459 /** The embedded base node.
5460*/
5461 pub base: pm_node_t,
5462 /** EnsureNode#ensure_keyword_loc
5463*/
5464 pub ensure_keyword_loc: pm_location_t,
5465 /** EnsureNode#statements
5466*/
5467 pub statements: *mut pm_statements_node,
5468 /** EnsureNode#end_keyword_loc
5469*/
5470 pub end_keyword_loc: pm_location_t,
5471}
5472/** ErrorRecoveryNode
5473
5474 Represents a node that is either missing or unexpected and results in a syntax error.
5475
5476 Type: ::PM_ERROR_RECOVERY_NODE
5477
5478 @extends pm_node_t
5479*/
5480#[repr(C)]
5481#[derive(Debug, Copy, Clone)]
5482pub struct pm_error_recovery_node {
5483 /** The embedded base node.
5484*/
5485 pub base: pm_node_t,
5486 /** ErrorRecoveryNode#unexpected
5487
5488 The unexpected node that was found in the tree, if there was one.
5489*/
5490 pub unexpected: *mut pm_node,
5491}
5492/** FalseNode
5493
5494 Represents the use of the literal `false` keyword.
5495
5496``` ruby
5497 false
5498 ^^^^^
5499```
5500
5501 Type: ::PM_FALSE_NODE
5502
5503 @extends pm_node_t
5504*/
5505#[repr(C)]
5506#[derive(Debug, Default, Copy, Clone)]
5507pub struct pm_false_node {
5508 /** The embedded base node.
5509*/
5510 pub base: pm_node_t,
5511}
5512/** FindPatternNode
5513
5514 Represents a find pattern in pattern matching.
5515
5516``` ruby
5517 foo in *bar, baz, *qux
5518 ^^^^^^^^^^^^^^^
5519```
5520
5521``` ruby
5522 foo in [*bar, baz, *qux]
5523 ^^^^^^^^^^^^^^^^^
5524```
5525
5526``` ruby
5527 foo in Foo(*bar, baz, *qux)
5528 ^^^^^^^^^^^^^^^^^^^^
5529```
5530
5531``` ruby
5532 foo => *bar, baz, *qux
5533 ^^^^^^^^^^^^^^^
5534```
5535
5536 Type: ::PM_FIND_PATTERN_NODE
5537
5538 @extends pm_node_t
5539*/
5540#[repr(C)]
5541#[derive(Debug, Copy, Clone)]
5542pub struct pm_find_pattern_node {
5543 /** The embedded base node.
5544*/
5545 pub base: pm_node_t,
5546 /** FindPatternNode#constant
5547
5548 Represents the optional constant preceding the pattern
5549
5550``` ruby
5551 foo in Foo(*bar, baz, *qux)
5552 ^^^
5553```
5554*/
5555 pub constant: *mut pm_node,
5556 /** FindPatternNode#left
5557
5558 Represents the first wildcard node in the pattern.
5559
5560``` ruby
5561 foo in *bar, baz, *qux
5562 ^^^^
5563```
5564
5565``` ruby
5566 foo in Foo(*bar, baz, *qux)
5567 ^^^^
5568```
5569*/
5570 pub left: *mut pm_splat_node,
5571 /** FindPatternNode#requireds
5572
5573 Represents the nodes in between the wildcards.
5574
5575``` ruby
5576 foo in *bar, baz, *qux
5577 ^^^
5578```
5579
5580``` ruby
5581 foo in Foo(*bar, baz, 1, *qux)
5582 ^^^^^^
5583```
5584*/
5585 pub requireds: pm_node_list,
5586 /** FindPatternNode#right
5587
5588 Represents the second wildcard node in the pattern.
5589
5590``` ruby
5591 foo in *bar, baz, *qux
5592 ^^^^
5593```
5594
5595``` ruby
5596 foo in Foo(*bar, baz, *qux)
5597 ^^^^
5598```
5599*/
5600 pub right: *mut pm_splat_node,
5601 /** FindPatternNode#opening_loc
5602
5603 The Location of the opening brace.
5604
5605``` ruby
5606 foo in [*bar, baz, *qux]
5607 ^
5608```
5609
5610``` ruby
5611 foo in Foo(*bar, baz, *qux)
5612 ^
5613```
5614*/
5615 pub opening_loc: pm_location_t,
5616 /** FindPatternNode#closing_loc
5617
5618 The Location of the closing brace.
5619
5620``` ruby
5621 foo in [*bar, baz, *qux]
5622 ^
5623```
5624
5625``` ruby
5626 foo in Foo(*bar, baz, *qux)
5627 ^
5628```
5629*/
5630 pub closing_loc: pm_location_t,
5631}
5632/** FlipFlopNode
5633
5634 Represents the use of the `..` or `...` operators to create flip flops.
5635
5636``` ruby
5637 baz if foo .. bar
5638 ^^^^^^^^^^
5639```
5640
5641 Type: ::PM_FLIP_FLOP_NODE
5642
5643 Flags (#pm_range_flags):
5644 * ::PM_RANGE_FLAGS_EXCLUDE_END
5645
5646 @extends pm_node_t
5647*/
5648#[repr(C)]
5649#[derive(Debug, Copy, Clone)]
5650pub struct pm_flip_flop_node {
5651 /** The embedded base node.
5652*/
5653 pub base: pm_node_t,
5654 /** FlipFlopNode#left
5655*/
5656 pub left: *mut pm_node,
5657 /** FlipFlopNode#right
5658*/
5659 pub right: *mut pm_node,
5660 /** FlipFlopNode#operator_loc
5661*/
5662 pub operator_loc: pm_location_t,
5663}
5664/** FloatNode
5665
5666 Represents a floating point number literal.
5667
5668``` ruby
5669 1.0
5670 ^^^
5671```
5672
5673 Type: ::PM_FLOAT_NODE
5674
5675 @extends pm_node_t
5676*/
5677#[repr(C)]
5678#[derive(Debug, Default, Copy, Clone)]
5679pub struct pm_float_node {
5680 /** The embedded base node.
5681*/
5682 pub base: pm_node_t,
5683 /** FloatNode#value
5684
5685 The value of the floating point number as a Float.
5686*/
5687 pub value: f64,
5688}
5689/** ForNode
5690
5691 Represents the use of the `for` keyword.
5692
5693``` ruby
5694 for i in a end
5695 ^^^^^^^^^^^^^^
5696```
5697
5698 Type: ::PM_FOR_NODE
5699
5700 @extends pm_node_t
5701*/
5702#[repr(C)]
5703#[derive(Debug, Copy, Clone)]
5704pub struct pm_for_node {
5705 /** The embedded base node.
5706*/
5707 pub base: pm_node_t,
5708 /** ForNode#index
5709
5710 The index expression for `for` loops.
5711
5712``` ruby
5713 for i in a end
5714 ^
5715```
5716*/
5717 pub index: *mut pm_node,
5718 /** ForNode#collection
5719
5720 The collection to iterate over.
5721
5722``` ruby
5723 for i in a end
5724 ^
5725```
5726*/
5727 pub collection: *mut pm_node,
5728 /** ForNode#statements
5729
5730 Represents the body of statements to execute for each iteration of the loop.
5731
5732``` ruby
5733 for i in a
5734 foo(i)
5735 ^^^^^^
5736 end
5737```
5738*/
5739 pub statements: *mut pm_statements_node,
5740 /** ForNode#for_keyword_loc
5741
5742 The Location of the `for` keyword.
5743
5744``` ruby
5745 for i in a end
5746 ^^^
5747```
5748*/
5749 pub for_keyword_loc: pm_location_t,
5750 /** ForNode#in_keyword_loc
5751
5752 The Location of the `in` keyword.
5753
5754``` ruby
5755 for i in a end
5756 ^^
5757```
5758*/
5759 pub in_keyword_loc: pm_location_t,
5760 /** ForNode#do_keyword_loc
5761
5762 The Location of the `do` keyword, if present.
5763
5764``` ruby
5765 for i in a do end
5766 ^^
5767```
5768*/
5769 pub do_keyword_loc: pm_location_t,
5770 /** ForNode#end_keyword_loc
5771
5772 The Location of the `end` keyword.
5773
5774``` ruby
5775 for i in a end
5776 ^^^
5777```
5778*/
5779 pub end_keyword_loc: pm_location_t,
5780}
5781/** ForwardingArgumentsNode
5782
5783 Represents forwarding all arguments to this method to another method.
5784
5785``` ruby
5786 def foo(...)
5787 bar(...)
5788 ^^^
5789 end
5790```
5791
5792 Type: ::PM_FORWARDING_ARGUMENTS_NODE
5793
5794 @extends pm_node_t
5795*/
5796#[repr(C)]
5797#[derive(Debug, Default, Copy, Clone)]
5798pub struct pm_forwarding_arguments_node {
5799 /** The embedded base node.
5800*/
5801 pub base: pm_node_t,
5802}
5803/** ForwardingParameterNode
5804
5805 Represents the use of the forwarding parameter in a method, block, or lambda declaration.
5806
5807``` ruby
5808 def foo(...)
5809 ^^^
5810 end
5811```
5812
5813 Type: ::PM_FORWARDING_PARAMETER_NODE
5814
5815 @extends pm_node_t
5816*/
5817#[repr(C)]
5818#[derive(Debug, Default, Copy, Clone)]
5819pub struct pm_forwarding_parameter_node {
5820 /** The embedded base node.
5821*/
5822 pub base: pm_node_t,
5823}
5824/** ForwardingSuperNode
5825
5826 Represents the use of the `super` keyword without parentheses or arguments, but which might have a block.
5827
5828``` ruby
5829 super
5830 ^^^^^
5831```
5832
5833``` ruby
5834 super { 123 }
5835 ^^^^^^^^^^^^^
5836```
5837
5838 If it has any other arguments, it would be a `SuperNode` instead.
5839
5840 Type: ::PM_FORWARDING_SUPER_NODE
5841
5842 @extends pm_node_t
5843*/
5844#[repr(C)]
5845#[derive(Debug, Copy, Clone)]
5846pub struct pm_forwarding_super_node {
5847 /** The embedded base node.
5848*/
5849 pub base: pm_node_t,
5850 /** ForwardingSuperNode#keyword_loc
5851
5852 super
5853 ^^^^^
5854
5855 super { 123 }
5856 ^^^^^
5857*/
5858 pub keyword_loc: pm_location_t,
5859 /** ForwardingSuperNode#block
5860
5861 All other arguments are forwarded as normal, except the original block is replaced with the new block.
5862*/
5863 pub block: *mut pm_block_node,
5864}
5865/** GlobalVariableAndWriteNode
5866
5867 Represents the use of the `&&=` operator for assignment to a global variable.
5868
5869``` ruby
5870 $target &&= value
5871 ^^^^^^^^^^^^^^^^^
5872```
5873
5874 Type: ::PM_GLOBAL_VARIABLE_AND_WRITE_NODE
5875
5876 @extends pm_node_t
5877*/
5878#[repr(C)]
5879#[derive(Debug, Copy, Clone)]
5880pub struct pm_global_variable_and_write_node {
5881 /** The embedded base node.
5882*/
5883 pub base: pm_node_t,
5884 /** GlobalVariableAndWriteNode#name
5885*/
5886 pub name: pm_constant_id_t,
5887 /** GlobalVariableAndWriteNode#name_loc
5888*/
5889 pub name_loc: pm_location_t,
5890 /** GlobalVariableAndWriteNode#operator_loc
5891*/
5892 pub operator_loc: pm_location_t,
5893 /** GlobalVariableAndWriteNode#value
5894*/
5895 pub value: *mut pm_node,
5896}
5897/** GlobalVariableOperatorWriteNode
5898
5899 Represents assigning to a global variable using an operator that isn't `=`.
5900
5901``` ruby
5902 $target += value
5903 ^^^^^^^^^^^^^^^^
5904```
5905
5906 Type: ::PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
5907
5908 @extends pm_node_t
5909*/
5910#[repr(C)]
5911#[derive(Debug, Copy, Clone)]
5912pub struct pm_global_variable_operator_write_node {
5913 /** The embedded base node.
5914*/
5915 pub base: pm_node_t,
5916 /** GlobalVariableOperatorWriteNode#name
5917*/
5918 pub name: pm_constant_id_t,
5919 /** GlobalVariableOperatorWriteNode#name_loc
5920*/
5921 pub name_loc: pm_location_t,
5922 /** GlobalVariableOperatorWriteNode#binary_operator_loc
5923*/
5924 pub binary_operator_loc: pm_location_t,
5925 /** GlobalVariableOperatorWriteNode#value
5926*/
5927 pub value: *mut pm_node,
5928 /** GlobalVariableOperatorWriteNode#binary_operator
5929*/
5930 pub binary_operator: pm_constant_id_t,
5931}
5932/** GlobalVariableOrWriteNode
5933
5934 Represents the use of the `||=` operator for assignment to a global variable.
5935
5936``` ruby
5937 $target ||= value
5938 ^^^^^^^^^^^^^^^^^
5939```
5940
5941 Type: ::PM_GLOBAL_VARIABLE_OR_WRITE_NODE
5942
5943 @extends pm_node_t
5944*/
5945#[repr(C)]
5946#[derive(Debug, Copy, Clone)]
5947pub struct pm_global_variable_or_write_node {
5948 /** The embedded base node.
5949*/
5950 pub base: pm_node_t,
5951 /** GlobalVariableOrWriteNode#name
5952*/
5953 pub name: pm_constant_id_t,
5954 /** GlobalVariableOrWriteNode#name_loc
5955*/
5956 pub name_loc: pm_location_t,
5957 /** GlobalVariableOrWriteNode#operator_loc
5958*/
5959 pub operator_loc: pm_location_t,
5960 /** GlobalVariableOrWriteNode#value
5961*/
5962 pub value: *mut pm_node,
5963}
5964/** GlobalVariableReadNode
5965
5966 Represents referencing a global variable.
5967
5968``` ruby
5969 $foo
5970 ^^^^
5971```
5972
5973 Type: ::PM_GLOBAL_VARIABLE_READ_NODE
5974
5975 @extends pm_node_t
5976*/
5977#[repr(C)]
5978#[derive(Debug, Default, Copy, Clone)]
5979pub struct pm_global_variable_read_node {
5980 /** The embedded base node.
5981*/
5982 pub base: pm_node_t,
5983 /** GlobalVariableReadNode#name
5984
5985 The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol.
5986
5987``` ruby
5988 $foo # name `:$foo`
5989```
5990
5991``` ruby
5992 $_Test # name `:$_Test`
5993```
5994*/
5995 pub name: pm_constant_id_t,
5996}
5997/** GlobalVariableTargetNode
5998
5999 Represents writing to a global variable in a context that doesn't have an explicit value.
6000
6001``` ruby
6002 $foo, $bar = baz
6003 ^^^^ ^^^^
6004```
6005
6006 Type: ::PM_GLOBAL_VARIABLE_TARGET_NODE
6007
6008 @extends pm_node_t
6009*/
6010#[repr(C)]
6011#[derive(Debug, Default, Copy, Clone)]
6012pub struct pm_global_variable_target_node {
6013 /** The embedded base node.
6014*/
6015 pub base: pm_node_t,
6016 /** GlobalVariableTargetNode#name
6017*/
6018 pub name: pm_constant_id_t,
6019}
6020/** GlobalVariableWriteNode
6021
6022 Represents writing to a global variable.
6023
6024``` ruby
6025 $foo = 1
6026 ^^^^^^^^
6027```
6028
6029 Type: ::PM_GLOBAL_VARIABLE_WRITE_NODE
6030
6031 @extends pm_node_t
6032*/
6033#[repr(C)]
6034#[derive(Debug, Copy, Clone)]
6035pub struct pm_global_variable_write_node {
6036 /** The embedded base node.
6037*/
6038 pub base: pm_node_t,
6039 /** GlobalVariableWriteNode#name
6040
6041 The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol.
6042
6043``` ruby
6044 $foo = :bar # name `:$foo`
6045```
6046
6047``` ruby
6048 $_Test = 123 # name `:$_Test`
6049```
6050*/
6051 pub name: pm_constant_id_t,
6052 /** GlobalVariableWriteNode#name_loc
6053
6054 The Location of the global variable's name.
6055
6056``` ruby
6057 $foo = :bar
6058 ^^^^
6059```
6060*/
6061 pub name_loc: pm_location_t,
6062 /** GlobalVariableWriteNode#value
6063
6064 The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
6065
6066``` ruby
6067 $foo = :bar
6068 ^^^^
6069```
6070
6071``` ruby
6072 $-xyz = 123
6073 ^^^
6074```
6075*/
6076 pub value: *mut pm_node,
6077 /** GlobalVariableWriteNode#operator_loc
6078
6079 The Location of the `=` operator.
6080
6081``` ruby
6082 $foo = :bar
6083 ^
6084```
6085*/
6086 pub operator_loc: pm_location_t,
6087}
6088/** HashNode
6089
6090 Represents a hash literal.
6091
6092``` ruby
6093 { a => b }
6094 ^^^^^^^^^^
6095```
6096
6097 Type: ::PM_HASH_NODE
6098
6099 @extends pm_node_t
6100*/
6101#[repr(C)]
6102#[derive(Debug, Copy, Clone)]
6103pub struct pm_hash_node {
6104 /** The embedded base node.
6105*/
6106 pub base: pm_node_t,
6107 /** HashNode#opening_loc
6108
6109 The Location of the opening brace.
6110
6111``` ruby
6112 { a => b }
6113 ^
6114```
6115*/
6116 pub opening_loc: pm_location_t,
6117 /** HashNode#elements
6118
6119 The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s.
6120
6121``` ruby
6122 { a: b }
6123 ^^^^
6124```
6125
6126``` ruby
6127 { **foo }
6128 ^^^^^
6129```
6130*/
6131 pub elements: pm_node_list,
6132 /** HashNode#closing_loc
6133
6134 The Location of the closing brace.
6135
6136``` ruby
6137 { a => b }
6138 ^
6139```
6140*/
6141 pub closing_loc: pm_location_t,
6142}
6143/** HashPatternNode
6144
6145 Represents a hash pattern in pattern matching.
6146
6147``` ruby
6148 foo => { a: 1, b: 2 }
6149 ^^^^^^^^^^^^^^
6150```
6151
6152``` ruby
6153 foo => { a: 1, b: 2, **c }
6154 ^^^^^^^^^^^^^^^^^^^
6155```
6156
6157``` ruby
6158 foo => Bar[a: 1, b: 2]
6159 ^^^^^^^^^^^^^^^
6160```
6161
6162``` ruby
6163 foo in { a: 1, b: 2 }
6164 ^^^^^^^^^^^^^^
6165```
6166
6167 Type: ::PM_HASH_PATTERN_NODE
6168
6169 @extends pm_node_t
6170*/
6171#[repr(C)]
6172#[derive(Debug, Copy, Clone)]
6173pub struct pm_hash_pattern_node {
6174 /** The embedded base node.
6175*/
6176 pub base: pm_node_t,
6177 /** HashPatternNode#constant
6178
6179 Represents the optional constant preceding the Hash.
6180
6181``` ruby
6182 foo => Bar[a: 1, b: 2]
6183 ^^^
6184```
6185
6186``` ruby
6187 foo => Bar::Baz[a: 1, b: 2]
6188 ^^^^^^^^
6189```
6190*/
6191 pub constant: *mut pm_node,
6192 /** HashPatternNode#elements
6193
6194 Represents the explicit named hash keys and values.
6195
6196``` ruby
6197 foo => { a: 1, b:, ** }
6198 ^^^^^^^^
6199```
6200*/
6201 pub elements: pm_node_list,
6202 /** HashPatternNode#rest
6203
6204 Represents the rest of the Hash keys and values. This can be named, unnamed, or explicitly forbidden via `**nil`, this last one results in a `NoKeywordsParameterNode`.
6205
6206``` ruby
6207 foo => { a: 1, b:, **c }
6208 ^^^
6209```
6210
6211``` ruby
6212 foo => { a: 1, b:, ** }
6213 ^^
6214```
6215
6216``` ruby
6217 foo => { a: 1, b:, **nil }
6218 ^^^^^
6219```
6220*/
6221 pub rest: *mut pm_node,
6222 /** HashPatternNode#opening_loc
6223
6224 The Location of the opening brace.
6225
6226``` ruby
6227 foo => { a: 1 }
6228 ^
6229```
6230
6231``` ruby
6232 foo => Bar[a: 1]
6233 ^
6234```
6235*/
6236 pub opening_loc: pm_location_t,
6237 /** HashPatternNode#closing_loc
6238
6239 The Location of the closing brace.
6240
6241``` ruby
6242 foo => { a: 1 }
6243 ^
6244```
6245
6246``` ruby
6247 foo => Bar[a: 1]
6248 ^
6249```
6250*/
6251 pub closing_loc: pm_location_t,
6252}
6253/** IfNode
6254
6255 Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression.
6256
6257``` ruby
6258 bar if foo
6259 ^^^^^^^^^^
6260```
6261
6262``` ruby
6263 if foo then bar end
6264 ^^^^^^^^^^^^^^^^^^^
6265```
6266
6267``` ruby
6268 foo ? bar : baz
6269 ^^^^^^^^^^^^^^^
6270```
6271
6272 Type: ::PM_IF_NODE
6273
6274 @extends pm_node_t
6275*/
6276#[repr(C)]
6277#[derive(Debug, Copy, Clone)]
6278pub struct pm_if_node {
6279 /** The embedded base node.
6280*/
6281 pub base: pm_node_t,
6282 /** IfNode#if_keyword_loc
6283
6284 The Location of the `if` keyword if present.
6285
6286``` ruby
6287 bar if foo
6288 ^^
6289```
6290
6291 The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression.
6292*/
6293 pub if_keyword_loc: pm_location_t,
6294 /** IfNode#predicate
6295
6296 The node for the condition the `IfNode` is testing.
6297
6298``` ruby
6299 if foo
6300 ^^^
6301 bar
6302 end
6303```
6304
6305``` ruby
6306 bar if foo
6307 ^^^
6308```
6309
6310``` ruby
6311 foo ? bar : baz
6312 ^^^
6313```
6314*/
6315 pub predicate: *mut pm_node,
6316 /** IfNode#then_keyword_loc
6317
6318 The Location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise.
6319
6320``` ruby
6321 if foo then bar end
6322 ^^^^
6323```
6324
6325``` ruby
6326 a ? b : c
6327 ^
6328```
6329*/
6330 pub then_keyword_loc: pm_location_t,
6331 /** IfNode#statements
6332
6333 Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided.
6334
6335``` ruby
6336 if foo
6337 bar
6338 ^^^
6339 baz
6340 ^^^
6341 end
6342```
6343*/
6344 pub statements: *mut pm_statements_node,
6345 /** IfNode#subsequent
6346
6347 Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement.
6348
6349``` ruby
6350 if foo
6351 bar
6352 elsif baz
6353 ^^^^^^^^^
6354 qux
6355 ^^^
6356 end
6357 ^^^
6358```
6359
6360``` ruby
6361 if foo then bar else baz end
6362 ^^^^^^^^^^^^
6363```
6364*/
6365 pub subsequent: *mut pm_node,
6366 /** IfNode#end_keyword_loc
6367
6368 The Location of the `end` keyword if present, `nil` otherwise.
6369
6370``` ruby
6371 if foo
6372 bar
6373 end
6374 ^^^
6375```
6376*/
6377 pub end_keyword_loc: pm_location_t,
6378}
6379/** ImaginaryNode
6380
6381 Represents an imaginary number literal.
6382
6383``` ruby
6384 1.0i
6385 ^^^^
6386```
6387
6388 Type: ::PM_IMAGINARY_NODE
6389
6390 @extends pm_node_t
6391*/
6392#[repr(C)]
6393#[derive(Debug, Copy, Clone)]
6394pub struct pm_imaginary_node {
6395 /** The embedded base node.
6396*/
6397 pub base: pm_node_t,
6398 /** ImaginaryNode#numeric
6399*/
6400 pub numeric: *mut pm_node,
6401}
6402/** ImplicitNode
6403
6404 Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
6405
6406``` ruby
6407 { foo: }
6408 ^^^^
6409```
6410
6411``` ruby
6412 { Foo: }
6413 ^^^^
6414```
6415
6416``` ruby
6417 foo in { bar: }
6418 ^^^^
6419```
6420
6421 Type: ::PM_IMPLICIT_NODE
6422
6423 @extends pm_node_t
6424*/
6425#[repr(C)]
6426#[derive(Debug, Copy, Clone)]
6427pub struct pm_implicit_node {
6428 /** The embedded base node.
6429*/
6430 pub base: pm_node_t,
6431 /** ImplicitNode#value
6432*/
6433 pub value: *mut pm_node,
6434}
6435/** ImplicitRestNode
6436
6437 Represents using a trailing comma to indicate an implicit rest parameter.
6438
6439``` ruby
6440 foo { |bar,| }
6441 ^
6442```
6443
6444``` ruby
6445 foo in [bar,]
6446 ^
6447```
6448
6449``` ruby
6450 for foo, in bar do end
6451 ^
6452```
6453
6454``` ruby
6455 foo, = bar
6456 ^
6457```
6458
6459 Type: ::PM_IMPLICIT_REST_NODE
6460
6461 @extends pm_node_t
6462*/
6463#[repr(C)]
6464#[derive(Debug, Default, Copy, Clone)]
6465pub struct pm_implicit_rest_node {
6466 /** The embedded base node.
6467*/
6468 pub base: pm_node_t,
6469}
6470/** InNode
6471
6472 Represents the use of the `in` keyword in a case statement.
6473
6474``` ruby
6475 case a; in b then c end
6476 ^^^^^^^^^^^
6477```
6478
6479 Type: ::PM_IN_NODE
6480
6481 @extends pm_node_t
6482*/
6483#[repr(C)]
6484#[derive(Debug, Copy, Clone)]
6485pub struct pm_in_node {
6486 /** The embedded base node.
6487*/
6488 pub base: pm_node_t,
6489 /** InNode#pattern
6490*/
6491 pub pattern: *mut pm_node,
6492 /** InNode#statements
6493*/
6494 pub statements: *mut pm_statements_node,
6495 /** InNode#in_keyword_loc
6496*/
6497 pub in_keyword_loc: pm_location_t,
6498 /** InNode#then_keyword_loc
6499*/
6500 pub then_keyword_loc: pm_location_t,
6501}
6502/** IndexAndWriteNode
6503
6504 Represents the use of the `&&=` operator on a call to the `[]` method.
6505
6506``` ruby
6507 foo.bar[baz] &&= value
6508 ^^^^^^^^^^^^^^^^^^^^^^
6509```
6510
6511 Type: ::PM_INDEX_AND_WRITE_NODE
6512
6513 Flags (#pm_call_node_flags):
6514 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
6515 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
6516 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
6517 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
6518
6519 @extends pm_node_t
6520*/
6521#[repr(C)]
6522#[derive(Debug, Copy, Clone)]
6523pub struct pm_index_and_write_node {
6524 /** The embedded base node.
6525*/
6526 pub base: pm_node_t,
6527 /** IndexAndWriteNode#receiver
6528*/
6529 pub receiver: *mut pm_node,
6530 /** IndexAndWriteNode#call_operator_loc
6531*/
6532 pub call_operator_loc: pm_location_t,
6533 /** IndexAndWriteNode#opening_loc
6534*/
6535 pub opening_loc: pm_location_t,
6536 /** IndexAndWriteNode#arguments
6537*/
6538 pub arguments: *mut pm_arguments_node,
6539 /** IndexAndWriteNode#closing_loc
6540*/
6541 pub closing_loc: pm_location_t,
6542 /** IndexAndWriteNode#block
6543*/
6544 pub block: *mut pm_block_argument_node,
6545 /** IndexAndWriteNode#operator_loc
6546*/
6547 pub operator_loc: pm_location_t,
6548 /** IndexAndWriteNode#value
6549*/
6550 pub value: *mut pm_node,
6551}
6552/** IndexOperatorWriteNode
6553
6554 Represents the use of an assignment operator on a call to `[]`.
6555
6556``` ruby
6557 foo.bar[baz] += value
6558 ^^^^^^^^^^^^^^^^^^^^^
6559```
6560
6561 Type: ::PM_INDEX_OPERATOR_WRITE_NODE
6562
6563 Flags (#pm_call_node_flags):
6564 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
6565 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
6566 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
6567 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
6568
6569 @extends pm_node_t
6570*/
6571#[repr(C)]
6572#[derive(Debug, Copy, Clone)]
6573pub struct pm_index_operator_write_node {
6574 /** The embedded base node.
6575*/
6576 pub base: pm_node_t,
6577 /** IndexOperatorWriteNode#receiver
6578*/
6579 pub receiver: *mut pm_node,
6580 /** IndexOperatorWriteNode#call_operator_loc
6581*/
6582 pub call_operator_loc: pm_location_t,
6583 /** IndexOperatorWriteNode#opening_loc
6584*/
6585 pub opening_loc: pm_location_t,
6586 /** IndexOperatorWriteNode#arguments
6587*/
6588 pub arguments: *mut pm_arguments_node,
6589 /** IndexOperatorWriteNode#closing_loc
6590*/
6591 pub closing_loc: pm_location_t,
6592 /** IndexOperatorWriteNode#block
6593*/
6594 pub block: *mut pm_block_argument_node,
6595 /** IndexOperatorWriteNode#binary_operator
6596*/
6597 pub binary_operator: pm_constant_id_t,
6598 /** IndexOperatorWriteNode#binary_operator_loc
6599*/
6600 pub binary_operator_loc: pm_location_t,
6601 /** IndexOperatorWriteNode#value
6602*/
6603 pub value: *mut pm_node,
6604}
6605/** IndexOrWriteNode
6606
6607 Represents the use of the `||=` operator on a call to `[]`.
6608
6609``` ruby
6610 foo.bar[baz] ||= value
6611 ^^^^^^^^^^^^^^^^^^^^^^
6612```
6613
6614 Type: ::PM_INDEX_OR_WRITE_NODE
6615
6616 Flags (#pm_call_node_flags):
6617 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
6618 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
6619 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
6620 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
6621
6622 @extends pm_node_t
6623*/
6624#[repr(C)]
6625#[derive(Debug, Copy, Clone)]
6626pub struct pm_index_or_write_node {
6627 /** The embedded base node.
6628*/
6629 pub base: pm_node_t,
6630 /** IndexOrWriteNode#receiver
6631*/
6632 pub receiver: *mut pm_node,
6633 /** IndexOrWriteNode#call_operator_loc
6634*/
6635 pub call_operator_loc: pm_location_t,
6636 /** IndexOrWriteNode#opening_loc
6637*/
6638 pub opening_loc: pm_location_t,
6639 /** IndexOrWriteNode#arguments
6640*/
6641 pub arguments: *mut pm_arguments_node,
6642 /** IndexOrWriteNode#closing_loc
6643*/
6644 pub closing_loc: pm_location_t,
6645 /** IndexOrWriteNode#block
6646*/
6647 pub block: *mut pm_block_argument_node,
6648 /** IndexOrWriteNode#operator_loc
6649*/
6650 pub operator_loc: pm_location_t,
6651 /** IndexOrWriteNode#value
6652*/
6653 pub value: *mut pm_node,
6654}
6655/** IndexTargetNode
6656
6657 Represents assigning to an index.
6658
6659``` ruby
6660 foo[bar], = 1
6661 ^^^^^^^^
6662```
6663
6664``` ruby
6665 begin
6666 rescue => foo[bar]
6667 ^^^^^^^^
6668 end
6669```
6670
6671``` ruby
6672 for foo[bar] in baz do end
6673 ^^^^^^^^
6674```
6675
6676 Type: ::PM_INDEX_TARGET_NODE
6677
6678 Flags (#pm_call_node_flags):
6679 * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION
6680 * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL
6681 * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE
6682 * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY
6683
6684 @extends pm_node_t
6685*/
6686#[repr(C)]
6687#[derive(Debug, Copy, Clone)]
6688pub struct pm_index_target_node {
6689 /** The embedded base node.
6690*/
6691 pub base: pm_node_t,
6692 /** IndexTargetNode#receiver
6693*/
6694 pub receiver: *mut pm_node,
6695 /** IndexTargetNode#opening_loc
6696*/
6697 pub opening_loc: pm_location_t,
6698 /** IndexTargetNode#arguments
6699*/
6700 pub arguments: *mut pm_arguments_node,
6701 /** IndexTargetNode#closing_loc
6702*/
6703 pub closing_loc: pm_location_t,
6704 /** IndexTargetNode#block
6705*/
6706 pub block: *mut pm_block_argument_node,
6707}
6708/** InstanceVariableAndWriteNode
6709
6710 Represents the use of the `&&=` operator for assignment to an instance variable.
6711
6712``` ruby
6713 @target &&= value
6714 ^^^^^^^^^^^^^^^^^
6715```
6716
6717 Type: ::PM_INSTANCE_VARIABLE_AND_WRITE_NODE
6718
6719 @extends pm_node_t
6720*/
6721#[repr(C)]
6722#[derive(Debug, Copy, Clone)]
6723pub struct pm_instance_variable_and_write_node {
6724 /** The embedded base node.
6725*/
6726 pub base: pm_node_t,
6727 /** InstanceVariableAndWriteNode#name
6728*/
6729 pub name: pm_constant_id_t,
6730 /** InstanceVariableAndWriteNode#name_loc
6731*/
6732 pub name_loc: pm_location_t,
6733 /** InstanceVariableAndWriteNode#operator_loc
6734*/
6735 pub operator_loc: pm_location_t,
6736 /** InstanceVariableAndWriteNode#value
6737*/
6738 pub value: *mut pm_node,
6739}
6740/** InstanceVariableOperatorWriteNode
6741
6742 Represents assigning to an instance variable using an operator that isn't `=`.
6743
6744``` ruby
6745 @target += value
6746 ^^^^^^^^^^^^^^^^
6747```
6748
6749 Type: ::PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
6750
6751 @extends pm_node_t
6752*/
6753#[repr(C)]
6754#[derive(Debug, Copy, Clone)]
6755pub struct pm_instance_variable_operator_write_node {
6756 /** The embedded base node.
6757*/
6758 pub base: pm_node_t,
6759 /** InstanceVariableOperatorWriteNode#name
6760*/
6761 pub name: pm_constant_id_t,
6762 /** InstanceVariableOperatorWriteNode#name_loc
6763*/
6764 pub name_loc: pm_location_t,
6765 /** InstanceVariableOperatorWriteNode#binary_operator_loc
6766*/
6767 pub binary_operator_loc: pm_location_t,
6768 /** InstanceVariableOperatorWriteNode#value
6769*/
6770 pub value: *mut pm_node,
6771 /** InstanceVariableOperatorWriteNode#binary_operator
6772*/
6773 pub binary_operator: pm_constant_id_t,
6774}
6775/** InstanceVariableOrWriteNode
6776
6777 Represents the use of the `||=` operator for assignment to an instance variable.
6778
6779``` ruby
6780 @target ||= value
6781 ^^^^^^^^^^^^^^^^^
6782```
6783
6784 Type: ::PM_INSTANCE_VARIABLE_OR_WRITE_NODE
6785
6786 @extends pm_node_t
6787*/
6788#[repr(C)]
6789#[derive(Debug, Copy, Clone)]
6790pub struct pm_instance_variable_or_write_node {
6791 /** The embedded base node.
6792*/
6793 pub base: pm_node_t,
6794 /** InstanceVariableOrWriteNode#name
6795*/
6796 pub name: pm_constant_id_t,
6797 /** InstanceVariableOrWriteNode#name_loc
6798*/
6799 pub name_loc: pm_location_t,
6800 /** InstanceVariableOrWriteNode#operator_loc
6801*/
6802 pub operator_loc: pm_location_t,
6803 /** InstanceVariableOrWriteNode#value
6804*/
6805 pub value: *mut pm_node,
6806}
6807/** InstanceVariableReadNode
6808
6809 Represents referencing an instance variable.
6810
6811``` ruby
6812 @foo
6813 ^^^^
6814```
6815
6816 Type: ::PM_INSTANCE_VARIABLE_READ_NODE
6817
6818 @extends pm_node_t
6819*/
6820#[repr(C)]
6821#[derive(Debug, Default, Copy, Clone)]
6822pub struct pm_instance_variable_read_node {
6823 /** The embedded base node.
6824*/
6825 pub base: pm_node_t,
6826 /** InstanceVariableReadNode#name
6827
6828 The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
6829
6830``` ruby
6831 @x # name `:@x`
6832```
6833
6834``` ruby
6835 @_test # name `:@_test`
6836```
6837*/
6838 pub name: pm_constant_id_t,
6839}
6840/** InstanceVariableTargetNode
6841
6842 Represents writing to an instance variable in a context that doesn't have an explicit value.
6843
6844``` ruby
6845 @foo, @bar = baz
6846 ^^^^ ^^^^
6847```
6848
6849 Type: ::PM_INSTANCE_VARIABLE_TARGET_NODE
6850
6851 @extends pm_node_t
6852*/
6853#[repr(C)]
6854#[derive(Debug, Default, Copy, Clone)]
6855pub struct pm_instance_variable_target_node {
6856 /** The embedded base node.
6857*/
6858 pub base: pm_node_t,
6859 /** InstanceVariableTargetNode#name
6860*/
6861 pub name: pm_constant_id_t,
6862}
6863/** InstanceVariableWriteNode
6864
6865 Represents writing to an instance variable.
6866
6867``` ruby
6868 @foo = 1
6869 ^^^^^^^^
6870```
6871
6872 Type: ::PM_INSTANCE_VARIABLE_WRITE_NODE
6873
6874 @extends pm_node_t
6875*/
6876#[repr(C)]
6877#[derive(Debug, Copy, Clone)]
6878pub struct pm_instance_variable_write_node {
6879 /** The embedded base node.
6880*/
6881 pub base: pm_node_t,
6882 /** InstanceVariableWriteNode#name
6883
6884 The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
6885
6886``` ruby
6887 @x = :y # name `:@x`
6888```
6889
6890``` ruby
6891 @_foo = "bar" # name `@_foo`
6892```
6893*/
6894 pub name: pm_constant_id_t,
6895 /** InstanceVariableWriteNode#name_loc
6896
6897 The Location of the variable name.
6898
6899``` ruby
6900 @_x = 1
6901 ^^^
6902```
6903*/
6904 pub name_loc: pm_location_t,
6905 /** InstanceVariableWriteNode#value
6906
6907 The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
6908
6909``` ruby
6910 @foo = :bar
6911 ^^^^
6912```
6913
6914``` ruby
6915 @_x = 1234
6916 ^^^^
6917```
6918*/
6919 pub value: *mut pm_node,
6920 /** InstanceVariableWriteNode#operator_loc
6921
6922 The Location of the `=` operator.
6923
6924``` ruby
6925 @x = y
6926 ^
6927```
6928*/
6929 pub operator_loc: pm_location_t,
6930}
6931/** IntegerNode
6932
6933 Represents an integer number literal.
6934
6935``` ruby
6936 1
6937 ^
6938```
6939
6940 Type: ::PM_INTEGER_NODE
6941
6942 Flags (#pm_integer_base_flags):
6943 * ::PM_INTEGER_BASE_FLAGS_BINARY
6944 * ::PM_INTEGER_BASE_FLAGS_DECIMAL
6945 * ::PM_INTEGER_BASE_FLAGS_OCTAL
6946 * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
6947
6948 @extends pm_node_t
6949*/
6950#[repr(C)]
6951#[derive(Debug, Copy, Clone)]
6952pub struct pm_integer_node {
6953 /** The embedded base node.
6954*/
6955 pub base: pm_node_t,
6956 /** IntegerNode#value
6957
6958 The value of the integer literal as a number.
6959*/
6960 pub value: pm_integer_t,
6961}
6962/** InterpolatedMatchLastLineNode
6963
6964 Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object.
6965
6966``` ruby
6967 if /foo #{bar} baz/ then end
6968 ^^^^^^^^^^^^^^^^
6969```
6970
6971 Type: ::PM_INTERPOLATED_MATCH_LAST_LINE_NODE
6972
6973 Flags (#pm_regular_expression_flags):
6974 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
6975 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
6976 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
6977 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
6978 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
6979 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
6980 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
6981 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
6982 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
6983 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
6984 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
6985
6986 @extends pm_node_t
6987*/
6988#[repr(C)]
6989#[derive(Debug, Copy, Clone)]
6990pub struct pm_interpolated_match_last_line_node {
6991 /** The embedded base node.
6992*/
6993 pub base: pm_node_t,
6994 /** InterpolatedMatchLastLineNode#opening_loc
6995*/
6996 pub opening_loc: pm_location_t,
6997 /** InterpolatedMatchLastLineNode#parts
6998*/
6999 pub parts: pm_node_list,
7000 /** InterpolatedMatchLastLineNode#closing_loc
7001*/
7002 pub closing_loc: pm_location_t,
7003}
7004/** InterpolatedRegularExpressionNode
7005
7006 Represents a regular expression literal that contains interpolation.
7007
7008``` ruby
7009 /foo #{bar} baz/
7010 ^^^^^^^^^^^^^^^^
7011```
7012
7013 Type: ::PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
7014
7015 Flags (#pm_regular_expression_flags):
7016 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
7017 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
7018 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
7019 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
7020 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
7021 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
7022 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
7023 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
7024 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
7025 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
7026 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
7027
7028 @extends pm_node_t
7029*/
7030#[repr(C)]
7031#[derive(Debug, Copy, Clone)]
7032pub struct pm_interpolated_regular_expression_node {
7033 /** The embedded base node.
7034*/
7035 pub base: pm_node_t,
7036 /** InterpolatedRegularExpressionNode#opening_loc
7037*/
7038 pub opening_loc: pm_location_t,
7039 /** InterpolatedRegularExpressionNode#parts
7040*/
7041 pub parts: pm_node_list,
7042 /** InterpolatedRegularExpressionNode#closing_loc
7043*/
7044 pub closing_loc: pm_location_t,
7045}
7046/** InterpolatedStringNode
7047
7048 Represents a string literal that contains interpolation.
7049
7050``` ruby
7051 "foo #{bar} baz"
7052 ^^^^^^^^^^^^^^^^
7053```
7054
7055 Type: ::PM_INTERPOLATED_STRING_NODE
7056
7057 Flags (#pm_interpolated_string_node_flags):
7058 * ::PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN
7059 * ::PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE
7060
7061 @extends pm_node_t
7062*/
7063#[repr(C)]
7064#[derive(Debug, Copy, Clone)]
7065pub struct pm_interpolated_string_node {
7066 /** The embedded base node.
7067*/
7068 pub base: pm_node_t,
7069 /** InterpolatedStringNode#opening_loc
7070*/
7071 pub opening_loc: pm_location_t,
7072 /** InterpolatedStringNode#parts
7073*/
7074 pub parts: pm_node_list,
7075 /** InterpolatedStringNode#closing_loc
7076*/
7077 pub closing_loc: pm_location_t,
7078}
7079/** InterpolatedSymbolNode
7080
7081 Represents a symbol literal that contains interpolation.
7082
7083``` ruby
7084 :"foo #{bar} baz"
7085 ^^^^^^^^^^^^^^^^^
7086```
7087
7088 Type: ::PM_INTERPOLATED_SYMBOL_NODE
7089
7090 @extends pm_node_t
7091*/
7092#[repr(C)]
7093#[derive(Debug, Copy, Clone)]
7094pub struct pm_interpolated_symbol_node {
7095 /** The embedded base node.
7096*/
7097 pub base: pm_node_t,
7098 /** InterpolatedSymbolNode#opening_loc
7099*/
7100 pub opening_loc: pm_location_t,
7101 /** InterpolatedSymbolNode#parts
7102*/
7103 pub parts: pm_node_list,
7104 /** InterpolatedSymbolNode#closing_loc
7105*/
7106 pub closing_loc: pm_location_t,
7107}
7108/** InterpolatedXStringNode
7109
7110 Represents an xstring literal that contains interpolation.
7111
7112``` ruby
7113 `foo #{bar} baz`
7114 ^^^^^^^^^^^^^^^^
7115```
7116
7117 Type: ::PM_INTERPOLATED_X_STRING_NODE
7118
7119 @extends pm_node_t
7120*/
7121#[repr(C)]
7122#[derive(Debug, Copy, Clone)]
7123pub struct pm_interpolated_x_string_node {
7124 /** The embedded base node.
7125*/
7126 pub base: pm_node_t,
7127 /** InterpolatedXStringNode#opening_loc
7128*/
7129 pub opening_loc: pm_location_t,
7130 /** InterpolatedXStringNode#parts
7131*/
7132 pub parts: pm_node_list,
7133 /** InterpolatedXStringNode#closing_loc
7134*/
7135 pub closing_loc: pm_location_t,
7136}
7137/** ItLocalVariableReadNode
7138
7139 Represents reading from the implicit `it` local variable.
7140
7141``` ruby
7142 -> { it }
7143 ^^
7144```
7145
7146 Type: ::PM_IT_LOCAL_VARIABLE_READ_NODE
7147
7148 @extends pm_node_t
7149*/
7150#[repr(C)]
7151#[derive(Debug, Default, Copy, Clone)]
7152pub struct pm_it_local_variable_read_node {
7153 /** The embedded base node.
7154*/
7155 pub base: pm_node_t,
7156}
7157/** ItParametersNode
7158
7159 Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda.
7160
7161``` ruby
7162 -> { it + it }
7163 ^^^^^^^^^^^^^^
7164```
7165
7166 Type: ::PM_IT_PARAMETERS_NODE
7167
7168 @extends pm_node_t
7169*/
7170#[repr(C)]
7171#[derive(Debug, Default, Copy, Clone)]
7172pub struct pm_it_parameters_node {
7173 /** The embedded base node.
7174*/
7175 pub base: pm_node_t,
7176}
7177/** KeywordHashNode
7178
7179 Represents a hash literal without opening and closing braces.
7180
7181``` ruby
7182 foo(a: b)
7183 ^^^^
7184```
7185
7186 Type: ::PM_KEYWORD_HASH_NODE
7187
7188 Flags (#pm_keyword_hash_node_flags):
7189 * ::PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS
7190
7191 @extends pm_node_t
7192*/
7193#[repr(C)]
7194#[derive(Debug, Copy, Clone)]
7195pub struct pm_keyword_hash_node {
7196 /** The embedded base node.
7197*/
7198 pub base: pm_node_t,
7199 /** KeywordHashNode#elements
7200*/
7201 pub elements: pm_node_list,
7202}
7203/** KeywordRestParameterNode
7204
7205 Represents a keyword rest parameter to a method, block, or lambda definition.
7206
7207``` ruby
7208 def a(**b)
7209 ^^^
7210 end
7211```
7212
7213 Type: ::PM_KEYWORD_REST_PARAMETER_NODE
7214
7215 Flags (#pm_parameter_flags):
7216 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
7217
7218 @extends pm_node_t
7219*/
7220#[repr(C)]
7221#[derive(Debug, Default, Copy, Clone)]
7222pub struct pm_keyword_rest_parameter_node {
7223 /** The embedded base node.
7224*/
7225 pub base: pm_node_t,
7226 /** KeywordRestParameterNode#name
7227*/
7228 pub name: pm_constant_id_t,
7229 /** KeywordRestParameterNode#name_loc
7230*/
7231 pub name_loc: pm_location_t,
7232 /** KeywordRestParameterNode#operator_loc
7233*/
7234 pub operator_loc: pm_location_t,
7235}
7236/** LambdaNode
7237
7238 Represents using a lambda literal (not the lambda method call).
7239
7240``` ruby
7241 ->(value) { value * 2 }
7242 ^^^^^^^^^^^^^^^^^^^^^^^
7243```
7244
7245 Type: ::PM_LAMBDA_NODE
7246
7247 @extends pm_node_t
7248*/
7249#[repr(C)]
7250#[derive(Debug, Copy, Clone)]
7251pub struct pm_lambda_node {
7252 /** The embedded base node.
7253*/
7254 pub base: pm_node_t,
7255 /** LambdaNode#locals
7256*/
7257 pub locals: pm_constant_id_list_t,
7258 /** LambdaNode#operator_loc
7259*/
7260 pub operator_loc: pm_location_t,
7261 /** LambdaNode#opening_loc
7262*/
7263 pub opening_loc: pm_location_t,
7264 /** LambdaNode#closing_loc
7265*/
7266 pub closing_loc: pm_location_t,
7267 /** LambdaNode#parameters
7268*/
7269 pub parameters: *mut pm_node,
7270 /** LambdaNode#body
7271*/
7272 pub body: *mut pm_node,
7273}
7274/** LocalVariableAndWriteNode
7275
7276 Represents the use of the `&&=` operator for assignment to a local variable.
7277
7278``` ruby
7279 target &&= value
7280 ^^^^^^^^^^^^^^^^
7281```
7282
7283 Type: ::PM_LOCAL_VARIABLE_AND_WRITE_NODE
7284
7285 @extends pm_node_t
7286*/
7287#[repr(C)]
7288#[derive(Debug, Copy, Clone)]
7289pub struct pm_local_variable_and_write_node {
7290 /** The embedded base node.
7291*/
7292 pub base: pm_node_t,
7293 /** LocalVariableAndWriteNode#name_loc
7294*/
7295 pub name_loc: pm_location_t,
7296 /** LocalVariableAndWriteNode#operator_loc
7297*/
7298 pub operator_loc: pm_location_t,
7299 /** LocalVariableAndWriteNode#value
7300*/
7301 pub value: *mut pm_node,
7302 /** LocalVariableAndWriteNode#name
7303*/
7304 pub name: pm_constant_id_t,
7305 /** LocalVariableAndWriteNode#depth
7306*/
7307 pub depth: u32,
7308}
7309/** LocalVariableOperatorWriteNode
7310
7311 Represents assigning to a local variable using an operator that isn't `=`.
7312
7313``` ruby
7314 target += value
7315 ^^^^^^^^^^^^^^^
7316```
7317
7318 Type: ::PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
7319
7320 @extends pm_node_t
7321*/
7322#[repr(C)]
7323#[derive(Debug, Copy, Clone)]
7324pub struct pm_local_variable_operator_write_node {
7325 /** The embedded base node.
7326*/
7327 pub base: pm_node_t,
7328 /** LocalVariableOperatorWriteNode#name_loc
7329*/
7330 pub name_loc: pm_location_t,
7331 /** LocalVariableOperatorWriteNode#binary_operator_loc
7332*/
7333 pub binary_operator_loc: pm_location_t,
7334 /** LocalVariableOperatorWriteNode#value
7335*/
7336 pub value: *mut pm_node,
7337 /** LocalVariableOperatorWriteNode#name
7338*/
7339 pub name: pm_constant_id_t,
7340 /** LocalVariableOperatorWriteNode#binary_operator
7341*/
7342 pub binary_operator: pm_constant_id_t,
7343 /** LocalVariableOperatorWriteNode#depth
7344*/
7345 pub depth: u32,
7346}
7347/** LocalVariableOrWriteNode
7348
7349 Represents the use of the `||=` operator for assignment to a local variable.
7350
7351``` ruby
7352 target ||= value
7353 ^^^^^^^^^^^^^^^^
7354```
7355
7356 Type: ::PM_LOCAL_VARIABLE_OR_WRITE_NODE
7357
7358 @extends pm_node_t
7359*/
7360#[repr(C)]
7361#[derive(Debug, Copy, Clone)]
7362pub struct pm_local_variable_or_write_node {
7363 /** The embedded base node.
7364*/
7365 pub base: pm_node_t,
7366 /** LocalVariableOrWriteNode#name_loc
7367*/
7368 pub name_loc: pm_location_t,
7369 /** LocalVariableOrWriteNode#operator_loc
7370*/
7371 pub operator_loc: pm_location_t,
7372 /** LocalVariableOrWriteNode#value
7373*/
7374 pub value: *mut pm_node,
7375 /** LocalVariableOrWriteNode#name
7376*/
7377 pub name: pm_constant_id_t,
7378 /** LocalVariableOrWriteNode#depth
7379*/
7380 pub depth: u32,
7381}
7382/** LocalVariableReadNode
7383
7384 Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
7385
7386``` ruby
7387 foo
7388 ^^^
7389```
7390
7391 Type: ::PM_LOCAL_VARIABLE_READ_NODE
7392
7393 @extends pm_node_t
7394*/
7395#[repr(C)]
7396#[derive(Debug, Default, Copy, Clone)]
7397pub struct pm_local_variable_read_node {
7398 /** The embedded base node.
7399*/
7400 pub base: pm_node_t,
7401 /** LocalVariableReadNode#name
7402
7403 The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
7404
7405``` ruby
7406 x # name `:x`
7407```
7408
7409``` ruby
7410 _Test # name `:_Test`
7411```
7412
7413 Note that this can also be an underscore followed by a number for the default block parameters.
7414
7415``` ruby
7416 _1 # name `:_1`
7417```
7418*/
7419 pub name: pm_constant_id_t,
7420 /** LocalVariableReadNode#depth
7421
7422 The number of visible scopes that should be searched to find the origin of this local variable.
7423
7424``` ruby
7425 foo = 1; foo # depth 0
7426```
7427
7428``` ruby
7429 bar = 2; tap { bar } # depth 1
7430```
7431
7432 The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md).
7433*/
7434 pub depth: u32,
7435}
7436/** LocalVariableTargetNode
7437
7438 Represents writing to a local variable in a context that doesn't have an explicit value.
7439
7440``` ruby
7441 foo, bar = baz
7442 ^^^ ^^^
7443```
7444
7445``` ruby
7446 foo => baz
7447 ^^^
7448```
7449
7450 Type: ::PM_LOCAL_VARIABLE_TARGET_NODE
7451
7452 @extends pm_node_t
7453*/
7454#[repr(C)]
7455#[derive(Debug, Default, Copy, Clone)]
7456pub struct pm_local_variable_target_node {
7457 /** The embedded base node.
7458*/
7459 pub base: pm_node_t,
7460 /** LocalVariableTargetNode#name
7461*/
7462 pub name: pm_constant_id_t,
7463 /** LocalVariableTargetNode#depth
7464*/
7465 pub depth: u32,
7466}
7467/** LocalVariableWriteNode
7468
7469 Represents writing to a local variable.
7470
7471``` ruby
7472 foo = 1
7473 ^^^^^^^
7474```
7475
7476 Type: ::PM_LOCAL_VARIABLE_WRITE_NODE
7477
7478 @extends pm_node_t
7479*/
7480#[repr(C)]
7481#[derive(Debug, Copy, Clone)]
7482pub struct pm_local_variable_write_node {
7483 /** The embedded base node.
7484*/
7485 pub base: pm_node_t,
7486 /** LocalVariableWriteNode#name
7487
7488 The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
7489
7490``` ruby
7491 foo = :bar # name `:foo`
7492```
7493
7494``` ruby
7495 abc = 123 # name `:abc`
7496```
7497*/
7498 pub name: pm_constant_id_t,
7499 /** LocalVariableWriteNode#depth
7500
7501 The number of semantic scopes we have to traverse to find the declaration of this variable.
7502
7503``` ruby
7504 foo = 1 # depth 0
7505```
7506
7507``` ruby
7508 tap { foo = 1 } # depth 1
7509```
7510
7511 The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md).
7512*/
7513 pub depth: u32,
7514 /** LocalVariableWriteNode#name_loc
7515
7516 The Location of the variable name.
7517
7518``` ruby
7519 foo = :bar
7520 ^^^
7521```
7522*/
7523 pub name_loc: pm_location_t,
7524 /** LocalVariableWriteNode#value
7525
7526 The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
7527
7528``` ruby
7529 foo = :bar
7530 ^^^^
7531```
7532
7533``` ruby
7534 abc = 1234
7535 ^^^^
7536```
7537
7538 Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write.
7539
7540``` ruby
7541 foo = foo
7542```
7543*/
7544 pub value: *mut pm_node,
7545 /** LocalVariableWriteNode#operator_loc
7546
7547 The Location of the `=` operator.
7548
7549``` ruby
7550 x = :y
7551 ^
7552```
7553*/
7554 pub operator_loc: pm_location_t,
7555}
7556/** MatchLastLineNode
7557
7558 Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.
7559
7560``` ruby
7561 if /foo/i then end
7562 ^^^^^^
7563```
7564
7565 Type: ::PM_MATCH_LAST_LINE_NODE
7566
7567 Flags (#pm_regular_expression_flags):
7568 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
7569 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
7570 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
7571 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
7572 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
7573 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
7574 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
7575 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
7576 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
7577 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
7578 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
7579
7580 @extends pm_node_t
7581*/
7582#[repr(C)]
7583#[derive(Debug, Copy, Clone)]
7584pub struct pm_match_last_line_node {
7585 /** The embedded base node.
7586*/
7587 pub base: pm_node_t,
7588 /** MatchLastLineNode#opening_loc
7589*/
7590 pub opening_loc: pm_location_t,
7591 /** MatchLastLineNode#content_loc
7592*/
7593 pub content_loc: pm_location_t,
7594 /** MatchLastLineNode#closing_loc
7595*/
7596 pub closing_loc: pm_location_t,
7597 /** MatchLastLineNode#unescaped
7598*/
7599 pub unescaped: pm_string_t,
7600}
7601/** MatchPredicateNode
7602
7603 Represents the use of the modifier `in` operator.
7604
7605``` ruby
7606 foo in bar
7607 ^^^^^^^^^^
7608```
7609
7610 Type: ::PM_MATCH_PREDICATE_NODE
7611
7612 @extends pm_node_t
7613*/
7614#[repr(C)]
7615#[derive(Debug, Copy, Clone)]
7616pub struct pm_match_predicate_node {
7617 /** The embedded base node.
7618*/
7619 pub base: pm_node_t,
7620 /** MatchPredicateNode#value
7621*/
7622 pub value: *mut pm_node,
7623 /** MatchPredicateNode#pattern
7624*/
7625 pub pattern: *mut pm_node,
7626 /** MatchPredicateNode#keyword_loc
7627*/
7628 pub keyword_loc: pm_location_t,
7629}
7630/** MatchRequiredNode
7631
7632 Represents the use of the `=>` operator.
7633
7634``` ruby
7635 foo => bar
7636 ^^^^^^^^^^
7637```
7638
7639 Type: ::PM_MATCH_REQUIRED_NODE
7640
7641 @extends pm_node_t
7642*/
7643#[repr(C)]
7644#[derive(Debug, Copy, Clone)]
7645pub struct pm_match_required_node {
7646 /** The embedded base node.
7647*/
7648 pub base: pm_node_t,
7649 /** MatchRequiredNode#value
7650
7651 Represents the left-hand side of the operator.
7652
7653``` ruby
7654 foo => bar
7655 ^^^
7656```
7657*/
7658 pub value: *mut pm_node,
7659 /** MatchRequiredNode#pattern
7660
7661 Represents the right-hand side of the operator. The type of the node depends on the expression.
7662
7663 Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`.
7664
7665``` ruby
7666 foo => a # This is equivalent to writing `a = foo`
7667 ^
7668```
7669
7670 Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant.
7671
7672``` ruby
7673 foo => [a]
7674 ^^^
7675```
7676
7677``` ruby
7678 foo => a, b
7679 ^^^^
7680```
7681
7682``` ruby
7683 foo => Bar[a, b]
7684 ^^^^^^^^^
7685```
7686
7687 If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead.
7688
7689``` ruby
7690 foo => *, 1, *a
7691 ^^^^^
7692```
7693
7694 Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`.
7695
7696``` ruby
7697 foo => { a: 1, b: }
7698```
7699
7700``` ruby
7701 foo => Bar[a: 1, b:]
7702```
7703
7704``` ruby
7705 foo => Bar[**]
7706```
7707
7708 To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode`
7709
7710``` ruby
7711 foo => ^a
7712 ^^
7713```
7714
7715 Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`.
7716
7717``` ruby
7718 foo => ^(a + 1)
7719```
7720
7721 Anything else will result in the regular node for that expression, for example a `ConstantReadNode`.
7722
7723``` ruby
7724 foo => CONST
7725```
7726*/
7727 pub pattern: *mut pm_node,
7728 /** MatchRequiredNode#operator_loc
7729
7730 The Location of the operator.
7731
7732``` ruby
7733 foo => bar
7734 ^^
7735```
7736*/
7737 pub operator_loc: pm_location_t,
7738}
7739/** MatchWriteNode
7740
7741 Represents writing local variables using a regular expression match with named capture groups.
7742
7743``` ruby
7744 /(?<foo>bar)/ =~ baz
7745 ^^^^^^^^^^^^^^^^^^^^
7746```
7747
7748 Type: ::PM_MATCH_WRITE_NODE
7749
7750 @extends pm_node_t
7751*/
7752#[repr(C)]
7753#[derive(Debug, Copy, Clone)]
7754pub struct pm_match_write_node {
7755 /** The embedded base node.
7756*/
7757 pub base: pm_node_t,
7758 /** MatchWriteNode#call
7759*/
7760 pub call: *mut pm_call_node,
7761 /** MatchWriteNode#targets
7762*/
7763 pub targets: pm_node_list,
7764}
7765/** ModuleNode
7766
7767 Represents a module declaration involving the `module` keyword.
7768
7769``` ruby
7770 module Foo end
7771 ^^^^^^^^^^^^^^
7772```
7773
7774 Type: ::PM_MODULE_NODE
7775
7776 @extends pm_node_t
7777*/
7778#[repr(C)]
7779#[derive(Debug, Copy, Clone)]
7780pub struct pm_module_node {
7781 /** The embedded base node.
7782*/
7783 pub base: pm_node_t,
7784 /** ModuleNode#locals
7785*/
7786 pub locals: pm_constant_id_list_t,
7787 /** ModuleNode#module_keyword_loc
7788*/
7789 pub module_keyword_loc: pm_location_t,
7790 /** ModuleNode#constant_path
7791*/
7792 pub constant_path: *mut pm_node,
7793 /** ModuleNode#body
7794*/
7795 pub body: *mut pm_node,
7796 /** ModuleNode#end_keyword_loc
7797*/
7798 pub end_keyword_loc: pm_location_t,
7799 /** ModuleNode#name
7800*/
7801 pub name: pm_constant_id_t,
7802}
7803/** MultiTargetNode
7804
7805 Represents a multi-target expression.
7806
7807``` ruby
7808 a, (b, c) = 1, 2, 3
7809 ^^^^^^
7810```
7811
7812 This can be a part of `MultiWriteNode` as above, or the target of a `for` loop
7813
7814``` ruby
7815 for a, b in [[1, 2], [3, 4]]
7816 ^^^^
7817```
7818
7819 Type: ::PM_MULTI_TARGET_NODE
7820
7821 @extends pm_node_t
7822*/
7823#[repr(C)]
7824#[derive(Debug, Copy, Clone)]
7825pub struct pm_multi_target_node {
7826 /** The embedded base node.
7827*/
7828 pub base: pm_node_t,
7829 /** MultiTargetNode#lefts
7830
7831 Represents the targets expressions before a splat node.
7832
7833``` ruby
7834 a, (b, c, *) = 1, 2, 3, 4, 5
7835 ^^^^
7836```
7837
7838 The splat node can be absent, in that case all target expressions are in the left field.
7839
7840``` ruby
7841 a, (b, c) = 1, 2, 3, 4, 5
7842 ^^^^
7843```
7844*/
7845 pub lefts: pm_node_list,
7846 /** MultiTargetNode#rest
7847
7848 Represents a splat node in the target expression.
7849
7850``` ruby
7851 a, (b, *c) = 1, 2, 3, 4
7852 ^^
7853```
7854
7855 The variable can be empty, this results in a `SplatNode` with a `nil` expression field.
7856
7857``` ruby
7858 a, (b, *) = 1, 2, 3, 4
7859 ^
7860```
7861
7862 If the `*` is omitted, this field will contain an `ImplicitRestNode`
7863
7864``` ruby
7865 a, (b,) = 1, 2, 3, 4
7866 ^
7867```
7868*/
7869 pub rest: *mut pm_node,
7870 /** MultiTargetNode#rights
7871
7872 Represents the targets expressions after a splat node.
7873
7874``` ruby
7875 a, (*, b, c) = 1, 2, 3, 4, 5
7876 ^^^^
7877```
7878*/
7879 pub rights: pm_node_list,
7880 /** MultiTargetNode#lparen_loc
7881
7882 The Location of the opening parenthesis.
7883
7884``` ruby
7885 a, (b, c) = 1, 2, 3
7886 ^
7887```
7888*/
7889 pub lparen_loc: pm_location_t,
7890 /** MultiTargetNode#rparen_loc
7891
7892 The Location of the closing parenthesis.
7893
7894``` ruby
7895 a, (b, c) = 1, 2, 3
7896 ^
7897```
7898*/
7899 pub rparen_loc: pm_location_t,
7900}
7901/** MultiWriteNode
7902
7903 Represents a write to a multi-target expression.
7904
7905``` ruby
7906 a, b, c = 1, 2, 3
7907 ^^^^^^^^^^^^^^^^^
7908```
7909
7910 Type: ::PM_MULTI_WRITE_NODE
7911
7912 @extends pm_node_t
7913*/
7914#[repr(C)]
7915#[derive(Debug, Copy, Clone)]
7916pub struct pm_multi_write_node {
7917 /** The embedded base node.
7918*/
7919 pub base: pm_node_t,
7920 /** MultiWriteNode#lefts
7921
7922 Represents the targets expressions before a splat node.
7923
7924``` ruby
7925 a, b, * = 1, 2, 3, 4, 5
7926 ^^^^
7927```
7928
7929 The splat node can be absent, in that case all target expressions are in the left field.
7930
7931``` ruby
7932 a, b, c = 1, 2, 3, 4, 5
7933 ^^^^^^^
7934```
7935*/
7936 pub lefts: pm_node_list,
7937 /** MultiWriteNode#rest
7938
7939 Represents a splat node in the target expression.
7940
7941``` ruby
7942 a, b, *c = 1, 2, 3, 4
7943 ^^
7944```
7945
7946 The variable can be empty, this results in a `SplatNode` with a `nil` expression field.
7947
7948``` ruby
7949 a, b, * = 1, 2, 3, 4
7950 ^
7951```
7952
7953 If the `*` is omitted, this field will contain an `ImplicitRestNode`
7954
7955``` ruby
7956 a, b, = 1, 2, 3, 4
7957 ^
7958```
7959*/
7960 pub rest: *mut pm_node,
7961 /** MultiWriteNode#rights
7962
7963 Represents the targets expressions after a splat node.
7964
7965``` ruby
7966 a, *, b, c = 1, 2, 3, 4, 5
7967 ^^^^
7968```
7969*/
7970 pub rights: pm_node_list,
7971 /** MultiWriteNode#lparen_loc
7972
7973 The Location of the opening parenthesis.
7974
7975``` ruby
7976 (a, b, c) = 1, 2, 3
7977 ^
7978```
7979*/
7980 pub lparen_loc: pm_location_t,
7981 /** MultiWriteNode#rparen_loc
7982
7983 The Location of the closing parenthesis.
7984
7985``` ruby
7986 (a, b, c) = 1, 2, 3
7987 ^
7988```
7989*/
7990 pub rparen_loc: pm_location_t,
7991 /** MultiWriteNode#operator_loc
7992
7993 The Location of the operator.
7994
7995``` ruby
7996 a, b, c = 1, 2, 3
7997 ^
7998```
7999*/
8000 pub operator_loc: pm_location_t,
8001 /** MultiWriteNode#value
8002
8003 The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
8004
8005``` ruby
8006 a, b, c = 1, 2, 3
8007 ^^^^^^^
8008```
8009*/
8010 pub value: *mut pm_node,
8011}
8012/** NextNode
8013
8014 Represents the use of the `next` keyword.
8015
8016``` ruby
8017 next 1
8018 ^^^^^^
8019```
8020
8021 Type: ::PM_NEXT_NODE
8022
8023 @extends pm_node_t
8024*/
8025#[repr(C)]
8026#[derive(Debug, Copy, Clone)]
8027pub struct pm_next_node {
8028 /** The embedded base node.
8029*/
8030 pub base: pm_node_t,
8031 /** NextNode#arguments
8032*/
8033 pub arguments: *mut pm_arguments_node,
8034 /** NextNode#keyword_loc
8035*/
8036 pub keyword_loc: pm_location_t,
8037}
8038/** NilNode
8039
8040 Represents the use of the `nil` keyword.
8041
8042``` ruby
8043 nil
8044 ^^^
8045```
8046
8047 Type: ::PM_NIL_NODE
8048
8049 @extends pm_node_t
8050*/
8051#[repr(C)]
8052#[derive(Debug, Default, Copy, Clone)]
8053pub struct pm_nil_node {
8054 /** The embedded base node.
8055*/
8056 pub base: pm_node_t,
8057}
8058/** NoBlockParameterNode
8059
8060 Represents the use of `&nil` inside method arguments.
8061
8062``` ruby
8063 def a(&nil)
8064 ^^^^
8065 end
8066```
8067
8068 Type: ::PM_NO_BLOCK_PARAMETER_NODE
8069
8070 @extends pm_node_t
8071*/
8072#[repr(C)]
8073#[derive(Debug, Default, Copy, Clone)]
8074pub struct pm_no_block_parameter_node {
8075 /** The embedded base node.
8076*/
8077 pub base: pm_node_t,
8078 /** NoBlockParameterNode#operator_loc
8079*/
8080 pub operator_loc: pm_location_t,
8081 /** NoBlockParameterNode#keyword_loc
8082*/
8083 pub keyword_loc: pm_location_t,
8084}
8085/** NoKeywordsParameterNode
8086
8087 Represents the use of `**nil` inside method arguments.
8088
8089``` ruby
8090 def a(**nil)
8091 ^^^^^
8092 end
8093```
8094
8095 Type: ::PM_NO_KEYWORDS_PARAMETER_NODE
8096
8097 @extends pm_node_t
8098*/
8099#[repr(C)]
8100#[derive(Debug, Default, Copy, Clone)]
8101pub struct pm_no_keywords_parameter_node {
8102 /** The embedded base node.
8103*/
8104 pub base: pm_node_t,
8105 /** NoKeywordsParameterNode#operator_loc
8106*/
8107 pub operator_loc: pm_location_t,
8108 /** NoKeywordsParameterNode#keyword_loc
8109*/
8110 pub keyword_loc: pm_location_t,
8111}
8112/** NumberedParametersNode
8113
8114 Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
8115
8116``` ruby
8117 -> { _1 + _2 }
8118 ^^^^^^^^^^^^^^
8119```
8120
8121 Type: ::PM_NUMBERED_PARAMETERS_NODE
8122
8123 @extends pm_node_t
8124*/
8125#[repr(C)]
8126#[derive(Debug, Default, Copy, Clone)]
8127pub struct pm_numbered_parameters_node {
8128 /** The embedded base node.
8129*/
8130 pub base: pm_node_t,
8131 /** NumberedParametersNode#maximum
8132*/
8133 pub maximum: u8,
8134}
8135/** NumberedReferenceReadNode
8136
8137 Represents reading a numbered reference to a capture in the previous match.
8138
8139``` ruby
8140 $1
8141 ^^
8142```
8143
8144 Type: ::PM_NUMBERED_REFERENCE_READ_NODE
8145
8146 @extends pm_node_t
8147*/
8148#[repr(C)]
8149#[derive(Debug, Default, Copy, Clone)]
8150pub struct pm_numbered_reference_read_node {
8151 /** The embedded base node.
8152*/
8153 pub base: pm_node_t,
8154 /** NumberedReferenceReadNode#number
8155
8156 The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`.
8157
8158``` ruby
8159 $1 # number `1`
8160```
8161
8162``` ruby
8163 $5432 # number `5432`
8164```
8165
8166``` ruby
8167 $4294967296 # number `0`
8168```
8169*/
8170 pub number: u32,
8171}
8172/** OptionalKeywordParameterNode
8173
8174 Represents an optional keyword parameter to a method, block, or lambda definition.
8175
8176``` ruby
8177 def a(b: 1)
8178 ^^^^
8179 end
8180```
8181
8182 Type: ::PM_OPTIONAL_KEYWORD_PARAMETER_NODE
8183
8184 Flags (#pm_parameter_flags):
8185 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
8186
8187 @extends pm_node_t
8188*/
8189#[repr(C)]
8190#[derive(Debug, Copy, Clone)]
8191pub struct pm_optional_keyword_parameter_node {
8192 /** The embedded base node.
8193*/
8194 pub base: pm_node_t,
8195 /** OptionalKeywordParameterNode#name
8196*/
8197 pub name: pm_constant_id_t,
8198 /** OptionalKeywordParameterNode#name_loc
8199*/
8200 pub name_loc: pm_location_t,
8201 /** OptionalKeywordParameterNode#value
8202*/
8203 pub value: *mut pm_node,
8204}
8205/** OptionalParameterNode
8206
8207 Represents an optional parameter to a method, block, or lambda definition.
8208
8209``` ruby
8210 def a(b = 1)
8211 ^^^^^
8212 end
8213```
8214
8215 Type: ::PM_OPTIONAL_PARAMETER_NODE
8216
8217 Flags (#pm_parameter_flags):
8218 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
8219
8220 @extends pm_node_t
8221*/
8222#[repr(C)]
8223#[derive(Debug, Copy, Clone)]
8224pub struct pm_optional_parameter_node {
8225 /** The embedded base node.
8226*/
8227 pub base: pm_node_t,
8228 /** OptionalParameterNode#name
8229*/
8230 pub name: pm_constant_id_t,
8231 /** OptionalParameterNode#name_loc
8232*/
8233 pub name_loc: pm_location_t,
8234 /** OptionalParameterNode#operator_loc
8235*/
8236 pub operator_loc: pm_location_t,
8237 /** OptionalParameterNode#value
8238*/
8239 pub value: *mut pm_node,
8240}
8241/** OrNode
8242
8243 Represents the use of the `||` operator or the `or` keyword.
8244
8245``` ruby
8246 left or right
8247 ^^^^^^^^^^^^^
8248```
8249
8250 Type: ::PM_OR_NODE
8251
8252 @extends pm_node_t
8253*/
8254#[repr(C)]
8255#[derive(Debug, Copy, Clone)]
8256pub struct pm_or_node {
8257 /** The embedded base node.
8258*/
8259 pub base: pm_node_t,
8260 /** OrNode#left
8261
8262 Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
8263
8264``` ruby
8265 left or right
8266 ^^^^
8267```
8268
8269``` ruby
8270 1 || 2
8271 ^
8272```
8273*/
8274 pub left: *mut pm_node,
8275 /** OrNode#right
8276
8277 Represents the right side of the expression.
8278
8279``` ruby
8280 left || right
8281 ^^^^^
8282```
8283
8284``` ruby
8285 1 or 2
8286 ^
8287```
8288*/
8289 pub right: *mut pm_node,
8290 /** OrNode#operator_loc
8291
8292 The Location of the `or` keyword or the `||` operator.
8293
8294``` ruby
8295 left or right
8296 ^^
8297```
8298*/
8299 pub operator_loc: pm_location_t,
8300}
8301/** ParametersNode
8302
8303 Represents the list of parameters on a method, block, or lambda definition.
8304
8305``` ruby
8306 def a(b, c, d)
8307 ^^^^^^^
8308 end
8309```
8310
8311 Type: ::PM_PARAMETERS_NODE
8312
8313 @extends pm_node_t
8314*/
8315#[repr(C)]
8316#[derive(Debug, Copy, Clone)]
8317pub struct pm_parameters_node {
8318 /** The embedded base node.
8319*/
8320 pub base: pm_node_t,
8321 /** ParametersNode#requireds
8322*/
8323 pub requireds: pm_node_list,
8324 /** ParametersNode#optionals
8325*/
8326 pub optionals: pm_node_list,
8327 /** ParametersNode#rest
8328*/
8329 pub rest: *mut pm_node,
8330 /** ParametersNode#posts
8331*/
8332 pub posts: pm_node_list,
8333 /** ParametersNode#keywords
8334*/
8335 pub keywords: pm_node_list,
8336 /** ParametersNode#keyword_rest
8337*/
8338 pub keyword_rest: *mut pm_node,
8339 /** ParametersNode#block
8340*/
8341 pub block: *mut pm_node,
8342}
8343/** ParenthesesNode
8344
8345 Represents a parenthesized expression
8346
8347``` ruby
8348 (10 + 34)
8349 ^^^^^^^^^
8350```
8351
8352 Type: ::PM_PARENTHESES_NODE
8353
8354 Flags (#pm_parentheses_node_flags):
8355 * ::PM_PARENTHESES_NODE_FLAGS_MULTIPLE_STATEMENTS
8356
8357 @extends pm_node_t
8358*/
8359#[repr(C)]
8360#[derive(Debug, Copy, Clone)]
8361pub struct pm_parentheses_node {
8362 /** The embedded base node.
8363*/
8364 pub base: pm_node_t,
8365 /** ParenthesesNode#body
8366*/
8367 pub body: *mut pm_node,
8368 /** ParenthesesNode#opening_loc
8369*/
8370 pub opening_loc: pm_location_t,
8371 /** ParenthesesNode#closing_loc
8372*/
8373 pub closing_loc: pm_location_t,
8374}
8375/** PinnedExpressionNode
8376
8377 Represents the use of the `^` operator for pinning an expression in a pattern matching expression.
8378
8379``` ruby
8380 foo in ^(bar)
8381 ^^^^^^
8382```
8383
8384 Type: ::PM_PINNED_EXPRESSION_NODE
8385
8386 @extends pm_node_t
8387*/
8388#[repr(C)]
8389#[derive(Debug, Copy, Clone)]
8390pub struct pm_pinned_expression_node {
8391 /** The embedded base node.
8392*/
8393 pub base: pm_node_t,
8394 /** PinnedExpressionNode#expression
8395
8396 The expression used in the pinned expression
8397
8398``` ruby
8399 foo in ^(bar)
8400 ^^^
8401```
8402*/
8403 pub expression: *mut pm_node,
8404 /** PinnedExpressionNode#operator_loc
8405
8406 The Location of the `^` operator
8407
8408``` ruby
8409 foo in ^(bar)
8410 ^
8411```
8412*/
8413 pub operator_loc: pm_location_t,
8414 /** PinnedExpressionNode#lparen_loc
8415
8416 The Location of the opening parenthesis.
8417
8418``` ruby
8419 foo in ^(bar)
8420 ^
8421```
8422*/
8423 pub lparen_loc: pm_location_t,
8424 /** PinnedExpressionNode#rparen_loc
8425
8426 The Location of the closing parenthesis.
8427
8428``` ruby
8429 foo in ^(bar)
8430 ^
8431```
8432*/
8433 pub rparen_loc: pm_location_t,
8434}
8435/** PinnedVariableNode
8436
8437 Represents the use of the `^` operator for pinning a variable in a pattern matching expression.
8438
8439``` ruby
8440 foo in ^bar
8441 ^^^^
8442```
8443
8444 Type: ::PM_PINNED_VARIABLE_NODE
8445
8446 @extends pm_node_t
8447*/
8448#[repr(C)]
8449#[derive(Debug, Copy, Clone)]
8450pub struct pm_pinned_variable_node {
8451 /** The embedded base node.
8452*/
8453 pub base: pm_node_t,
8454 /** PinnedVariableNode#variable
8455
8456 The variable used in the pinned expression
8457
8458``` ruby
8459 foo in ^bar
8460 ^^^
8461```
8462*/
8463 pub variable: *mut pm_node,
8464 /** PinnedVariableNode#operator_loc
8465
8466 The Location of the `^` operator
8467
8468``` ruby
8469 foo in ^bar
8470 ^
8471```
8472*/
8473 pub operator_loc: pm_location_t,
8474}
8475/** PostExecutionNode
8476
8477 Represents the use of the `END` keyword.
8478
8479``` ruby
8480 END { foo }
8481 ^^^^^^^^^^^
8482```
8483
8484 Type: ::PM_POST_EXECUTION_NODE
8485
8486 @extends pm_node_t
8487*/
8488#[repr(C)]
8489#[derive(Debug, Copy, Clone)]
8490pub struct pm_post_execution_node {
8491 /** The embedded base node.
8492*/
8493 pub base: pm_node_t,
8494 /** PostExecutionNode#statements
8495*/
8496 pub statements: *mut pm_statements_node,
8497 /** PostExecutionNode#keyword_loc
8498*/
8499 pub keyword_loc: pm_location_t,
8500 /** PostExecutionNode#opening_loc
8501*/
8502 pub opening_loc: pm_location_t,
8503 /** PostExecutionNode#closing_loc
8504*/
8505 pub closing_loc: pm_location_t,
8506}
8507/** PreExecutionNode
8508
8509 Represents the use of the `BEGIN` keyword.
8510
8511``` ruby
8512 BEGIN { foo }
8513 ^^^^^^^^^^^^^
8514```
8515
8516 Type: ::PM_PRE_EXECUTION_NODE
8517
8518 @extends pm_node_t
8519*/
8520#[repr(C)]
8521#[derive(Debug, Copy, Clone)]
8522pub struct pm_pre_execution_node {
8523 /** The embedded base node.
8524*/
8525 pub base: pm_node_t,
8526 /** PreExecutionNode#statements
8527*/
8528 pub statements: *mut pm_statements_node,
8529 /** PreExecutionNode#keyword_loc
8530*/
8531 pub keyword_loc: pm_location_t,
8532 /** PreExecutionNode#opening_loc
8533*/
8534 pub opening_loc: pm_location_t,
8535 /** PreExecutionNode#closing_loc
8536*/
8537 pub closing_loc: pm_location_t,
8538}
8539/** ProgramNode
8540
8541 The top level node of any parse tree.
8542
8543 Type: ::PM_PROGRAM_NODE
8544
8545 @extends pm_node_t
8546*/
8547#[repr(C)]
8548#[derive(Debug, Copy, Clone)]
8549pub struct pm_program_node {
8550 /** The embedded base node.
8551*/
8552 pub base: pm_node_t,
8553 /** ProgramNode#locals
8554*/
8555 pub locals: pm_constant_id_list_t,
8556 /** ProgramNode#statements
8557*/
8558 pub statements: *mut pm_statements_node,
8559}
8560/** RangeNode
8561
8562 Represents the use of the `..` or `...` operators.
8563
8564``` ruby
8565 1..2
8566 ^^^^
8567```
8568
8569``` ruby
8570 c if a =~ /left/ ... b =~ /right/
8571 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8572```
8573
8574 Type: ::PM_RANGE_NODE
8575
8576 Flags (#pm_range_flags):
8577 * ::PM_RANGE_FLAGS_EXCLUDE_END
8578
8579 @extends pm_node_t
8580*/
8581#[repr(C)]
8582#[derive(Debug, Copy, Clone)]
8583pub struct pm_range_node {
8584 /** The embedded base node.
8585*/
8586 pub base: pm_node_t,
8587 /** RangeNode#left
8588
8589 The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
8590
8591``` ruby
8592 1...
8593 ^
8594```
8595
8596``` ruby
8597 hello...goodbye
8598 ^^^^^
8599```
8600*/
8601 pub left: *mut pm_node,
8602 /** RangeNode#right
8603
8604 The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
8605
8606``` ruby
8607 ..5
8608 ^
8609```
8610
8611``` ruby
8612 1...foo
8613 ^^^
8614```
8615 If neither right-hand or left-hand side was included, this will be an ErrorRecoveryNode.
8616*/
8617 pub right: *mut pm_node,
8618 /** RangeNode#operator_loc
8619
8620 The Location of the `..` or `...` operator.
8621*/
8622 pub operator_loc: pm_location_t,
8623}
8624/** RationalNode
8625
8626 Represents a rational number literal.
8627
8628``` ruby
8629 1.0r
8630 ^^^^
8631```
8632
8633 Type: ::PM_RATIONAL_NODE
8634
8635 Flags (#pm_integer_base_flags):
8636 * ::PM_INTEGER_BASE_FLAGS_BINARY
8637 * ::PM_INTEGER_BASE_FLAGS_DECIMAL
8638 * ::PM_INTEGER_BASE_FLAGS_OCTAL
8639 * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
8640
8641 @extends pm_node_t
8642*/
8643#[repr(C)]
8644#[derive(Debug, Copy, Clone)]
8645pub struct pm_rational_node {
8646 /** The embedded base node.
8647*/
8648 pub base: pm_node_t,
8649 /** RationalNode#numerator
8650
8651 The numerator of the rational number.
8652
8653``` ruby
8654 1.5r # numerator 3
8655```
8656*/
8657 pub numerator: pm_integer_t,
8658 /** RationalNode#denominator
8659
8660 The denominator of the rational number.
8661
8662``` ruby
8663 1.5r # denominator 2
8664```
8665*/
8666 pub denominator: pm_integer_t,
8667}
8668/** RedoNode
8669
8670 Represents the use of the `redo` keyword.
8671
8672``` ruby
8673 redo
8674 ^^^^
8675```
8676
8677 Type: ::PM_REDO_NODE
8678
8679 @extends pm_node_t
8680*/
8681#[repr(C)]
8682#[derive(Debug, Default, Copy, Clone)]
8683pub struct pm_redo_node {
8684 /** The embedded base node.
8685*/
8686 pub base: pm_node_t,
8687}
8688/** RegularExpressionNode
8689
8690 Represents a regular expression literal with no interpolation.
8691
8692``` ruby
8693 /foo/i
8694 ^^^^^^
8695```
8696
8697 Type: ::PM_REGULAR_EXPRESSION_NODE
8698
8699 Flags (#pm_regular_expression_flags):
8700 * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
8701 * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED
8702 * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
8703 * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE
8704 * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP
8705 * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
8706 * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
8707 * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8
8708 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING
8709 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING
8710 * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING
8711
8712 @extends pm_node_t
8713*/
8714#[repr(C)]
8715#[derive(Debug, Copy, Clone)]
8716pub struct pm_regular_expression_node {
8717 /** The embedded base node.
8718*/
8719 pub base: pm_node_t,
8720 /** RegularExpressionNode#opening_loc
8721*/
8722 pub opening_loc: pm_location_t,
8723 /** RegularExpressionNode#content_loc
8724*/
8725 pub content_loc: pm_location_t,
8726 /** RegularExpressionNode#closing_loc
8727*/
8728 pub closing_loc: pm_location_t,
8729 /** RegularExpressionNode#unescaped
8730*/
8731 pub unescaped: pm_string_t,
8732}
8733/** RequiredKeywordParameterNode
8734
8735 Represents a required keyword parameter to a method, block, or lambda definition.
8736
8737``` ruby
8738 def a(b: )
8739 ^^
8740 end
8741```
8742
8743 Type: ::PM_REQUIRED_KEYWORD_PARAMETER_NODE
8744
8745 Flags (#pm_parameter_flags):
8746 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
8747
8748 @extends pm_node_t
8749*/
8750#[repr(C)]
8751#[derive(Debug, Default, Copy, Clone)]
8752pub struct pm_required_keyword_parameter_node {
8753 /** The embedded base node.
8754*/
8755 pub base: pm_node_t,
8756 /** RequiredKeywordParameterNode#name
8757*/
8758 pub name: pm_constant_id_t,
8759 /** RequiredKeywordParameterNode#name_loc
8760*/
8761 pub name_loc: pm_location_t,
8762}
8763/** RequiredParameterNode
8764
8765 Represents a required parameter to a method, block, or lambda definition.
8766
8767``` ruby
8768 def a(b)
8769 ^
8770 end
8771```
8772
8773 Type: ::PM_REQUIRED_PARAMETER_NODE
8774
8775 Flags (#pm_parameter_flags):
8776 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
8777
8778 @extends pm_node_t
8779*/
8780#[repr(C)]
8781#[derive(Debug, Default, Copy, Clone)]
8782pub struct pm_required_parameter_node {
8783 /** The embedded base node.
8784*/
8785 pub base: pm_node_t,
8786 /** RequiredParameterNode#name
8787*/
8788 pub name: pm_constant_id_t,
8789}
8790/** RescueModifierNode
8791
8792 Represents an expression modified with a rescue.
8793
8794``` ruby
8795 foo rescue nil
8796 ^^^^^^^^^^^^^^
8797```
8798
8799 Type: ::PM_RESCUE_MODIFIER_NODE
8800
8801 @extends pm_node_t
8802*/
8803#[repr(C)]
8804#[derive(Debug, Copy, Clone)]
8805pub struct pm_rescue_modifier_node {
8806 /** The embedded base node.
8807*/
8808 pub base: pm_node_t,
8809 /** RescueModifierNode#expression
8810*/
8811 pub expression: *mut pm_node,
8812 /** RescueModifierNode#keyword_loc
8813*/
8814 pub keyword_loc: pm_location_t,
8815 /** RescueModifierNode#rescue_expression
8816*/
8817 pub rescue_expression: *mut pm_node,
8818}
8819/** RescueNode
8820
8821 Represents a rescue statement.
8822
8823``` ruby
8824 begin
8825 rescue Foo, *splat, Bar => ex
8826 foo
8827 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8828 end
8829```
8830
8831 `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field.
8832
8833 Type: ::PM_RESCUE_NODE
8834
8835 @extends pm_node_t
8836*/
8837#[repr(C)]
8838#[derive(Debug, Copy, Clone)]
8839pub struct pm_rescue_node {
8840 /** The embedded base node.
8841*/
8842 pub base: pm_node_t,
8843 /** RescueNode#keyword_loc
8844*/
8845 pub keyword_loc: pm_location_t,
8846 /** RescueNode#exceptions
8847*/
8848 pub exceptions: pm_node_list,
8849 /** RescueNode#operator_loc
8850*/
8851 pub operator_loc: pm_location_t,
8852 /** RescueNode#reference
8853*/
8854 pub reference: *mut pm_node,
8855 /** RescueNode#then_keyword_loc
8856*/
8857 pub then_keyword_loc: pm_location_t,
8858 /** RescueNode#statements
8859*/
8860 pub statements: *mut pm_statements_node,
8861 /** RescueNode#subsequent
8862*/
8863 pub subsequent: *mut pm_rescue_node,
8864}
8865/** RestParameterNode
8866
8867 Represents a rest parameter to a method, block, or lambda definition.
8868
8869``` ruby
8870 def a(*b)
8871 ^^
8872 end
8873```
8874
8875 Type: ::PM_REST_PARAMETER_NODE
8876
8877 Flags (#pm_parameter_flags):
8878 * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER
8879
8880 @extends pm_node_t
8881*/
8882#[repr(C)]
8883#[derive(Debug, Default, Copy, Clone)]
8884pub struct pm_rest_parameter_node {
8885 /** The embedded base node.
8886*/
8887 pub base: pm_node_t,
8888 /** RestParameterNode#name
8889*/
8890 pub name: pm_constant_id_t,
8891 /** RestParameterNode#name_loc
8892*/
8893 pub name_loc: pm_location_t,
8894 /** RestParameterNode#operator_loc
8895*/
8896 pub operator_loc: pm_location_t,
8897}
8898/** RetryNode
8899
8900 Represents the use of the `retry` keyword.
8901
8902``` ruby
8903 retry
8904 ^^^^^
8905```
8906
8907 Type: ::PM_RETRY_NODE
8908
8909 @extends pm_node_t
8910*/
8911#[repr(C)]
8912#[derive(Debug, Default, Copy, Clone)]
8913pub struct pm_retry_node {
8914 /** The embedded base node.
8915*/
8916 pub base: pm_node_t,
8917}
8918/** ReturnNode
8919
8920 Represents the use of the `return` keyword.
8921
8922``` ruby
8923 return 1
8924 ^^^^^^^^
8925```
8926
8927 Type: ::PM_RETURN_NODE
8928
8929 @extends pm_node_t
8930*/
8931#[repr(C)]
8932#[derive(Debug, Copy, Clone)]
8933pub struct pm_return_node {
8934 /** The embedded base node.
8935*/
8936 pub base: pm_node_t,
8937 /** ReturnNode#keyword_loc
8938*/
8939 pub keyword_loc: pm_location_t,
8940 /** ReturnNode#arguments
8941*/
8942 pub arguments: *mut pm_arguments_node,
8943}
8944/** SelfNode
8945
8946 Represents the `self` keyword.
8947
8948``` ruby
8949 self
8950 ^^^^
8951```
8952
8953 Type: ::PM_SELF_NODE
8954
8955 @extends pm_node_t
8956*/
8957#[repr(C)]
8958#[derive(Debug, Default, Copy, Clone)]
8959pub struct pm_self_node {
8960 /** The embedded base node.
8961*/
8962 pub base: pm_node_t,
8963}
8964/** ShareableConstantNode
8965
8966 This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
8967
8968``` ruby
8969 # shareable_constant_value: literal
8970 C = { a: 1 }
8971 ^^^^^^^^^^^^
8972```
8973
8974 Type: ::PM_SHAREABLE_CONSTANT_NODE
8975
8976 Flags (#pm_shareable_constant_node_flags):
8977 * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL
8978 * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING
8979 * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY
8980
8981 @extends pm_node_t
8982*/
8983#[repr(C)]
8984#[derive(Debug, Copy, Clone)]
8985pub struct pm_shareable_constant_node {
8986 /** The embedded base node.
8987*/
8988 pub base: pm_node_t,
8989 /** ShareableConstantNode#write
8990
8991 The constant write that should be modified with the shareability state.
8992*/
8993 pub write: *mut pm_node,
8994}
8995/** SingletonClassNode
8996
8997 Represents a singleton class declaration involving the `class` keyword.
8998
8999``` ruby
9000 class << self end
9001 ^^^^^^^^^^^^^^^^^
9002```
9003
9004 Type: ::PM_SINGLETON_CLASS_NODE
9005
9006 @extends pm_node_t
9007*/
9008#[repr(C)]
9009#[derive(Debug, Copy, Clone)]
9010pub struct pm_singleton_class_node {
9011 /** The embedded base node.
9012*/
9013 pub base: pm_node_t,
9014 /** SingletonClassNode#locals
9015*/
9016 pub locals: pm_constant_id_list_t,
9017 /** SingletonClassNode#class_keyword_loc
9018*/
9019 pub class_keyword_loc: pm_location_t,
9020 /** SingletonClassNode#operator_loc
9021*/
9022 pub operator_loc: pm_location_t,
9023 /** SingletonClassNode#expression
9024*/
9025 pub expression: *mut pm_node,
9026 /** SingletonClassNode#body
9027*/
9028 pub body: *mut pm_node,
9029 /** SingletonClassNode#end_keyword_loc
9030*/
9031 pub end_keyword_loc: pm_location_t,
9032}
9033/** SourceEncodingNode
9034
9035 Represents the use of the `__ENCODING__` keyword.
9036
9037``` ruby
9038 __ENCODING__
9039 ^^^^^^^^^^^^
9040```
9041
9042 Type: ::PM_SOURCE_ENCODING_NODE
9043
9044 @extends pm_node_t
9045*/
9046#[repr(C)]
9047#[derive(Debug, Default, Copy, Clone)]
9048pub struct pm_source_encoding_node {
9049 /** The embedded base node.
9050*/
9051 pub base: pm_node_t,
9052}
9053/** SourceFileNode
9054
9055 Represents the use of the `__FILE__` keyword.
9056
9057``` ruby
9058 __FILE__
9059 ^^^^^^^^
9060```
9061
9062 Type: ::PM_SOURCE_FILE_NODE
9063
9064 Flags (#pm_string_flags):
9065 * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING
9066 * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING
9067 * ::PM_STRING_FLAGS_FROZEN
9068 * ::PM_STRING_FLAGS_MUTABLE
9069
9070 @extends pm_node_t
9071*/
9072#[repr(C)]
9073#[derive(Debug, Copy, Clone)]
9074pub struct pm_source_file_node {
9075 /** The embedded base node.
9076*/
9077 pub base: pm_node_t,
9078 /** SourceFileNode#filepath
9079
9080 Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism.parse*` APIs.
9081*/
9082 pub filepath: pm_string_t,
9083}
9084/** SourceLineNode
9085
9086 Represents the use of the `__LINE__` keyword.
9087
9088``` ruby
9089 __LINE__
9090 ^^^^^^^^
9091```
9092
9093 Type: ::PM_SOURCE_LINE_NODE
9094
9095 @extends pm_node_t
9096*/
9097#[repr(C)]
9098#[derive(Debug, Default, Copy, Clone)]
9099pub struct pm_source_line_node {
9100 /** The embedded base node.
9101*/
9102 pub base: pm_node_t,
9103}
9104/** SplatNode
9105
9106 Represents the use of the splat operator.
9107
9108``` ruby
9109 [*a]
9110 ^^
9111```
9112
9113 Type: ::PM_SPLAT_NODE
9114
9115 @extends pm_node_t
9116*/
9117#[repr(C)]
9118#[derive(Debug, Copy, Clone)]
9119pub struct pm_splat_node {
9120 /** The embedded base node.
9121*/
9122 pub base: pm_node_t,
9123 /** SplatNode#operator_loc
9124*/
9125 pub operator_loc: pm_location_t,
9126 /** SplatNode#expression
9127*/
9128 pub expression: *mut pm_node,
9129}
9130/** StatementsNode
9131
9132 Represents a set of statements contained within some scope.
9133
9134``` ruby
9135 foo; bar; baz
9136 ^^^^^^^^^^^^^
9137```
9138
9139 Type: ::PM_STATEMENTS_NODE
9140
9141 @extends pm_node_t
9142*/
9143#[repr(C)]
9144#[derive(Debug, Copy, Clone)]
9145pub struct pm_statements_node {
9146 /** The embedded base node.
9147*/
9148 pub base: pm_node_t,
9149 /** StatementsNode#body
9150*/
9151 pub body: pm_node_list,
9152}
9153/** StringNode
9154
9155 Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string.
9156
9157``` ruby
9158 "foo"
9159 ^^^^^
9160```
9161
9162``` ruby
9163 %w[foo]
9164 ^^^
9165```
9166
9167``` ruby
9168 "foo #{bar} baz"
9169 ^^^^ ^^^^
9170```
9171
9172 Type: ::PM_STRING_NODE
9173
9174 Flags (#pm_string_flags):
9175 * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING
9176 * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING
9177 * ::PM_STRING_FLAGS_FROZEN
9178 * ::PM_STRING_FLAGS_MUTABLE
9179
9180 @extends pm_node_t
9181*/
9182#[repr(C)]
9183#[derive(Debug, Copy, Clone)]
9184pub struct pm_string_node {
9185 /** The embedded base node.
9186*/
9187 pub base: pm_node_t,
9188 /** StringNode#opening_loc
9189*/
9190 pub opening_loc: pm_location_t,
9191 /** StringNode#content_loc
9192*/
9193 pub content_loc: pm_location_t,
9194 /** StringNode#closing_loc
9195*/
9196 pub closing_loc: pm_location_t,
9197 /** StringNode#unescaped
9198*/
9199 pub unescaped: pm_string_t,
9200}
9201/** SuperNode
9202
9203 Represents the use of the `super` keyword with parentheses or arguments.
9204
9205``` ruby
9206 super()
9207 ^^^^^^^
9208```
9209
9210``` ruby
9211 super foo, bar
9212 ^^^^^^^^^^^^^^
9213```
9214
9215 If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead.
9216
9217 Type: ::PM_SUPER_NODE
9218
9219 @extends pm_node_t
9220*/
9221#[repr(C)]
9222#[derive(Debug, Copy, Clone)]
9223pub struct pm_super_node {
9224 /** The embedded base node.
9225*/
9226 pub base: pm_node_t,
9227 /** SuperNode#keyword_loc
9228*/
9229 pub keyword_loc: pm_location_t,
9230 /** SuperNode#lparen_loc
9231*/
9232 pub lparen_loc: pm_location_t,
9233 /** SuperNode#arguments
9234
9235 Can be only `nil` when there are empty parentheses, like `super()`.
9236*/
9237 pub arguments: *mut pm_arguments_node,
9238 /** SuperNode#rparen_loc
9239*/
9240 pub rparen_loc: pm_location_t,
9241 /** SuperNode#block
9242*/
9243 pub block: *mut pm_node,
9244}
9245/** SymbolNode
9246
9247 Represents a symbol literal or a symbol contained within a `%i` list.
9248
9249``` ruby
9250 :foo
9251 ^^^^
9252```
9253
9254``` ruby
9255 %i[foo]
9256 ^^^
9257```
9258
9259 Type: ::PM_SYMBOL_NODE
9260
9261 Flags (#pm_symbol_flags):
9262 * ::PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING
9263 * ::PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING
9264 * ::PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING
9265
9266 @extends pm_node_t
9267*/
9268#[repr(C)]
9269#[derive(Debug, Copy, Clone)]
9270pub struct pm_symbol_node {
9271 /** The embedded base node.
9272*/
9273 pub base: pm_node_t,
9274 /** SymbolNode#opening_loc
9275*/
9276 pub opening_loc: pm_location_t,
9277 /** SymbolNode#value_loc
9278*/
9279 pub value_loc: pm_location_t,
9280 /** SymbolNode#closing_loc
9281*/
9282 pub closing_loc: pm_location_t,
9283 /** SymbolNode#unescaped
9284*/
9285 pub unescaped: pm_string_t,
9286}
9287/** TrueNode
9288
9289 Represents the use of the literal `true` keyword.
9290
9291``` ruby
9292 true
9293 ^^^^
9294```
9295
9296 Type: ::PM_TRUE_NODE
9297
9298 @extends pm_node_t
9299*/
9300#[repr(C)]
9301#[derive(Debug, Default, Copy, Clone)]
9302pub struct pm_true_node {
9303 /** The embedded base node.
9304*/
9305 pub base: pm_node_t,
9306}
9307/** UndefNode
9308
9309 Represents the use of the `undef` keyword.
9310
9311``` ruby
9312 undef :foo, :bar, :baz
9313 ^^^^^^^^^^^^^^^^^^^^^^
9314```
9315
9316 Type: ::PM_UNDEF_NODE
9317
9318 @extends pm_node_t
9319*/
9320#[repr(C)]
9321#[derive(Debug, Copy, Clone)]
9322pub struct pm_undef_node {
9323 /** The embedded base node.
9324*/
9325 pub base: pm_node_t,
9326 /** UndefNode#names
9327*/
9328 pub names: pm_node_list,
9329 /** UndefNode#keyword_loc
9330*/
9331 pub keyword_loc: pm_location_t,
9332}
9333/** UnlessNode
9334
9335 Represents the use of the `unless` keyword, either in the block form or the modifier form.
9336
9337``` ruby
9338 bar unless foo
9339 ^^^^^^^^^^^^^^
9340```
9341
9342``` ruby
9343 unless foo then bar end
9344 ^^^^^^^^^^^^^^^^^^^^^^^
9345```
9346
9347 Type: ::PM_UNLESS_NODE
9348
9349 @extends pm_node_t
9350*/
9351#[repr(C)]
9352#[derive(Debug, Copy, Clone)]
9353pub struct pm_unless_node {
9354 /** The embedded base node.
9355*/
9356 pub base: pm_node_t,
9357 /** UnlessNode#unless_keyword_loc
9358
9359 The Location of the `unless` keyword.
9360
9361``` ruby
9362 unless cond then bar end
9363 ^^^^^^
9364```
9365
9366``` ruby
9367 bar unless cond
9368 ^^^^^^
9369```
9370*/
9371 pub unless_keyword_loc: pm_location_t,
9372 /** UnlessNode#predicate
9373
9374 The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
9375
9376``` ruby
9377 unless cond then bar end
9378 ^^^^
9379```
9380
9381``` ruby
9382 bar unless cond
9383 ^^^^
9384```
9385*/
9386 pub predicate: *mut pm_node,
9387 /** UnlessNode#then_keyword_loc
9388
9389 The Location of the `then` keyword, if present.
9390
9391``` ruby
9392 unless cond then bar end
9393 ^^^^
9394```
9395*/
9396 pub then_keyword_loc: pm_location_t,
9397 /** UnlessNode#statements
9398
9399 The body of statements that will executed if the unless condition is
9400 falsey. Will be `nil` if no body is provided.
9401
9402``` ruby
9403 unless cond then bar end
9404 ^^^
9405```
9406*/
9407 pub statements: *mut pm_statements_node,
9408 /** UnlessNode#else_clause
9409
9410 The else clause of the unless expression, if present.
9411
9412``` ruby
9413 unless cond then bar else baz end
9414 ^^^^^^^^^^^^
9415```
9416*/
9417 pub else_clause: *mut pm_else_node,
9418 /** UnlessNode#end_keyword_loc
9419
9420 The Location of the `end` keyword, if present.
9421
9422``` ruby
9423 unless cond then bar end
9424 ^^^
9425```
9426*/
9427 pub end_keyword_loc: pm_location_t,
9428}
9429/** UntilNode
9430
9431 Represents the use of the `until` keyword, either in the block form or the modifier form.
9432
9433``` ruby
9434 bar until foo
9435 ^^^^^^^^^^^^^
9436```
9437
9438``` ruby
9439 until foo do bar end
9440 ^^^^^^^^^^^^^^^^^^^^
9441```
9442
9443 Type: ::PM_UNTIL_NODE
9444
9445 Flags (#pm_loop_flags):
9446 * ::PM_LOOP_FLAGS_BEGIN_MODIFIER
9447
9448 @extends pm_node_t
9449*/
9450#[repr(C)]
9451#[derive(Debug, Copy, Clone)]
9452pub struct pm_until_node {
9453 /** The embedded base node.
9454*/
9455 pub base: pm_node_t,
9456 /** UntilNode#until_keyword_loc
9457*/
9458 pub until_keyword_loc: pm_location_t,
9459 /** UntilNode#do_keyword_loc
9460*/
9461 pub do_keyword_loc: pm_location_t,
9462 /** UntilNode#end_keyword_loc
9463*/
9464 pub end_keyword_loc: pm_location_t,
9465 /** UntilNode#predicate
9466*/
9467 pub predicate: *mut pm_node,
9468 /** UntilNode#statements
9469*/
9470 pub statements: *mut pm_statements_node,
9471}
9472/** WhenNode
9473
9474 Represents the use of the `when` keyword within a case statement.
9475
9476``` ruby
9477 case true
9478 when true
9479 ^^^^^^^^^
9480 end
9481```
9482
9483 Type: ::PM_WHEN_NODE
9484
9485 @extends pm_node_t
9486*/
9487#[repr(C)]
9488#[derive(Debug, Copy, Clone)]
9489pub struct pm_when_node {
9490 /** The embedded base node.
9491*/
9492 pub base: pm_node_t,
9493 /** WhenNode#when_keyword_loc
9494*/
9495 pub when_keyword_loc: pm_location_t,
9496 /** WhenNode#conditions
9497*/
9498 pub conditions: pm_node_list,
9499 /** WhenNode#then_keyword_loc
9500*/
9501 pub then_keyword_loc: pm_location_t,
9502 /** WhenNode#statements
9503*/
9504 pub statements: *mut pm_statements_node,
9505}
9506/** WhileNode
9507
9508 Represents the use of the `while` keyword, either in the block form or the modifier form.
9509
9510``` ruby
9511 bar while foo
9512 ^^^^^^^^^^^^^
9513```
9514
9515``` ruby
9516 while foo do bar end
9517 ^^^^^^^^^^^^^^^^^^^^
9518```
9519
9520 Type: ::PM_WHILE_NODE
9521
9522 Flags (#pm_loop_flags):
9523 * ::PM_LOOP_FLAGS_BEGIN_MODIFIER
9524
9525 @extends pm_node_t
9526*/
9527#[repr(C)]
9528#[derive(Debug, Copy, Clone)]
9529pub struct pm_while_node {
9530 /** The embedded base node.
9531*/
9532 pub base: pm_node_t,
9533 /** WhileNode#while_keyword_loc
9534*/
9535 pub while_keyword_loc: pm_location_t,
9536 /** WhileNode#do_keyword_loc
9537*/
9538 pub do_keyword_loc: pm_location_t,
9539 /** WhileNode#end_keyword_loc
9540*/
9541 pub end_keyword_loc: pm_location_t,
9542 /** WhileNode#predicate
9543*/
9544 pub predicate: *mut pm_node,
9545 /** WhileNode#statements
9546*/
9547 pub statements: *mut pm_statements_node,
9548}
9549/** XStringNode
9550
9551 Represents an xstring literal with no interpolation.
9552
9553``` ruby
9554 `foo`
9555 ^^^^^
9556```
9557
9558 Type: ::PM_X_STRING_NODE
9559
9560 Flags (#pm_encoding_flags):
9561 * ::PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING
9562 * ::PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING
9563
9564 @extends pm_node_t
9565*/
9566#[repr(C)]
9567#[derive(Debug, Copy, Clone)]
9568pub struct pm_x_string_node {
9569 /** The embedded base node.
9570*/
9571 pub base: pm_node_t,
9572 /** XStringNode#opening_loc
9573*/
9574 pub opening_loc: pm_location_t,
9575 /** XStringNode#content_loc
9576*/
9577 pub content_loc: pm_location_t,
9578 /** XStringNode#closing_loc
9579*/
9580 pub closing_loc: pm_location_t,
9581 /** XStringNode#unescaped
9582*/
9583 pub unescaped: pm_string_t,
9584}
9585/** YieldNode
9586
9587 Represents the use of the `yield` keyword.
9588
9589``` ruby
9590 yield 1
9591 ^^^^^^^
9592```
9593
9594 Type: ::PM_YIELD_NODE
9595
9596 @extends pm_node_t
9597*/
9598#[repr(C)]
9599#[derive(Debug, Copy, Clone)]
9600pub struct pm_yield_node {
9601 /** The embedded base node.
9602*/
9603 pub base: pm_node_t,
9604 /** YieldNode#keyword_loc
9605*/
9606 pub keyword_loc: pm_location_t,
9607 /** YieldNode#lparen_loc
9608*/
9609 pub lparen_loc: pm_location_t,
9610 /** YieldNode#arguments
9611*/
9612 pub arguments: *mut pm_arguments_node,
9613 /** YieldNode#rparen_loc
9614*/
9615 pub rparen_loc: pm_location_t,
9616}
9617#[repr(C)]
9618#[derive(Debug, Copy, Clone)]
9619pub struct pm_diagnostic_t {
9620 _unused: [u8; 0],
9621}
9622#[repr(C)]
9623#[derive(Debug, Copy, Clone)]
9624pub struct pm_comment_t {
9625 _unused: [u8; 0],
9626}
9627/** A list of offsets of the start of lines in a string. The offsets are assumed
9628 to be sorted/inserted in ascending order.
9629*/
9630#[repr(C)]
9631#[derive(Debug, Copy, Clone)]
9632pub struct pm_line_offset_list_t {
9633 /** The number of offsets in the list.
9634*/
9635 pub size: usize,
9636 /** The capacity of the list that has been allocated.
9637*/
9638 pub capacity: usize,
9639 /** The list of offsets.
9640*/
9641 pub offsets: *mut u32,
9642}
9643/** A line and column in a string.
9644*/
9645#[repr(C)]
9646#[derive(Debug, Default, Copy, Clone)]
9647pub struct pm_line_column_t {
9648 /** The line number.
9649*/
9650 pub line: i32,
9651 /** The column in bytes.
9652*/
9653 pub column: u32,
9654}
9655#[repr(C)]
9656#[derive(Debug, Copy, Clone)]
9657pub struct pm_magic_comment_t {
9658 _unused: [u8; 0],
9659}
9660#[repr(C)]
9661#[derive(Debug, Copy, Clone)]
9662pub struct pm_options_scope_t {
9663 _unused: [u8; 0],
9664}
9665#[repr(C)]
9666#[derive(Debug, Copy, Clone)]
9667pub struct pm_options_t {
9668 _unused: [u8; 0],
9669}
9670#[repr(C)]
9671#[derive(Debug, Copy, Clone)]
9672pub struct pm_parser_t {
9673 _unused: [u8; 0],
9674}
9675/** This string is a constant string, and should not be freed.
9676*/
9677pub const PM_STRING_CONSTANT: pm_string_t__bindgen_ty_1 = 0;
9678/** This is a slice of another string, and should not be freed.
9679*/
9680pub const PM_STRING_SHARED: pm_string_t__bindgen_ty_1 = 1;
9681/** This string owns its memory, and should be freed internally.
9682*/
9683pub const PM_STRING_OWNED: pm_string_t__bindgen_ty_1 = 2;
9684/** The default value for parameters.
9685*/
9686pub const PM_OPTIONS_SCOPE_FORWARDING_NONE: u8 = 0;
9687/** When the scope is forwarding with the * parameter.
9688*/
9689pub const PM_OPTIONS_SCOPE_FORWARDING_POSITIONALS: u8 = 1;
9690/** When the scope is forwarding with the ** parameter.
9691*/
9692pub const PM_OPTIONS_SCOPE_FORWARDING_KEYWORDS: u8 = 2;
9693/** When the scope is forwarding with the & parameter.
9694*/
9695pub const PM_OPTIONS_SCOPE_FORWARDING_BLOCK: u8 = 4;
9696/** When the scope is forwarding with the ... parameter.
9697*/
9698pub const PM_OPTIONS_SCOPE_FORWARDING_ALL: u8 = 8;
9699/** A bit representing whether or not the command line -a option was set. -a
9700 splits the input line $_ into $F.
9701*/
9702pub const PM_OPTIONS_COMMAND_LINE_A: u8 = 1;
9703/** A bit representing whether or not the command line -e option was set. -e
9704 allow the user to specify a script to be executed. This is necessary for
9705 prism to know because certain warnings are not generated when -e is used.
9706*/
9707pub const PM_OPTIONS_COMMAND_LINE_E: u8 = 2;
9708/** A bit representing whether or not the command line -l option was set. -l
9709 chomps the input line by default.
9710*/
9711pub const PM_OPTIONS_COMMAND_LINE_L: u8 = 4;
9712/** A bit representing whether or not the command line -n option was set. -n
9713 wraps the script in a while gets loop.
9714*/
9715pub const PM_OPTIONS_COMMAND_LINE_N: u8 = 8;
9716/** A bit representing whether or not the command line -p option was set. -p
9717 prints the value of $_ at the end of each loop.
9718*/
9719pub const PM_OPTIONS_COMMAND_LINE_P: u8 = 16;
9720/** A bit representing whether or not the command line -x option was set. -x
9721 searches the input file for a shebang that includes "ruby".
9722*/
9723pub const PM_OPTIONS_COMMAND_LINE_X: u8 = 32;
9724#[repr(u32)]
9725#[non_exhaustive]
9726/** This enum represents every type of node in the Ruby syntax tree.
9727*/
9728#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9729pub enum pm_node_type {
9730 /** AliasGlobalVariableNode
9731*/
9732 PM_ALIAS_GLOBAL_VARIABLE_NODE = 1,
9733 /** AliasMethodNode
9734*/
9735 PM_ALIAS_METHOD_NODE = 2,
9736 /** AlternationPatternNode
9737*/
9738 PM_ALTERNATION_PATTERN_NODE = 3,
9739 /** AndNode
9740*/
9741 PM_AND_NODE = 4,
9742 /** ArgumentsNode
9743*/
9744 PM_ARGUMENTS_NODE = 5,
9745 /** ArrayNode
9746*/
9747 PM_ARRAY_NODE = 6,
9748 /** ArrayPatternNode
9749*/
9750 PM_ARRAY_PATTERN_NODE = 7,
9751 /** AssocNode
9752*/
9753 PM_ASSOC_NODE = 8,
9754 /** AssocSplatNode
9755*/
9756 PM_ASSOC_SPLAT_NODE = 9,
9757 /** BackReferenceReadNode
9758*/
9759 PM_BACK_REFERENCE_READ_NODE = 10,
9760 /** BeginNode
9761*/
9762 PM_BEGIN_NODE = 11,
9763 /** BlockArgumentNode
9764*/
9765 PM_BLOCK_ARGUMENT_NODE = 12,
9766 /** BlockLocalVariableNode
9767*/
9768 PM_BLOCK_LOCAL_VARIABLE_NODE = 13,
9769 /** BlockNode
9770*/
9771 PM_BLOCK_NODE = 14,
9772 /** BlockParameterNode
9773*/
9774 PM_BLOCK_PARAMETER_NODE = 15,
9775 /** BlockParametersNode
9776*/
9777 PM_BLOCK_PARAMETERS_NODE = 16,
9778 /** BreakNode
9779*/
9780 PM_BREAK_NODE = 17,
9781 /** CallAndWriteNode
9782*/
9783 PM_CALL_AND_WRITE_NODE = 18,
9784 /** CallNode
9785*/
9786 PM_CALL_NODE = 19,
9787 /** CallOperatorWriteNode
9788*/
9789 PM_CALL_OPERATOR_WRITE_NODE = 20,
9790 /** CallOrWriteNode
9791*/
9792 PM_CALL_OR_WRITE_NODE = 21,
9793 /** CallTargetNode
9794*/
9795 PM_CALL_TARGET_NODE = 22,
9796 /** CapturePatternNode
9797*/
9798 PM_CAPTURE_PATTERN_NODE = 23,
9799 /** CaseMatchNode
9800*/
9801 PM_CASE_MATCH_NODE = 24,
9802 /** CaseNode
9803*/
9804 PM_CASE_NODE = 25,
9805 /** ClassNode
9806*/
9807 PM_CLASS_NODE = 26,
9808 /** ClassVariableAndWriteNode
9809*/
9810 PM_CLASS_VARIABLE_AND_WRITE_NODE = 27,
9811 /** ClassVariableOperatorWriteNode
9812*/
9813 PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE = 28,
9814 /** ClassVariableOrWriteNode
9815*/
9816 PM_CLASS_VARIABLE_OR_WRITE_NODE = 29,
9817 /** ClassVariableReadNode
9818*/
9819 PM_CLASS_VARIABLE_READ_NODE = 30,
9820 /** ClassVariableTargetNode
9821*/
9822 PM_CLASS_VARIABLE_TARGET_NODE = 31,
9823 /** ClassVariableWriteNode
9824*/
9825 PM_CLASS_VARIABLE_WRITE_NODE = 32,
9826 /** ConstantAndWriteNode
9827*/
9828 PM_CONSTANT_AND_WRITE_NODE = 33,
9829 /** ConstantOperatorWriteNode
9830*/
9831 PM_CONSTANT_OPERATOR_WRITE_NODE = 34,
9832 /** ConstantOrWriteNode
9833*/
9834 PM_CONSTANT_OR_WRITE_NODE = 35,
9835 /** ConstantPathAndWriteNode
9836*/
9837 PM_CONSTANT_PATH_AND_WRITE_NODE = 36,
9838 /** ConstantPathNode
9839*/
9840 PM_CONSTANT_PATH_NODE = 37,
9841 /** ConstantPathOperatorWriteNode
9842*/
9843 PM_CONSTANT_PATH_OPERATOR_WRITE_NODE = 38,
9844 /** ConstantPathOrWriteNode
9845*/
9846 PM_CONSTANT_PATH_OR_WRITE_NODE = 39,
9847 /** ConstantPathTargetNode
9848*/
9849 PM_CONSTANT_PATH_TARGET_NODE = 40,
9850 /** ConstantPathWriteNode
9851*/
9852 PM_CONSTANT_PATH_WRITE_NODE = 41,
9853 /** ConstantReadNode
9854*/
9855 PM_CONSTANT_READ_NODE = 42,
9856 /** ConstantTargetNode
9857*/
9858 PM_CONSTANT_TARGET_NODE = 43,
9859 /** ConstantWriteNode
9860*/
9861 PM_CONSTANT_WRITE_NODE = 44,
9862 /** DefNode
9863*/
9864 PM_DEF_NODE = 45,
9865 /** DefinedNode
9866*/
9867 PM_DEFINED_NODE = 46,
9868 /** ElseNode
9869*/
9870 PM_ELSE_NODE = 47,
9871 /** EmbeddedStatementsNode
9872*/
9873 PM_EMBEDDED_STATEMENTS_NODE = 48,
9874 /** EmbeddedVariableNode
9875*/
9876 PM_EMBEDDED_VARIABLE_NODE = 49,
9877 /** EnsureNode
9878*/
9879 PM_ENSURE_NODE = 50,
9880 /** ErrorRecoveryNode
9881*/
9882 PM_ERROR_RECOVERY_NODE = 51,
9883 /** FalseNode
9884*/
9885 PM_FALSE_NODE = 52,
9886 /** FindPatternNode
9887*/
9888 PM_FIND_PATTERN_NODE = 53,
9889 /** FlipFlopNode
9890*/
9891 PM_FLIP_FLOP_NODE = 54,
9892 /** FloatNode
9893*/
9894 PM_FLOAT_NODE = 55,
9895 /** ForNode
9896*/
9897 PM_FOR_NODE = 56,
9898 /** ForwardingArgumentsNode
9899*/
9900 PM_FORWARDING_ARGUMENTS_NODE = 57,
9901 /** ForwardingParameterNode
9902*/
9903 PM_FORWARDING_PARAMETER_NODE = 58,
9904 /** ForwardingSuperNode
9905*/
9906 PM_FORWARDING_SUPER_NODE = 59,
9907 /** GlobalVariableAndWriteNode
9908*/
9909 PM_GLOBAL_VARIABLE_AND_WRITE_NODE = 60,
9910 /** GlobalVariableOperatorWriteNode
9911*/
9912 PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE = 61,
9913 /** GlobalVariableOrWriteNode
9914*/
9915 PM_GLOBAL_VARIABLE_OR_WRITE_NODE = 62,
9916 /** GlobalVariableReadNode
9917*/
9918 PM_GLOBAL_VARIABLE_READ_NODE = 63,
9919 /** GlobalVariableTargetNode
9920*/
9921 PM_GLOBAL_VARIABLE_TARGET_NODE = 64,
9922 /** GlobalVariableWriteNode
9923*/
9924 PM_GLOBAL_VARIABLE_WRITE_NODE = 65,
9925 /** HashNode
9926*/
9927 PM_HASH_NODE = 66,
9928 /** HashPatternNode
9929*/
9930 PM_HASH_PATTERN_NODE = 67,
9931 /** IfNode
9932*/
9933 PM_IF_NODE = 68,
9934 /** ImaginaryNode
9935*/
9936 PM_IMAGINARY_NODE = 69,
9937 /** ImplicitNode
9938*/
9939 PM_IMPLICIT_NODE = 70,
9940 /** ImplicitRestNode
9941*/
9942 PM_IMPLICIT_REST_NODE = 71,
9943 /** InNode
9944*/
9945 PM_IN_NODE = 72,
9946 /** IndexAndWriteNode
9947*/
9948 PM_INDEX_AND_WRITE_NODE = 73,
9949 /** IndexOperatorWriteNode
9950*/
9951 PM_INDEX_OPERATOR_WRITE_NODE = 74,
9952 /** IndexOrWriteNode
9953*/
9954 PM_INDEX_OR_WRITE_NODE = 75,
9955 /** IndexTargetNode
9956*/
9957 PM_INDEX_TARGET_NODE = 76,
9958 /** InstanceVariableAndWriteNode
9959*/
9960 PM_INSTANCE_VARIABLE_AND_WRITE_NODE = 77,
9961 /** InstanceVariableOperatorWriteNode
9962*/
9963 PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE = 78,
9964 /** InstanceVariableOrWriteNode
9965*/
9966 PM_INSTANCE_VARIABLE_OR_WRITE_NODE = 79,
9967 /** InstanceVariableReadNode
9968*/
9969 PM_INSTANCE_VARIABLE_READ_NODE = 80,
9970 /** InstanceVariableTargetNode
9971*/
9972 PM_INSTANCE_VARIABLE_TARGET_NODE = 81,
9973 /** InstanceVariableWriteNode
9974*/
9975 PM_INSTANCE_VARIABLE_WRITE_NODE = 82,
9976 /** IntegerNode
9977*/
9978 PM_INTEGER_NODE = 83,
9979 /** InterpolatedMatchLastLineNode
9980*/
9981 PM_INTERPOLATED_MATCH_LAST_LINE_NODE = 84,
9982 /** InterpolatedRegularExpressionNode
9983*/
9984 PM_INTERPOLATED_REGULAR_EXPRESSION_NODE = 85,
9985 /** InterpolatedStringNode
9986*/
9987 PM_INTERPOLATED_STRING_NODE = 86,
9988 /** InterpolatedSymbolNode
9989*/
9990 PM_INTERPOLATED_SYMBOL_NODE = 87,
9991 /** InterpolatedXStringNode
9992*/
9993 PM_INTERPOLATED_X_STRING_NODE = 88,
9994 /** ItLocalVariableReadNode
9995*/
9996 PM_IT_LOCAL_VARIABLE_READ_NODE = 89,
9997 /** ItParametersNode
9998*/
9999 PM_IT_PARAMETERS_NODE = 90,
10000 /** KeywordHashNode
10001*/
10002 PM_KEYWORD_HASH_NODE = 91,
10003 /** KeywordRestParameterNode
10004*/
10005 PM_KEYWORD_REST_PARAMETER_NODE = 92,
10006 /** LambdaNode
10007*/
10008 PM_LAMBDA_NODE = 93,
10009 /** LocalVariableAndWriteNode
10010*/
10011 PM_LOCAL_VARIABLE_AND_WRITE_NODE = 94,
10012 /** LocalVariableOperatorWriteNode
10013*/
10014 PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE = 95,
10015 /** LocalVariableOrWriteNode
10016*/
10017 PM_LOCAL_VARIABLE_OR_WRITE_NODE = 96,
10018 /** LocalVariableReadNode
10019*/
10020 PM_LOCAL_VARIABLE_READ_NODE = 97,
10021 /** LocalVariableTargetNode
10022*/
10023 PM_LOCAL_VARIABLE_TARGET_NODE = 98,
10024 /** LocalVariableWriteNode
10025*/
10026 PM_LOCAL_VARIABLE_WRITE_NODE = 99,
10027 /** MatchLastLineNode
10028*/
10029 PM_MATCH_LAST_LINE_NODE = 100,
10030 /** MatchPredicateNode
10031*/
10032 PM_MATCH_PREDICATE_NODE = 101,
10033 /** MatchRequiredNode
10034*/
10035 PM_MATCH_REQUIRED_NODE = 102,
10036 /** MatchWriteNode
10037*/
10038 PM_MATCH_WRITE_NODE = 103,
10039 /** ModuleNode
10040*/
10041 PM_MODULE_NODE = 104,
10042 /** MultiTargetNode
10043*/
10044 PM_MULTI_TARGET_NODE = 105,
10045 /** MultiWriteNode
10046*/
10047 PM_MULTI_WRITE_NODE = 106,
10048 /** NextNode
10049*/
10050 PM_NEXT_NODE = 107,
10051 /** NilNode
10052*/
10053 PM_NIL_NODE = 108,
10054 /** NoBlockParameterNode
10055*/
10056 PM_NO_BLOCK_PARAMETER_NODE = 109,
10057 /** NoKeywordsParameterNode
10058*/
10059 PM_NO_KEYWORDS_PARAMETER_NODE = 110,
10060 /** NumberedParametersNode
10061*/
10062 PM_NUMBERED_PARAMETERS_NODE = 111,
10063 /** NumberedReferenceReadNode
10064*/
10065 PM_NUMBERED_REFERENCE_READ_NODE = 112,
10066 /** OptionalKeywordParameterNode
10067*/
10068 PM_OPTIONAL_KEYWORD_PARAMETER_NODE = 113,
10069 /** OptionalParameterNode
10070*/
10071 PM_OPTIONAL_PARAMETER_NODE = 114,
10072 /** OrNode
10073*/
10074 PM_OR_NODE = 115,
10075 /** ParametersNode
10076*/
10077 PM_PARAMETERS_NODE = 116,
10078 /** ParenthesesNode
10079*/
10080 PM_PARENTHESES_NODE = 117,
10081 /** PinnedExpressionNode
10082*/
10083 PM_PINNED_EXPRESSION_NODE = 118,
10084 /** PinnedVariableNode
10085*/
10086 PM_PINNED_VARIABLE_NODE = 119,
10087 /** PostExecutionNode
10088*/
10089 PM_POST_EXECUTION_NODE = 120,
10090 /** PreExecutionNode
10091*/
10092 PM_PRE_EXECUTION_NODE = 121,
10093 /** ProgramNode
10094*/
10095 PM_PROGRAM_NODE = 122,
10096 /** RangeNode
10097*/
10098 PM_RANGE_NODE = 123,
10099 /** RationalNode
10100*/
10101 PM_RATIONAL_NODE = 124,
10102 /** RedoNode
10103*/
10104 PM_REDO_NODE = 125,
10105 /** RegularExpressionNode
10106*/
10107 PM_REGULAR_EXPRESSION_NODE = 126,
10108 /** RequiredKeywordParameterNode
10109*/
10110 PM_REQUIRED_KEYWORD_PARAMETER_NODE = 127,
10111 /** RequiredParameterNode
10112*/
10113 PM_REQUIRED_PARAMETER_NODE = 128,
10114 /** RescueModifierNode
10115*/
10116 PM_RESCUE_MODIFIER_NODE = 129,
10117 /** RescueNode
10118*/
10119 PM_RESCUE_NODE = 130,
10120 /** RestParameterNode
10121*/
10122 PM_REST_PARAMETER_NODE = 131,
10123 /** RetryNode
10124*/
10125 PM_RETRY_NODE = 132,
10126 /** ReturnNode
10127*/
10128 PM_RETURN_NODE = 133,
10129 /** SelfNode
10130*/
10131 PM_SELF_NODE = 134,
10132 /** ShareableConstantNode
10133*/
10134 PM_SHAREABLE_CONSTANT_NODE = 135,
10135 /** SingletonClassNode
10136*/
10137 PM_SINGLETON_CLASS_NODE = 136,
10138 /** SourceEncodingNode
10139*/
10140 PM_SOURCE_ENCODING_NODE = 137,
10141 /** SourceFileNode
10142*/
10143 PM_SOURCE_FILE_NODE = 138,
10144 /** SourceLineNode
10145*/
10146 PM_SOURCE_LINE_NODE = 139,
10147 /** SplatNode
10148*/
10149 PM_SPLAT_NODE = 140,
10150 /** StatementsNode
10151*/
10152 PM_STATEMENTS_NODE = 141,
10153 /** StringNode
10154*/
10155 PM_STRING_NODE = 142,
10156 /** SuperNode
10157*/
10158 PM_SUPER_NODE = 143,
10159 /** SymbolNode
10160*/
10161 PM_SYMBOL_NODE = 144,
10162 /** TrueNode
10163*/
10164 PM_TRUE_NODE = 145,
10165 /** UndefNode
10166*/
10167 PM_UNDEF_NODE = 146,
10168 /** UnlessNode
10169*/
10170 PM_UNLESS_NODE = 147,
10171 /** UntilNode
10172*/
10173 PM_UNTIL_NODE = 148,
10174 /** WhenNode
10175*/
10176 PM_WHEN_NODE = 149,
10177 /** WhileNode
10178*/
10179 PM_WHILE_NODE = 150,
10180 /** XStringNode
10181*/
10182 PM_X_STRING_NODE = 151,
10183 /** YieldNode
10184*/
10185 PM_YIELD_NODE = 152,
10186 /** A special kind of node used for compilation.
10187*/
10188 PM_SCOPE_NODE = 153,
10189}
10190#[repr(u32)]
10191#[non_exhaustive]
10192/** Flags for arguments nodes.
10193*/
10194#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10195pub enum pm_arguments_node_flags {
10196 /** if the arguments contain forwarding
10197*/
10198 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING = 4,
10199 /** if the arguments contain keywords
10200*/
10201 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS = 8,
10202 /** if the arguments contain a keyword splat
10203*/
10204 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT = 16,
10205 /** if the arguments contain a splat
10206*/
10207 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT = 32,
10208 /** if the arguments contain multiple splats
10209*/
10210 PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS = 64,
10211 /** if the arguments contain multiple splats
10212*/
10213 PM_ARGUMENTS_NODE_FLAGS_LAST = 65,
10214}
10215#[repr(u32)]
10216#[non_exhaustive]
10217/** Flags for array nodes.
10218*/
10219#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10220pub enum pm_array_node_flags {
10221 /** if array contains splat nodes
10222*/
10223 PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT = 4,
10224 /** if array contains splat nodes
10225*/
10226 PM_ARRAY_NODE_FLAGS_LAST = 5,
10227}
10228#[repr(u32)]
10229#[non_exhaustive]
10230/** Flags for call nodes.
10231*/
10232#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10233pub enum pm_call_node_flags {
10234 /** &. operator
10235*/
10236 PM_CALL_NODE_FLAGS_SAFE_NAVIGATION = 4,
10237 /** a call that could have been a local variable
10238*/
10239 PM_CALL_NODE_FLAGS_VARIABLE_CALL = 8,
10240 /** a call that is an attribute write, so the value being written should be returned
10241*/
10242 PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE = 16,
10243 /** a call that ignores method visibility
10244*/
10245 PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY = 32,
10246 /** a call that ignores method visibility
10247*/
10248 PM_CALL_NODE_FLAGS_LAST = 33,
10249}
10250#[repr(u32)]
10251#[non_exhaustive]
10252/** Flags for nodes that have unescaped content.
10253*/
10254#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10255pub enum pm_encoding_flags {
10256 /** internal bytes forced the encoding to UTF-8
10257*/
10258 PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING = 4,
10259 /** internal bytes forced the encoding to binary
10260*/
10261 PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING = 8,
10262 /** internal bytes forced the encoding to binary
10263*/
10264 PM_ENCODING_FLAGS_LAST = 9,
10265}
10266#[repr(u32)]
10267#[non_exhaustive]
10268/** Flags for integer nodes that correspond to the base of the integer.
10269*/
10270#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10271pub enum pm_integer_base_flags {
10272 /** 0b prefix
10273*/
10274 PM_INTEGER_BASE_FLAGS_BINARY = 4,
10275 /** 0d or no prefix
10276*/
10277 PM_INTEGER_BASE_FLAGS_DECIMAL = 8,
10278 /** 0o or 0 prefix
10279*/
10280 PM_INTEGER_BASE_FLAGS_OCTAL = 16,
10281 /** 0x prefix
10282*/
10283 PM_INTEGER_BASE_FLAGS_HEXADECIMAL = 32,
10284 /** 0x prefix
10285*/
10286 PM_INTEGER_BASE_FLAGS_LAST = 33,
10287}
10288#[repr(u32)]
10289#[non_exhaustive]
10290/** Flags for interpolated string nodes that indicated mutability if they are also marked as literals.
10291*/
10292#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10293pub enum pm_interpolated_string_node_flags {
10294 /** frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`
10295*/
10296 PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN = 4,
10297 /** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`
10298*/
10299 PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE = 8,
10300 /** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`
10301*/
10302 PM_INTERPOLATED_STRING_NODE_FLAGS_LAST = 9,
10303}
10304#[repr(u32)]
10305#[non_exhaustive]
10306/** Flags for keyword hash nodes.
10307*/
10308#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10309pub enum pm_keyword_hash_node_flags {
10310 /** a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments
10311*/
10312 PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS = 4,
10313 /** a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments
10314*/
10315 PM_KEYWORD_HASH_NODE_FLAGS_LAST = 5,
10316}
10317#[repr(u32)]
10318#[non_exhaustive]
10319/** Flags for while and until loop nodes.
10320*/
10321#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10322pub enum pm_loop_flags {
10323 /** a loop after a begin statement, so the body is executed first before the condition
10324*/
10325 PM_LOOP_FLAGS_BEGIN_MODIFIER = 4,
10326 /** a loop after a begin statement, so the body is executed first before the condition
10327*/
10328 PM_LOOP_FLAGS_LAST = 5,
10329}
10330#[repr(u32)]
10331#[non_exhaustive]
10332/** Flags for parameter nodes.
10333*/
10334#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10335pub enum pm_parameter_flags {
10336 /** a parameter name that has been repeated in the method signature
10337*/
10338 PM_PARAMETER_FLAGS_REPEATED_PARAMETER = 4,
10339 /** a parameter name that has been repeated in the method signature
10340*/
10341 PM_PARAMETER_FLAGS_LAST = 5,
10342}
10343#[repr(u32)]
10344#[non_exhaustive]
10345/** Flags for parentheses nodes.
10346*/
10347#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10348pub enum pm_parentheses_node_flags {
10349 /** parentheses that contain multiple potentially void statements
10350*/
10351 PM_PARENTHESES_NODE_FLAGS_MULTIPLE_STATEMENTS = 4,
10352 /** parentheses that contain multiple potentially void statements
10353*/
10354 PM_PARENTHESES_NODE_FLAGS_LAST = 5,
10355}
10356#[repr(u32)]
10357#[non_exhaustive]
10358/** Flags for range and flip-flop nodes.
10359*/
10360#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10361pub enum pm_range_flags {
10362 /** ... operator
10363*/
10364 PM_RANGE_FLAGS_EXCLUDE_END = 4,
10365 /** ... operator
10366*/
10367 PM_RANGE_FLAGS_LAST = 5,
10368}
10369#[repr(u32)]
10370#[non_exhaustive]
10371/** Flags for regular expression and match last line nodes.
10372*/
10373#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10374pub enum pm_regular_expression_flags {
10375 /** i - ignores the case of characters when matching
10376*/
10377 PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE = 4,
10378 /** x - ignores whitespace and allows comments in regular expressions
10379*/
10380 PM_REGULAR_EXPRESSION_FLAGS_EXTENDED = 8,
10381 /** m - allows $ to match the end of lines within strings
10382*/
10383 PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE = 16,
10384 /** o - only interpolates values into the regular expression once
10385*/
10386 PM_REGULAR_EXPRESSION_FLAGS_ONCE = 32,
10387 /** e - forces the EUC-JP encoding
10388*/
10389 PM_REGULAR_EXPRESSION_FLAGS_EUC_JP = 64,
10390 /** n - forces the ASCII-8BIT encoding
10391*/
10392 PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT = 128,
10393 /** s - forces the Windows-31J encoding
10394*/
10395 PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J = 256,
10396 /** u - forces the UTF-8 encoding
10397*/
10398 PM_REGULAR_EXPRESSION_FLAGS_UTF_8 = 512,
10399 /** internal bytes forced the encoding to UTF-8
10400*/
10401 PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING = 1024,
10402 /** internal bytes forced the encoding to binary
10403*/
10404 PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING = 2048,
10405 /** internal bytes forced the encoding to US-ASCII
10406*/
10407 PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING = 4096,
10408 /** internal bytes forced the encoding to US-ASCII
10409*/
10410 PM_REGULAR_EXPRESSION_FLAGS_LAST = 4097,
10411}
10412#[repr(u32)]
10413#[non_exhaustive]
10414/** Flags for shareable constant nodes.
10415*/
10416#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10417pub enum pm_shareable_constant_node_flags {
10418 /** constant writes that should be modified with shareable constant value literal
10419*/
10420 PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL = 4,
10421 /** constant writes that should be modified with shareable constant value experimental everything
10422*/
10423 PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING = 8,
10424 /** constant writes that should be modified with shareable constant value experimental copy
10425*/
10426 PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY = 16,
10427 /** constant writes that should be modified with shareable constant value experimental copy
10428*/
10429 PM_SHAREABLE_CONSTANT_NODE_FLAGS_LAST = 17,
10430}
10431#[repr(u32)]
10432#[non_exhaustive]
10433/** Flags for string nodes.
10434*/
10435#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10436pub enum pm_string_flags {
10437 /** internal bytes forced the encoding to UTF-8
10438*/
10439 PM_STRING_FLAGS_FORCED_UTF8_ENCODING = 4,
10440 /** internal bytes forced the encoding to binary
10441*/
10442 PM_STRING_FLAGS_FORCED_BINARY_ENCODING = 8,
10443 /** frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal`
10444*/
10445 PM_STRING_FLAGS_FROZEN = 16,
10446 /** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`
10447*/
10448 PM_STRING_FLAGS_MUTABLE = 32,
10449 /** mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`
10450*/
10451 PM_STRING_FLAGS_LAST = 33,
10452}
10453#[repr(u32)]
10454#[non_exhaustive]
10455/** Flags for symbol nodes.
10456*/
10457#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10458pub enum pm_symbol_flags {
10459 /** internal bytes forced the encoding to UTF-8
10460*/
10461 PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING = 4,
10462 /** internal bytes forced the encoding to binary
10463*/
10464 PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING = 8,
10465 /** internal bytes forced the encoding to US-ASCII
10466*/
10467 PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING = 16,
10468 /** internal bytes forced the encoding to US-ASCII
10469*/
10470 PM_SYMBOL_FLAGS_LAST = 17,
10471}
10472#[repr(u32)]
10473#[non_exhaustive]
10474/** The levels of errors generated during parsing.
10475*/
10476#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10477pub enum pm_error_level_t {
10478 /** For errors that should raise a syntax error.
10479*/
10480 PM_ERROR_LEVEL_SYNTAX = 0,
10481 /** For errors that should raise an argument error.
10482*/
10483 PM_ERROR_LEVEL_ARGUMENT = 1,
10484 /** For errors that should raise a load error.
10485*/
10486 PM_ERROR_LEVEL_LOAD = 2,
10487}
10488#[repr(u32)]
10489#[non_exhaustive]
10490/** The levels of warnings generated during parsing.
10491*/
10492#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10493pub enum pm_warning_level_t {
10494 /** For warnings which should be emitted if $VERBOSE != nil.
10495*/
10496 PM_WARNING_LEVEL_DEFAULT = 0,
10497 /** For warnings which should be emitted if $VERBOSE == true.
10498*/
10499 PM_WARNING_LEVEL_VERBOSE = 1,
10500}
10501#[repr(u32)]
10502#[non_exhaustive]
10503/** This is the type of a comment that we've found while parsing.
10504*/
10505#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10506pub enum pm_comment_type_t {
10507 PM_COMMENT_INLINE = 0,
10508 PM_COMMENT_EMBDOC = 1,
10509}
10510impl Default for pm_constant_id_list_t {
10511 fn default() -> Self {
10512 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10513 unsafe {
10514 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10515 s.assume_init()
10516 }
10517 }
10518}
10519impl Default for pm_integer_t {
10520 fn default() -> Self {
10521 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10522 unsafe {
10523 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10524 s.assume_init()
10525 }
10526 }
10527}
10528impl Default for pm_string_t {
10529 fn default() -> Self {
10530 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10531 unsafe {
10532 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10533 s.assume_init()
10534 }
10535 }
10536}
10537impl Default for pm_node_list {
10538 fn default() -> Self {
10539 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10540 unsafe {
10541 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10542 s.assume_init()
10543 }
10544 }
10545}
10546impl Default for pm_alias_global_variable_node {
10547 fn default() -> Self {
10548 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10549 unsafe {
10550 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10551 s.assume_init()
10552 }
10553 }
10554}
10555impl Default for pm_alias_method_node {
10556 fn default() -> Self {
10557 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10558 unsafe {
10559 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10560 s.assume_init()
10561 }
10562 }
10563}
10564impl Default for pm_alternation_pattern_node {
10565 fn default() -> Self {
10566 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10567 unsafe {
10568 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10569 s.assume_init()
10570 }
10571 }
10572}
10573impl Default for pm_and_node {
10574 fn default() -> Self {
10575 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10576 unsafe {
10577 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10578 s.assume_init()
10579 }
10580 }
10581}
10582impl Default for pm_arguments_node {
10583 fn default() -> Self {
10584 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10585 unsafe {
10586 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10587 s.assume_init()
10588 }
10589 }
10590}
10591impl Default for pm_array_node {
10592 fn default() -> Self {
10593 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10594 unsafe {
10595 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10596 s.assume_init()
10597 }
10598 }
10599}
10600impl Default for pm_array_pattern_node {
10601 fn default() -> Self {
10602 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10603 unsafe {
10604 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10605 s.assume_init()
10606 }
10607 }
10608}
10609impl Default for pm_assoc_node {
10610 fn default() -> Self {
10611 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10612 unsafe {
10613 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10614 s.assume_init()
10615 }
10616 }
10617}
10618impl Default for pm_assoc_splat_node {
10619 fn default() -> Self {
10620 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10621 unsafe {
10622 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10623 s.assume_init()
10624 }
10625 }
10626}
10627impl Default for pm_begin_node {
10628 fn default() -> Self {
10629 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10630 unsafe {
10631 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10632 s.assume_init()
10633 }
10634 }
10635}
10636impl Default for pm_block_argument_node {
10637 fn default() -> Self {
10638 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10639 unsafe {
10640 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10641 s.assume_init()
10642 }
10643 }
10644}
10645impl Default for pm_block_node {
10646 fn default() -> Self {
10647 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10648 unsafe {
10649 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10650 s.assume_init()
10651 }
10652 }
10653}
10654impl Default for pm_block_parameters_node {
10655 fn default() -> Self {
10656 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10657 unsafe {
10658 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10659 s.assume_init()
10660 }
10661 }
10662}
10663impl Default for pm_break_node {
10664 fn default() -> Self {
10665 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10666 unsafe {
10667 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10668 s.assume_init()
10669 }
10670 }
10671}
10672impl Default for pm_call_and_write_node {
10673 fn default() -> Self {
10674 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10675 unsafe {
10676 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10677 s.assume_init()
10678 }
10679 }
10680}
10681impl Default for pm_call_node {
10682 fn default() -> Self {
10683 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10684 unsafe {
10685 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10686 s.assume_init()
10687 }
10688 }
10689}
10690impl Default for pm_call_operator_write_node {
10691 fn default() -> Self {
10692 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10693 unsafe {
10694 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10695 s.assume_init()
10696 }
10697 }
10698}
10699impl Default for pm_call_or_write_node {
10700 fn default() -> Self {
10701 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10702 unsafe {
10703 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10704 s.assume_init()
10705 }
10706 }
10707}
10708impl Default for pm_call_target_node {
10709 fn default() -> Self {
10710 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10711 unsafe {
10712 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10713 s.assume_init()
10714 }
10715 }
10716}
10717impl Default for pm_capture_pattern_node {
10718 fn default() -> Self {
10719 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10720 unsafe {
10721 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10722 s.assume_init()
10723 }
10724 }
10725}
10726impl Default for pm_case_match_node {
10727 fn default() -> Self {
10728 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10729 unsafe {
10730 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10731 s.assume_init()
10732 }
10733 }
10734}
10735impl Default for pm_case_node {
10736 fn default() -> Self {
10737 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10738 unsafe {
10739 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10740 s.assume_init()
10741 }
10742 }
10743}
10744impl Default for pm_class_node {
10745 fn default() -> Self {
10746 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10747 unsafe {
10748 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10749 s.assume_init()
10750 }
10751 }
10752}
10753impl Default for pm_class_variable_and_write_node {
10754 fn default() -> Self {
10755 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10756 unsafe {
10757 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10758 s.assume_init()
10759 }
10760 }
10761}
10762impl Default for pm_class_variable_operator_write_node {
10763 fn default() -> Self {
10764 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10765 unsafe {
10766 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10767 s.assume_init()
10768 }
10769 }
10770}
10771impl Default for pm_class_variable_or_write_node {
10772 fn default() -> Self {
10773 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10774 unsafe {
10775 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10776 s.assume_init()
10777 }
10778 }
10779}
10780impl Default for pm_class_variable_write_node {
10781 fn default() -> Self {
10782 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10783 unsafe {
10784 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10785 s.assume_init()
10786 }
10787 }
10788}
10789impl Default for pm_constant_and_write_node {
10790 fn default() -> Self {
10791 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10792 unsafe {
10793 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10794 s.assume_init()
10795 }
10796 }
10797}
10798impl Default for pm_constant_operator_write_node {
10799 fn default() -> Self {
10800 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10801 unsafe {
10802 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10803 s.assume_init()
10804 }
10805 }
10806}
10807impl Default for pm_constant_or_write_node {
10808 fn default() -> Self {
10809 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10810 unsafe {
10811 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10812 s.assume_init()
10813 }
10814 }
10815}
10816impl Default for pm_constant_path_and_write_node {
10817 fn default() -> Self {
10818 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10819 unsafe {
10820 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10821 s.assume_init()
10822 }
10823 }
10824}
10825impl Default for pm_constant_path_node {
10826 fn default() -> Self {
10827 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10828 unsafe {
10829 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10830 s.assume_init()
10831 }
10832 }
10833}
10834impl Default for pm_constant_path_operator_write_node {
10835 fn default() -> Self {
10836 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10837 unsafe {
10838 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10839 s.assume_init()
10840 }
10841 }
10842}
10843impl Default for pm_constant_path_or_write_node {
10844 fn default() -> Self {
10845 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10846 unsafe {
10847 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10848 s.assume_init()
10849 }
10850 }
10851}
10852impl Default for pm_constant_path_target_node {
10853 fn default() -> Self {
10854 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10855 unsafe {
10856 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10857 s.assume_init()
10858 }
10859 }
10860}
10861impl Default for pm_constant_path_write_node {
10862 fn default() -> Self {
10863 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10864 unsafe {
10865 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10866 s.assume_init()
10867 }
10868 }
10869}
10870impl Default for pm_constant_write_node {
10871 fn default() -> Self {
10872 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10873 unsafe {
10874 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10875 s.assume_init()
10876 }
10877 }
10878}
10879impl Default for pm_def_node {
10880 fn default() -> Self {
10881 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10882 unsafe {
10883 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10884 s.assume_init()
10885 }
10886 }
10887}
10888impl Default for pm_defined_node {
10889 fn default() -> Self {
10890 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10891 unsafe {
10892 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10893 s.assume_init()
10894 }
10895 }
10896}
10897impl Default for pm_else_node {
10898 fn default() -> Self {
10899 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10900 unsafe {
10901 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10902 s.assume_init()
10903 }
10904 }
10905}
10906impl Default for pm_embedded_statements_node {
10907 fn default() -> Self {
10908 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10909 unsafe {
10910 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10911 s.assume_init()
10912 }
10913 }
10914}
10915impl Default for pm_embedded_variable_node {
10916 fn default() -> Self {
10917 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10918 unsafe {
10919 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10920 s.assume_init()
10921 }
10922 }
10923}
10924impl Default for pm_ensure_node {
10925 fn default() -> Self {
10926 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10927 unsafe {
10928 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10929 s.assume_init()
10930 }
10931 }
10932}
10933impl Default for pm_error_recovery_node {
10934 fn default() -> Self {
10935 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10936 unsafe {
10937 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10938 s.assume_init()
10939 }
10940 }
10941}
10942impl Default for pm_find_pattern_node {
10943 fn default() -> Self {
10944 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10945 unsafe {
10946 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10947 s.assume_init()
10948 }
10949 }
10950}
10951impl Default for pm_flip_flop_node {
10952 fn default() -> Self {
10953 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10954 unsafe {
10955 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10956 s.assume_init()
10957 }
10958 }
10959}
10960impl Default for pm_for_node {
10961 fn default() -> Self {
10962 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10963 unsafe {
10964 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10965 s.assume_init()
10966 }
10967 }
10968}
10969impl Default for pm_forwarding_super_node {
10970 fn default() -> Self {
10971 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10972 unsafe {
10973 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10974 s.assume_init()
10975 }
10976 }
10977}
10978impl Default for pm_global_variable_and_write_node {
10979 fn default() -> Self {
10980 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10981 unsafe {
10982 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10983 s.assume_init()
10984 }
10985 }
10986}
10987impl Default for pm_global_variable_operator_write_node {
10988 fn default() -> Self {
10989 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10990 unsafe {
10991 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10992 s.assume_init()
10993 }
10994 }
10995}
10996impl Default for pm_global_variable_or_write_node {
10997 fn default() -> Self {
10998 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10999 unsafe {
11000 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11001 s.assume_init()
11002 }
11003 }
11004}
11005impl Default for pm_global_variable_write_node {
11006 fn default() -> Self {
11007 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11008 unsafe {
11009 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11010 s.assume_init()
11011 }
11012 }
11013}
11014impl Default for pm_hash_node {
11015 fn default() -> Self {
11016 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11017 unsafe {
11018 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11019 s.assume_init()
11020 }
11021 }
11022}
11023impl Default for pm_hash_pattern_node {
11024 fn default() -> Self {
11025 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11026 unsafe {
11027 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11028 s.assume_init()
11029 }
11030 }
11031}
11032impl Default for pm_if_node {
11033 fn default() -> Self {
11034 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11035 unsafe {
11036 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11037 s.assume_init()
11038 }
11039 }
11040}
11041impl Default for pm_imaginary_node {
11042 fn default() -> Self {
11043 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11044 unsafe {
11045 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11046 s.assume_init()
11047 }
11048 }
11049}
11050impl Default for pm_implicit_node {
11051 fn default() -> Self {
11052 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11053 unsafe {
11054 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11055 s.assume_init()
11056 }
11057 }
11058}
11059impl Default for pm_in_node {
11060 fn default() -> Self {
11061 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11062 unsafe {
11063 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11064 s.assume_init()
11065 }
11066 }
11067}
11068impl Default for pm_index_and_write_node {
11069 fn default() -> Self {
11070 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11071 unsafe {
11072 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11073 s.assume_init()
11074 }
11075 }
11076}
11077impl Default for pm_index_operator_write_node {
11078 fn default() -> Self {
11079 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11080 unsafe {
11081 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11082 s.assume_init()
11083 }
11084 }
11085}
11086impl Default for pm_index_or_write_node {
11087 fn default() -> Self {
11088 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11089 unsafe {
11090 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11091 s.assume_init()
11092 }
11093 }
11094}
11095impl Default for pm_index_target_node {
11096 fn default() -> Self {
11097 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11098 unsafe {
11099 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11100 s.assume_init()
11101 }
11102 }
11103}
11104impl Default for pm_instance_variable_and_write_node {
11105 fn default() -> Self {
11106 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11107 unsafe {
11108 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11109 s.assume_init()
11110 }
11111 }
11112}
11113impl Default for pm_instance_variable_operator_write_node {
11114 fn default() -> Self {
11115 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11116 unsafe {
11117 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11118 s.assume_init()
11119 }
11120 }
11121}
11122impl Default for pm_instance_variable_or_write_node {
11123 fn default() -> Self {
11124 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11125 unsafe {
11126 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11127 s.assume_init()
11128 }
11129 }
11130}
11131impl Default for pm_instance_variable_write_node {
11132 fn default() -> Self {
11133 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11134 unsafe {
11135 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11136 s.assume_init()
11137 }
11138 }
11139}
11140impl Default for pm_integer_node {
11141 fn default() -> Self {
11142 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11143 unsafe {
11144 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11145 s.assume_init()
11146 }
11147 }
11148}
11149impl Default for pm_interpolated_match_last_line_node {
11150 fn default() -> Self {
11151 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11152 unsafe {
11153 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11154 s.assume_init()
11155 }
11156 }
11157}
11158impl Default for pm_interpolated_regular_expression_node {
11159 fn default() -> Self {
11160 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11161 unsafe {
11162 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11163 s.assume_init()
11164 }
11165 }
11166}
11167impl Default for pm_interpolated_string_node {
11168 fn default() -> Self {
11169 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11170 unsafe {
11171 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11172 s.assume_init()
11173 }
11174 }
11175}
11176impl Default for pm_interpolated_symbol_node {
11177 fn default() -> Self {
11178 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11179 unsafe {
11180 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11181 s.assume_init()
11182 }
11183 }
11184}
11185impl Default for pm_interpolated_x_string_node {
11186 fn default() -> Self {
11187 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11188 unsafe {
11189 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11190 s.assume_init()
11191 }
11192 }
11193}
11194impl Default for pm_keyword_hash_node {
11195 fn default() -> Self {
11196 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11197 unsafe {
11198 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11199 s.assume_init()
11200 }
11201 }
11202}
11203impl Default for pm_lambda_node {
11204 fn default() -> Self {
11205 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11206 unsafe {
11207 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11208 s.assume_init()
11209 }
11210 }
11211}
11212impl Default for pm_local_variable_and_write_node {
11213 fn default() -> Self {
11214 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11215 unsafe {
11216 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11217 s.assume_init()
11218 }
11219 }
11220}
11221impl Default for pm_local_variable_operator_write_node {
11222 fn default() -> Self {
11223 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11224 unsafe {
11225 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11226 s.assume_init()
11227 }
11228 }
11229}
11230impl Default for pm_local_variable_or_write_node {
11231 fn default() -> Self {
11232 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11233 unsafe {
11234 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11235 s.assume_init()
11236 }
11237 }
11238}
11239impl Default for pm_local_variable_write_node {
11240 fn default() -> Self {
11241 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11242 unsafe {
11243 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11244 s.assume_init()
11245 }
11246 }
11247}
11248impl Default for pm_match_last_line_node {
11249 fn default() -> Self {
11250 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11251 unsafe {
11252 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11253 s.assume_init()
11254 }
11255 }
11256}
11257impl Default for pm_match_predicate_node {
11258 fn default() -> Self {
11259 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11260 unsafe {
11261 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11262 s.assume_init()
11263 }
11264 }
11265}
11266impl Default for pm_match_required_node {
11267 fn default() -> Self {
11268 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11269 unsafe {
11270 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11271 s.assume_init()
11272 }
11273 }
11274}
11275impl Default for pm_match_write_node {
11276 fn default() -> Self {
11277 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11278 unsafe {
11279 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11280 s.assume_init()
11281 }
11282 }
11283}
11284impl Default for pm_module_node {
11285 fn default() -> Self {
11286 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11287 unsafe {
11288 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11289 s.assume_init()
11290 }
11291 }
11292}
11293impl Default for pm_multi_target_node {
11294 fn default() -> Self {
11295 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11296 unsafe {
11297 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11298 s.assume_init()
11299 }
11300 }
11301}
11302impl Default for pm_multi_write_node {
11303 fn default() -> Self {
11304 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11305 unsafe {
11306 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11307 s.assume_init()
11308 }
11309 }
11310}
11311impl Default for pm_next_node {
11312 fn default() -> Self {
11313 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11314 unsafe {
11315 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11316 s.assume_init()
11317 }
11318 }
11319}
11320impl Default for pm_optional_keyword_parameter_node {
11321 fn default() -> Self {
11322 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11323 unsafe {
11324 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11325 s.assume_init()
11326 }
11327 }
11328}
11329impl Default for pm_optional_parameter_node {
11330 fn default() -> Self {
11331 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11332 unsafe {
11333 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11334 s.assume_init()
11335 }
11336 }
11337}
11338impl Default for pm_or_node {
11339 fn default() -> Self {
11340 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11341 unsafe {
11342 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11343 s.assume_init()
11344 }
11345 }
11346}
11347impl Default for pm_parameters_node {
11348 fn default() -> Self {
11349 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11350 unsafe {
11351 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11352 s.assume_init()
11353 }
11354 }
11355}
11356impl Default for pm_parentheses_node {
11357 fn default() -> Self {
11358 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11359 unsafe {
11360 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11361 s.assume_init()
11362 }
11363 }
11364}
11365impl Default for pm_pinned_expression_node {
11366 fn default() -> Self {
11367 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11368 unsafe {
11369 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11370 s.assume_init()
11371 }
11372 }
11373}
11374impl Default for pm_pinned_variable_node {
11375 fn default() -> Self {
11376 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11377 unsafe {
11378 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11379 s.assume_init()
11380 }
11381 }
11382}
11383impl Default for pm_post_execution_node {
11384 fn default() -> Self {
11385 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11386 unsafe {
11387 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11388 s.assume_init()
11389 }
11390 }
11391}
11392impl Default for pm_pre_execution_node {
11393 fn default() -> Self {
11394 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11395 unsafe {
11396 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11397 s.assume_init()
11398 }
11399 }
11400}
11401impl Default for pm_program_node {
11402 fn default() -> Self {
11403 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11404 unsafe {
11405 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11406 s.assume_init()
11407 }
11408 }
11409}
11410impl Default for pm_range_node {
11411 fn default() -> Self {
11412 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11413 unsafe {
11414 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11415 s.assume_init()
11416 }
11417 }
11418}
11419impl Default for pm_rational_node {
11420 fn default() -> Self {
11421 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11422 unsafe {
11423 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11424 s.assume_init()
11425 }
11426 }
11427}
11428impl Default for pm_regular_expression_node {
11429 fn default() -> Self {
11430 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11431 unsafe {
11432 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11433 s.assume_init()
11434 }
11435 }
11436}
11437impl Default for pm_rescue_modifier_node {
11438 fn default() -> Self {
11439 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11440 unsafe {
11441 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11442 s.assume_init()
11443 }
11444 }
11445}
11446impl Default for pm_rescue_node {
11447 fn default() -> Self {
11448 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11449 unsafe {
11450 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11451 s.assume_init()
11452 }
11453 }
11454}
11455impl Default for pm_return_node {
11456 fn default() -> Self {
11457 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11458 unsafe {
11459 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11460 s.assume_init()
11461 }
11462 }
11463}
11464impl Default for pm_shareable_constant_node {
11465 fn default() -> Self {
11466 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11467 unsafe {
11468 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11469 s.assume_init()
11470 }
11471 }
11472}
11473impl Default for pm_singleton_class_node {
11474 fn default() -> Self {
11475 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11476 unsafe {
11477 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11478 s.assume_init()
11479 }
11480 }
11481}
11482impl Default for pm_source_file_node {
11483 fn default() -> Self {
11484 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11485 unsafe {
11486 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11487 s.assume_init()
11488 }
11489 }
11490}
11491impl Default for pm_splat_node {
11492 fn default() -> Self {
11493 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11494 unsafe {
11495 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11496 s.assume_init()
11497 }
11498 }
11499}
11500impl Default for pm_statements_node {
11501 fn default() -> Self {
11502 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11503 unsafe {
11504 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11505 s.assume_init()
11506 }
11507 }
11508}
11509impl Default for pm_string_node {
11510 fn default() -> Self {
11511 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11512 unsafe {
11513 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11514 s.assume_init()
11515 }
11516 }
11517}
11518impl Default for pm_super_node {
11519 fn default() -> Self {
11520 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11521 unsafe {
11522 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11523 s.assume_init()
11524 }
11525 }
11526}
11527impl Default for pm_symbol_node {
11528 fn default() -> Self {
11529 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11530 unsafe {
11531 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11532 s.assume_init()
11533 }
11534 }
11535}
11536impl Default for pm_undef_node {
11537 fn default() -> Self {
11538 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11539 unsafe {
11540 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11541 s.assume_init()
11542 }
11543 }
11544}
11545impl Default for pm_unless_node {
11546 fn default() -> Self {
11547 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11548 unsafe {
11549 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11550 s.assume_init()
11551 }
11552 }
11553}
11554impl Default for pm_until_node {
11555 fn default() -> Self {
11556 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11557 unsafe {
11558 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11559 s.assume_init()
11560 }
11561 }
11562}
11563impl Default for pm_when_node {
11564 fn default() -> Self {
11565 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11566 unsafe {
11567 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11568 s.assume_init()
11569 }
11570 }
11571}
11572impl Default for pm_while_node {
11573 fn default() -> Self {
11574 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11575 unsafe {
11576 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11577 s.assume_init()
11578 }
11579 }
11580}
11581impl Default for pm_x_string_node {
11582 fn default() -> Self {
11583 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11584 unsafe {
11585 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11586 s.assume_init()
11587 }
11588 }
11589}
11590impl Default for pm_yield_node {
11591 fn default() -> Self {
11592 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11593 unsafe {
11594 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11595 s.assume_init()
11596 }
11597 }
11598}
11599impl Default for pm_line_offset_list_t {
11600 fn default() -> Self {
11601 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11602 unsafe {
11603 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11604 s.assume_init()
11605 }
11606 }
11607}
11608unsafe extern "C" {
11609 /** Returns a newly allocated and initialized arena. If the arena cannot be
11610 allocated, this function aborts the process.
11611
11612 @returns A pointer to the newly allocated arena. It is the responsibility of
11613 the caller to free the arena using pm_arena_free when it is no longer
11614 needed.
11615*/
11616 pub fn pm_arena_new() -> *mut pm_arena_t;
11617 /** Frees both the held memory and the arena itself.
11618
11619 @param arena The arena to free.
11620*/
11621 pub fn pm_arena_free(arena: *mut pm_arena_t);
11622 /** Return a raw pointer to the start of a constant.
11623
11624 @param constant The constant to get the start of.
11625 @returns A raw pointer to the start of the constant.
11626*/
11627 pub fn pm_constant_start(constant: *const pm_constant_t) -> *const u8;
11628 /** Return the length of a constant.
11629
11630 @param constant The constant to get the length of.
11631 @returns The length of the constant.
11632*/
11633 pub fn pm_constant_length(constant: *const pm_constant_t) -> usize;
11634 /** Initialize a constant string that doesn't own its memory source.
11635
11636 @param string The string to initialize.
11637 @param source The source of the string.
11638 @param length The length of the string.
11639*/
11640 pub fn pm_string_constant_init(
11641 string: *mut pm_string_t,
11642 source: *const ::std::os::raw::c_char,
11643 length: usize,
11644 );
11645 /** Returns the length associated with the string.
11646
11647 @param string The string to get the length of.
11648 @returns The length of the string.
11649*/
11650 pub fn pm_string_length(string: *const pm_string_t) -> usize;
11651 /** Returns the start pointer associated with the string.
11652
11653 @param string The string to get the start pointer of.
11654 @returns The start pointer of the string.
11655*/
11656 pub fn pm_string_source(string: *const pm_string_t) -> *const u8;
11657 /** Get the type of the given diagnostic.
11658
11659 @param diagnostic The diagnostic to get the type of.
11660 @returns The type of the given diagnostic. Note that this is a string
11661 representation of an internal ID, and is not meant to be relied upon as a
11662 stable identifier for the diagnostic. We do not guarantee that these will
11663 not change in the future. This is meant to be used for debugging and
11664 error reporting purposes, and not for programmatic checks.
11665*/
11666 pub fn pm_diagnostic_type(
11667 diagnostic: *const pm_diagnostic_t,
11668 ) -> *const ::std::os::raw::c_char;
11669 /** Get the location of the given diagnostic.
11670
11671 @param diagnostic The diagnostic to get the location of.
11672 @returns The location of the given diagnostic.
11673*/
11674 pub fn pm_diagnostic_location(diagnostic: *const pm_diagnostic_t) -> pm_location_t;
11675 /** Get the message of the given diagnostic.
11676
11677 @param diagnostic The diagnostic to get the message of.
11678 @returns The message of the given diagnostic.
11679*/
11680 pub fn pm_diagnostic_message(
11681 diagnostic: *const pm_diagnostic_t,
11682 ) -> *const ::std::os::raw::c_char;
11683 /** Get the error level associated with the given diagnostic.
11684
11685 @param diagnostic The diagnostic to get the error level of.
11686 @returns The error level of the given diagnostic. If the diagnostic was a
11687 warning, or is in any way not an error, then the return value is
11688 undefined and should not be relied upon.
11689*/
11690 pub fn pm_diagnostic_error_level(
11691 diagnostic: *const pm_diagnostic_t,
11692 ) -> pm_error_level_t;
11693 /** Get the warning level associated with the given diagnostic.
11694
11695 @param diagnostic The diagnostic to get the warning level of.
11696 @returns The warning level of the given diagnostic. If the diagnostic was an
11697 error, or is in any way not a warning, then the return value is
11698 undefined and should not be relied upon.
11699*/
11700 pub fn pm_diagnostic_warning_level(
11701 diagnostic: *const pm_diagnostic_t,
11702 ) -> pm_warning_level_t;
11703 /** Returns the location associated with the given comment.
11704
11705 @param comment the comment whose location we want to get
11706 @returns the location associated with the given comment
11707*/
11708 pub fn pm_comment_location(comment: *const pm_comment_t) -> pm_location_t;
11709 /** Returns the type associated with the given comment.
11710
11711 @param comment the comment whose type we want to get
11712 @returns the type associated with the given comment. This can either be
11713 PM_COMMENT_INLINE or PM_COMMENT_EMBDOC.
11714*/
11715 pub fn pm_comment_type(comment: *const pm_comment_t) -> pm_comment_type_t;
11716 /** Returns the line and column of the given offset. If the offset is not in the
11717 list, the line and column of the closest offset less than the given offset
11718 are returned.
11719
11720 @param list The list to search.
11721 @param cursor The offset to search for.
11722 @param start_line The line to start counting from.
11723 @returns The line and column of the given offset.
11724*/
11725 pub fn pm_line_offset_list_line_column(
11726 list: *const pm_line_offset_list_t,
11727 cursor: u32,
11728 start_line: i32,
11729 ) -> pm_line_column_t;
11730 /** Returns the location of the key associated with the given magic comment.
11731
11732 @param magic_comment the magic comment whose key location we want to get
11733 @returns the location of the key associated with the given magic comment
11734*/
11735 pub fn pm_magic_comment_key(
11736 magic_comment: *const pm_magic_comment_t,
11737 ) -> pm_location_t;
11738 /** Returns the location of the value associated with the given magic comment.
11739
11740 @param magic_comment the magic comment whose value location we want to get
11741 @returns the location of the value associated with the given magic comment
11742*/
11743 pub fn pm_magic_comment_value(
11744 magic_comment: *const pm_magic_comment_t,
11745 ) -> pm_location_t;
11746 /** Allocate a new options struct. If the options struct cannot be allocated,
11747 this function aborts the process.
11748
11749 @returns A new options struct with default values. It is the responsibility
11750 of the caller to free this struct using pm_options_free().
11751*/
11752 pub fn pm_options_new() -> *mut pm_options_t;
11753 /** Free both the held memory of the given options struct and the struct itself.
11754
11755 @param options The options struct to free.
11756*/
11757 pub fn pm_options_free(options: *mut pm_options_t);
11758 /** Set the filepath option on the given options struct.
11759
11760 @param options The options struct to set the filepath on.
11761 @param filepath The filepath to set.
11762*/
11763 pub fn pm_options_filepath_set(
11764 options: *mut pm_options_t,
11765 filepath: *const ::std::os::raw::c_char,
11766 );
11767 /** Set the line option on the given options struct.
11768
11769 @param options The options struct to set the line on.
11770 @param line The line to set.
11771*/
11772 pub fn pm_options_line_set(options: *mut pm_options_t, line: i32);
11773 /** Set the encoding option on the given options struct.
11774
11775 @param options The options struct to set the encoding on.
11776 @param encoding The encoding to set.
11777*/
11778 pub fn pm_options_encoding_set(
11779 options: *mut pm_options_t,
11780 encoding: *const ::std::os::raw::c_char,
11781 );
11782 /** Set the encoding_locked option on the given options struct.
11783
11784 @param options The options struct to set the encoding_locked value on.
11785 @param encoding_locked The encoding_locked value to set.
11786*/
11787 pub fn pm_options_encoding_locked_set(
11788 options: *mut pm_options_t,
11789 encoding_locked: bool,
11790 );
11791 /** Set the frozen string literal option on the given options struct.
11792
11793 @param options The options struct to set the frozen string literal value on.
11794 @param frozen_string_literal The frozen string literal value to set.
11795*/
11796 pub fn pm_options_frozen_string_literal_set(
11797 options: *mut pm_options_t,
11798 frozen_string_literal: bool,
11799 );
11800 /** Sets the command line option on the given options struct.
11801
11802 @param options The options struct to set the command line option on.
11803 @param command_line The command_line value to set.
11804*/
11805 pub fn pm_options_command_line_set(options: *mut pm_options_t, command_line: u8);
11806 /** Set the version option on the given options struct by parsing the given
11807 string. If the string contains an invalid option, this returns false.
11808 Otherwise, it returns true.
11809
11810 @param options The options struct to set the version on.
11811 @param version The version to set.
11812 @param length The length of the version string.
11813 @returns Whether or not the version was parsed successfully.
11814*/
11815 pub fn pm_options_version_set(
11816 options: *mut pm_options_t,
11817 version: *const ::std::os::raw::c_char,
11818 length: usize,
11819 ) -> bool;
11820 /** Set the main script option on the given options struct.
11821
11822 @param options The options struct to set the main script value on.
11823 @param main_script The main script value to set.
11824*/
11825 pub fn pm_options_main_script_set(options: *mut pm_options_t, main_script: bool);
11826 /** Set the partial script option on the given options struct.
11827
11828 @param options The options struct to set the partial script value on.
11829 @param partial_script The partial script value to set.
11830*/
11831 pub fn pm_options_partial_script_set(
11832 options: *mut pm_options_t,
11833 partial_script: bool,
11834 );
11835 /** Allocate and zero out the scopes array on the given options struct.
11836
11837 @param options The options struct to initialize the scopes array on.
11838 @param scopes_count The number of scopes to allocate.
11839 @returns Whether or not the scopes array was initialized successfully.
11840*/
11841 pub fn pm_options_scopes_init(
11842 options: *mut pm_options_t,
11843 scopes_count: usize,
11844 ) -> bool;
11845 /** Return a mutable pointer to the scope at the given index within the given
11846 options.
11847
11848 @param options The options struct to get the scope from.
11849 @param index The index of the scope to get.
11850 @returns A mutable pointer to the scope at the given index.
11851*/
11852 pub fn pm_options_scope_mut(
11853 options: *mut pm_options_t,
11854 index: usize,
11855 ) -> *mut pm_options_scope_t;
11856 /** Create a new options scope struct. This will hold a set of locals that are in
11857 scope surrounding the code that is being parsed. If the scope was unable to
11858 allocate its locals, this function will abort the process.
11859
11860 @param scope The scope struct to initialize.
11861 @param locals_count The number of locals to allocate.
11862*/
11863 pub fn pm_options_scope_init(scope: *mut pm_options_scope_t, locals_count: usize);
11864 /** Return a mutable pointer to the local at the given index within the given
11865 scope.
11866
11867 @param scope The scope struct to get the local from.
11868 @param index The index of the local to get.
11869 @returns A mutable pointer to the local at the given index.
11870*/
11871 pub fn pm_options_scope_local_mut(
11872 scope: *mut pm_options_scope_t,
11873 index: usize,
11874 ) -> *mut pm_string_t;
11875 /** Set the forwarding option on the given scope struct.
11876
11877 @param scope The scope struct to set the forwarding on.
11878 @param forwarding The forwarding value to set.
11879*/
11880 pub fn pm_options_scope_forwarding_set(
11881 scope: *mut pm_options_scope_t,
11882 forwarding: u8,
11883 );
11884 /** Allocate and initialize a parser with the given start and end pointers.
11885
11886 @param arena The arena to use for all AST-lifetime allocations. It is caller-
11887 owned and must outlive the parser.
11888 @param source The source to parse.
11889 @param size The size of the source.
11890 @param options The optional options to use when parsing. These options must
11891 live for the whole lifetime of this parser.
11892 @returns The initialized parser. It is the responsibility of the caller to
11893 free the parser with `pm_parser_free()`.
11894*/
11895 pub fn pm_parser_new(
11896 arena: *mut pm_arena_t,
11897 source: *const u8,
11898 size: usize,
11899 options: *const pm_options_t,
11900 ) -> *mut pm_parser_t;
11901 /** Free both the memory held by the given parser and the parser itself.
11902
11903 @param parser The parser to free.
11904*/
11905 pub fn pm_parser_free(parser: *mut pm_parser_t);
11906 /** Returns the raw pointer to the start of the source that is being parsed.
11907
11908 @param parser the parser whose start pointer we want to get
11909 @returns the raw pointer to the start of the source that is being parsed
11910*/
11911 pub fn pm_parser_start(parser: *const pm_parser_t) -> *const u8;
11912 /** Returns the line that the parser was considered to have started on.
11913
11914 @param parser the parser whose start line we want to get
11915 @returns the line that the parser was considered to have started on
11916*/
11917 pub fn pm_parser_start_line(parser: *const pm_parser_t) -> i32;
11918 /** Returns the frozen string literal value of the parser, as determined by the
11919 frozen_string_literal magic comment or the option set on the parser.
11920
11921 @param parser the parser whose frozen string literal value we want to get
11922 @returns -1 if disabled, 0 if unset, 1 if enabled
11923*/
11924 pub fn pm_parser_frozen_string_literal(parser: *const pm_parser_t) -> i8;
11925 /** Returns the line offsets that are associated with the given parser.
11926
11927 @param parser the parser whose line offsets we want to get
11928 @returns the line offsets that are associated with the given parser
11929*/
11930 pub fn pm_parser_line_offsets(
11931 parser: *const pm_parser_t,
11932 ) -> *const pm_line_offset_list_t;
11933 /** Returns the location of the __DATA__ section that is associated with the
11934 given parser.
11935
11936 @param parser the parser whose data location we want to get
11937 @returns the location of the __DATA__ section that is associated with the
11938 given parser. If it is unset, then the length will be set to 0.
11939*/
11940 pub fn pm_parser_data_loc(parser: *const pm_parser_t) -> *const pm_location_t;
11941 /** Returns the number of comments associated with the given parser.
11942
11943 @param parser the parser whose comments we want to get the size of
11944 @returns the number of comments associated with the given parser
11945*/
11946 pub fn pm_parser_comments_size(parser: *const pm_parser_t) -> usize;
11947 /** Iterates over the comments associated with the given parser and calls the
11948 given callback for each comment.
11949
11950 @param parser the parser whose comments we want to iterate over
11951 @param callback the callback function to call for each comment. This function
11952 will be passed a pointer to the comment and the data parameter passed to
11953 this function.
11954 @param data the data to pass to the callback function for each comment. This
11955 can be NULL if no data needs to be passed to the callback function.
11956*/
11957 pub fn pm_parser_comments_each(
11958 parser: *const pm_parser_t,
11959 callback: pm_comment_callback_t,
11960 data: *mut ::std::os::raw::c_void,
11961 );
11962 /** Returns the number of magic comments associated with the given parser.
11963
11964 @param parser the parser whose magic comments we want to get the size of
11965 @returns the number of magic comments associated with the given parser
11966*/
11967 pub fn pm_parser_magic_comments_size(parser: *const pm_parser_t) -> usize;
11968 /** Iterates over the magic comments associated with the given parser and calls the
11969 given callback for each magic comment.
11970
11971 @param parser the parser whose magic comments we want to iterate over
11972 @param callback the callback function to call for each magic comment. This
11973 function will be passed a pointer to the magic comment and the data
11974 parameter passed to this function.
11975 @param data the data to pass to the callback function for each magic comment.
11976 This can be NULL if no data needs to be passed to the callback function.
11977*/
11978 pub fn pm_parser_magic_comments_each(
11979 parser: *const pm_parser_t,
11980 callback: pm_magic_comment_callback_t,
11981 data: *mut ::std::os::raw::c_void,
11982 );
11983 /** Returns the number of errors associated with the given parser.
11984
11985 @param parser the parser whose errors we want to get the size of
11986 @returns the number of errors associated with the given parser
11987*/
11988 pub fn pm_parser_errors_size(parser: *const pm_parser_t) -> usize;
11989 /** Returns the number of warnings associated with the given parser.
11990
11991 @param parser the parser whose warnings we want to get the size of
11992 @returns the number of warnings associated with the given parser
11993*/
11994 pub fn pm_parser_warnings_size(parser: *const pm_parser_t) -> usize;
11995 /** Iterates over the errors associated with the given parser and calls the
11996 given callback for each error.
11997
11998 @param parser the parser whose errors we want to iterate over
11999 @param callback the callback function to call for each error. This function
12000 will be passed a pointer to the error and the data parameter passed to
12001 this function.
12002 @param data the data to pass to the callback function for each error. This
12003 can be NULL if no data needs to be passed to the callback function.
12004*/
12005 pub fn pm_parser_errors_each(
12006 parser: *const pm_parser_t,
12007 callback: pm_diagnostic_callback_t,
12008 data: *mut ::std::os::raw::c_void,
12009 );
12010 /** Iterates over the warnings associated with the given parser and calls the
12011 given callback for each warning.
12012
12013 @param parser the parser whose warnings we want to iterate over
12014 @param callback the callback function to call for each warning. This function
12015 will be passed a pointer to the warning and the data parameter passed to
12016 this function.
12017 @param data the data to pass to the callback function for each warning. This
12018 can be NULL if no data needs to be passed to the callback function.
12019*/
12020 pub fn pm_parser_warnings_each(
12021 parser: *const pm_parser_t,
12022 callback: pm_diagnostic_callback_t,
12023 data: *mut ::std::os::raw::c_void,
12024 );
12025 /** Returns the number of constants in the constant pool associated with the
12026 given parser.
12027
12028 @param parser the parser whose constant pool constants we want to get the
12029 size of
12030 @returns the number of constants in the constant pool associated with the
12031 given parser
12032*/
12033 pub fn pm_parser_constants_size(parser: *const pm_parser_t) -> usize;
12034 /** Iterates over the constants in the constant pool associated with the given
12035 parser and calls the given callback for each constant.
12036
12037 @param parser the parser whose constants we want to iterate over
12038 @param callback the callback function to call for each constant. This function
12039 will be passed a pointer to the constant and the data parameter passed to
12040 this function.
12041 @param data the data to pass to the callback function for each constant. This
12042 can be NULL if no data needs to be passed to the callback function.
12043*/
12044 pub fn pm_parser_constants_each(
12045 parser: *const pm_parser_t,
12046 callback: pm_constant_callback_t,
12047 data: *mut ::std::os::raw::c_void,
12048 );
12049 /** Returns a pointer to the constant at the given id in the constant pool
12050 associated with the given parser.
12051
12052 @param parser the parser whose constant pool we want to look up from
12053 @param constant_id the id of the constant to look up (1-based)
12054 @returns a pointer to the constant at the given id
12055*/
12056 pub fn pm_parser_constant(
12057 parser: *const pm_parser_t,
12058 constant_id: pm_constant_id_t,
12059 ) -> *const pm_constant_t;
12060 /** Initiate the parser with the given parser.
12061
12062 @param parser The parser to use.
12063 @returns The AST representing the source.
12064*/
12065 pub fn pm_parse(parser: *mut pm_parser_t) -> *mut pm_node_t;
12066 /** The prism version and the serialization format.
12067
12068 @returns The prism version as a constant string.
12069*/
12070 pub fn pm_version() -> *const ::std::os::raw::c_char;
12071}