include/prism/ast.h in prism-1.0.0 vs include/prism/ast.h in prism-1.1.0

- old
+ new

@@ -1098,18 +1098,19 @@ * Represents the use of the `alias` keyword to alias a global variable. * * alias $foo $bar * ^^^^^^^^^^^^^^^ * - * Type: PM_ALIAS_GLOBAL_VARIABLE_NODE + * Type: ::PM_ALIAS_GLOBAL_VARIABLE_NODE * * @extends pm_node_t */ typedef struct pm_alias_global_variable_node { /** The embedded base node. */ pm_node_t base; + /** * AliasGlobalVariableNode#new_name * * Represents the new name of the global variable that can be used after aliasing. * @@ -1145,25 +1146,48 @@ * Represents the use of the `alias` keyword to alias a method. * * alias foo bar * ^^^^^^^^^^^^^ * - * Type: PM_ALIAS_METHOD_NODE + * Type: ::PM_ALIAS_METHOD_NODE * * @extends pm_node_t */ typedef struct pm_alias_method_node { /** The embedded base node. */ pm_node_t base; + /** * AliasMethodNode#new_name + * + * Represents the new name of the method that will be aliased. + * + * alias foo bar + * ^^^ + * + * alias :foo :bar + * ^^^^ + * + * alias :"#{foo}" :"#{bar}" + * ^^^^^^^^^ */ struct pm_node *new_name; /** * AliasMethodNode#old_name + * + * Represents the old name of the method that will be aliased. + * + * alias foo bar + * ^^^ + * + * alias :foo :bar + * ^^^^ + * + * alias :"#{foo}" :"#{bar}" + * ^^^^^^^^^ */ struct pm_node *old_name; /** * AliasMethodNode#keyword_loc @@ -1177,30 +1201,46 @@ * Represents an alternation pattern in pattern matching. * * foo => bar | baz * ^^^^^^^^^ * - * Type: PM_ALTERNATION_PATTERN_NODE + * Type: ::PM_ALTERNATION_PATTERN_NODE * * @extends pm_node_t */ typedef struct pm_alternation_pattern_node { /** The embedded base node. */ pm_node_t base; + /** * AlternationPatternNode#left + * + * Represents the left side of the expression. + * + * foo => bar | baz + * ^^^ */ struct pm_node *left; /** * AlternationPatternNode#right + * + * Represents the right side of the expression. + * + * foo => bar | baz + * ^^^ */ struct pm_node *right; /** * AlternationPatternNode#operator_loc + * + * Represents the alternation operator location. + * + * foo => bar | baz + * ^ */ pm_location_t operator_loc; } pm_alternation_pattern_node_t; /** @@ -1209,18 +1249,19 @@ * Represents the use of the `&&` operator or the `and` keyword. * * left and right * ^^^^^^^^^^^^^^ * - * Type: PM_AND_NODE + * Type: ::PM_AND_NODE * * @extends pm_node_t */ typedef struct pm_and_node { /** The embedded base node. */ pm_node_t base; + /** * AndNode#left * * 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). * @@ -1233,11 +1274,11 @@ struct pm_node *left; /** * AndNode#right * - * Represents the right 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). + * Represents the right side of the expression. * * left && right * ^^^^^ * * 1 and 2 @@ -1262,22 +1303,26 @@ * Represents a set of arguments to a method or a keyword. * * return foo, bar, baz * ^^^^^^^^^^^^^ * - * Type: PM_ARGUMENTS_NODE - * Flags: - * PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS - * PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT - * PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT + * Type: ::PM_ARGUMENTS_NODE + + * Flags (#pm_arguments_node_flags): + * * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING + * * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS + * * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT + * * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT + * * ::PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS * * @extends pm_node_t */ typedef struct pm_arguments_node { /** The embedded base node. */ pm_node_t base; + /** * ArgumentsNode#arguments */ struct pm_node_list arguments; } pm_arguments_node_t; @@ -1288,20 +1333,22 @@ * Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. * * [1, 2, 3] * ^^^^^^^^^ * - * Type: PM_ARRAY_NODE - * Flags: - * PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT + * Type: ::PM_ARRAY_NODE + + * Flags (#pm_array_node_flags): + * * ::PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT * * @extends pm_node_t */ typedef struct pm_array_node { /** The embedded base node. */ pm_node_t base; + /** * ArrayNode#elements * * 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. */ @@ -1350,18 +1397,19 @@ * ^^^^^^^^^^^^ * * foo in Bar[1, 2, 3] * ^^^^^^^^^^^^^^^^^^^ * - * Type: PM_ARRAY_PATTERN_NODE + * Type: ::PM_ARRAY_PATTERN_NODE * * @extends pm_node_t */ typedef struct pm_array_pattern_node { /** The embedded base node. */ pm_node_t base; + /** * ArrayPatternNode#constant */ struct pm_node *constant; @@ -1397,18 +1445,19 @@ * Represents a hash key/value pair. * * { a => b } * ^^^^^^ * - * Type: PM_ASSOC_NODE + * Type: ::PM_ASSOC_NODE * * @extends pm_node_t */ typedef struct pm_assoc_node { /** The embedded base node. */ pm_node_t base; + /** * AssocNode#key * * 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). * @@ -1453,18 +1502,19 @@ * Represents a splat in a hash literal. * * { **foo } * ^^^^^ * - * Type: PM_ASSOC_SPLAT_NODE + * Type: ::PM_ASSOC_SPLAT_NODE * * @extends pm_node_t */ typedef struct pm_assoc_splat_node { /** The embedded base node. */ pm_node_t base; + /** * AssocSplatNode#value * * The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. * @@ -1490,18 +1540,19 @@ * Represents reading a reference to a field in the previous match. * * $' * ^^ * - * Type: PM_BACK_REFERENCE_READ_NODE + * Type: ::PM_BACK_REFERENCE_READ_NODE * * @extends pm_node_t */ typedef struct pm_back_reference_read_node { /** The embedded base node. */ pm_node_t base; + /** * BackReferenceReadNode#name * * The name of the back-reference variable, including the leading `$`. * @@ -1520,18 +1571,19 @@ * begin * foo * end * ^^^^^ * - * Type: PM_BEGIN_NODE + * Type: ::PM_BEGIN_NODE * * @extends pm_node_t */ typedef struct pm_begin_node { /** The embedded base node. */ pm_node_t base; + /** * BeginNode#begin_keyword_loc */ pm_location_t begin_keyword_loc; @@ -1567,18 +1619,19 @@ * Represents a block argument using `&`. * * bar(&args) * ^^^^^^^^^^ * - * Type: PM_BLOCK_ARGUMENT_NODE + * Type: ::PM_BLOCK_ARGUMENT_NODE * * @extends pm_node_t */ typedef struct pm_block_argument_node { /** The embedded base node. */ pm_node_t base; + /** * BlockArgumentNode#expression */ struct pm_node *expression; @@ -1594,20 +1647,22 @@ * Represents a block local variable. * * a { |; b| } * ^ * - * Type: PM_BLOCK_LOCAL_VARIABLE_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_BLOCK_LOCAL_VARIABLE_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_block_local_variable_node { /** The embedded base node. */ pm_node_t base; + /** * BlockLocalVariableNode#name */ pm_constant_id_t name; } pm_block_local_variable_node_t; @@ -1618,18 +1673,19 @@ * Represents a block of ruby code. * * [1, 2, 3].each { |i| puts x } * ^^^^^^^^^^^^^^ * - * Type: PM_BLOCK_NODE + * Type: ::PM_BLOCK_NODE * * @extends pm_node_t */ typedef struct pm_block_node { /** The embedded base node. */ pm_node_t base; + /** * BlockNode#locals */ pm_constant_id_list_t locals; @@ -1661,20 +1717,22 @@ * * def a(&b) * ^^ * end * - * Type: PM_BLOCK_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_BLOCK_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_block_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * BlockParameterNode#name */ pm_constant_id_t name; @@ -1699,18 +1757,19 @@ * * foo do |a, b = 1; local| * ^^^^^^^^^^^^^^^^^ * end * - * Type: PM_BLOCK_PARAMETERS_NODE + * Type: ::PM_BLOCK_PARAMETERS_NODE * * @extends pm_node_t */ typedef struct pm_block_parameters_node { /** The embedded base node. */ pm_node_t base; + /** * BlockParametersNode#parameters */ struct pm_parameters_node *parameters; @@ -1736,18 +1795,19 @@ * Represents the use of the `break` keyword. * * break foo * ^^^^^^^^^ * - * Type: PM_BREAK_NODE + * Type: ::PM_BREAK_NODE * * @extends pm_node_t */ typedef struct pm_break_node { /** The embedded base node. */ pm_node_t base; + /** * BreakNode#arguments * * 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). * @@ -1773,23 +1833,25 @@ * Represents the use of the `&&=` operator on a call. * * foo.bar &&= value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_CALL_AND_WRITE_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_CALL_AND_WRITE_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_call_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * CallAndWriteNode#receiver */ struct pm_node *receiver; @@ -1845,23 +1907,25 @@ * ^^^^^^^ * * foo&.bar * ^^^^^^^^ * - * Type: PM_CALL_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_CALL_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_call_node { /** The embedded base node. */ pm_node_t base; + /** * CallNode#receiver * * 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). * @@ -1918,23 +1982,25 @@ * Represents the use of an assignment operator on a call. * * foo.bar += baz * ^^^^^^^^^^^^^^ * - * Type: PM_CALL_OPERATOR_WRITE_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_CALL_OPERATOR_WRITE_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_call_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * CallOperatorWriteNode#receiver */ struct pm_node *receiver; @@ -1980,23 +2046,25 @@ * Represents the use of the `||=` operator on a call. * * foo.bar ||= value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_CALL_OR_WRITE_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_CALL_OR_WRITE_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_call_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * CallOrWriteNode#receiver */ struct pm_node *receiver; @@ -2045,23 +2113,25 @@ * end * * for foo.bar in baz do end * ^^^^^^^ * - * Type: PM_CALL_TARGET_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_CALL_TARGET_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_call_target_node { /** The embedded base node. */ pm_node_t base; + /** * CallTargetNode#receiver */ struct pm_node *receiver; @@ -2087,27 +2157,28 @@ * Represents assigning to a local variable in pattern matching. * * foo => [bar => baz] * ^^^^^^^^^^^^ * - * Type: PM_CAPTURE_PATTERN_NODE + * Type: ::PM_CAPTURE_PATTERN_NODE * * @extends pm_node_t */ typedef struct pm_capture_pattern_node { /** The embedded base node. */ pm_node_t base; + /** * CapturePatternNode#value */ struct pm_node *value; /** * CapturePatternNode#target */ - struct pm_node *target; + struct pm_local_variable_target_node *target; /** * CapturePatternNode#operator_loc */ pm_location_t operator_loc; @@ -2121,18 +2192,19 @@ * case true * in false * end * ^^^^^^^^^ * - * Type: PM_CASE_MATCH_NODE + * Type: ::PM_CASE_MATCH_NODE * * @extends pm_node_t */ typedef struct pm_case_match_node { /** The embedded base node. */ pm_node_t base; + /** * CaseMatchNode#predicate */ struct pm_node *predicate; @@ -2165,18 +2237,19 @@ * case true * when false * end * ^^^^^^^^^^ * - * Type: PM_CASE_NODE + * Type: ::PM_CASE_NODE * * @extends pm_node_t */ typedef struct pm_case_node { /** The embedded base node. */ pm_node_t base; + /** * CaseNode#predicate */ struct pm_node *predicate; @@ -2207,18 +2280,19 @@ * Represents a class declaration involving the `class` keyword. * * class Foo end * ^^^^^^^^^^^^^ * - * Type: PM_CLASS_NODE + * Type: ::PM_CLASS_NODE * * @extends pm_node_t */ typedef struct pm_class_node { /** The embedded base node. */ pm_node_t base; + /** * ClassNode#locals */ pm_constant_id_list_t locals; @@ -2264,18 +2338,19 @@ * Represents the use of the `&&=` operator for assignment to a class variable. * * @@target &&= value * ^^^^^^^^^^^^^^^^^^ * - * Type: PM_CLASS_VARIABLE_AND_WRITE_NODE + * Type: ::PM_CLASS_VARIABLE_AND_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_class_variable_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * ClassVariableAndWriteNode#name */ pm_constant_id_t name; @@ -2301,18 +2376,19 @@ * Represents assigning to a class variable using an operator that isn't `=`. * * @@target += value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE + * Type: ::PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_class_variable_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * ClassVariableOperatorWriteNode#name */ pm_constant_id_t name; @@ -2343,18 +2419,19 @@ * Represents the use of the `||=` operator for assignment to a class variable. * * @@target ||= value * ^^^^^^^^^^^^^^^^^^ * - * Type: PM_CLASS_VARIABLE_OR_WRITE_NODE + * Type: ::PM_CLASS_VARIABLE_OR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_class_variable_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * ClassVariableOrWriteNode#name */ pm_constant_id_t name; @@ -2380,18 +2457,19 @@ * Represents referencing a class variable. * * @@foo * ^^^^^ * - * Type: PM_CLASS_VARIABLE_READ_NODE + * Type: ::PM_CLASS_VARIABLE_READ_NODE * * @extends pm_node_t */ typedef struct pm_class_variable_read_node { /** The embedded base node. */ pm_node_t base; + /** * ClassVariableReadNode#name * * 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). * @@ -2408,18 +2486,19 @@ * Represents writing to a class variable in a context that doesn't have an explicit value. * * @@foo, @@bar = baz * ^^^^^ ^^^^^ * - * Type: PM_CLASS_VARIABLE_TARGET_NODE + * Type: ::PM_CLASS_VARIABLE_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_class_variable_target_node { /** The embedded base node. */ pm_node_t base; + /** * ClassVariableTargetNode#name */ pm_constant_id_t name; } pm_class_variable_target_node_t; @@ -2430,18 +2509,19 @@ * Represents writing to a class variable. * * @@foo = 1 * ^^^^^^^^^ * - * Type: PM_CLASS_VARIABLE_WRITE_NODE + * Type: ::PM_CLASS_VARIABLE_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_class_variable_write_node { /** The embedded base node. */ pm_node_t base; + /** * ClassVariableWriteNode#name * * 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). * @@ -2491,18 +2571,19 @@ * Represents the use of the `&&=` operator for assignment to a constant. * * Target &&= value * ^^^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_AND_WRITE_NODE + * Type: ::PM_CONSTANT_AND_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantAndWriteNode#name */ pm_constant_id_t name; @@ -2528,18 +2609,19 @@ * Represents assigning to a constant using an operator that isn't `=`. * * Target += value * ^^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_OPERATOR_WRITE_NODE + * Type: ::PM_CONSTANT_OPERATOR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantOperatorWriteNode#name */ pm_constant_id_t name; @@ -2570,18 +2652,19 @@ * Represents the use of the `||=` operator for assignment to a constant. * * Target ||= value * ^^^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_OR_WRITE_NODE + * Type: ::PM_CONSTANT_OR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantOrWriteNode#name */ pm_constant_id_t name; @@ -2607,18 +2690,19 @@ * Represents the use of the `&&=` operator for assignment to a constant path. * * Parent::Child &&= value * ^^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_PATH_AND_WRITE_NODE + * Type: ::PM_CONSTANT_PATH_AND_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_path_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantPathAndWriteNode#target */ struct pm_constant_path_node *target; @@ -2639,18 +2723,19 @@ * Represents accessing a constant through a path of `::` operators. * * Foo::Bar * ^^^^^^^^ * - * Type: PM_CONSTANT_PATH_NODE + * Type: ::PM_CONSTANT_PATH_NODE * * @extends pm_node_t */ typedef struct pm_constant_path_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantPathNode#parent * * 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. * @@ -2705,18 +2790,19 @@ * Represents assigning to a constant path using an operator that isn't `=`. * * Parent::Child += value * ^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_PATH_OPERATOR_WRITE_NODE + * Type: ::PM_CONSTANT_PATH_OPERATOR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_path_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantPathOperatorWriteNode#target */ struct pm_constant_path_node *target; @@ -2742,18 +2828,19 @@ * Represents the use of the `||=` operator for assignment to a constant path. * * Parent::Child ||= value * ^^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_PATH_OR_WRITE_NODE + * Type: ::PM_CONSTANT_PATH_OR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_path_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantPathOrWriteNode#target */ struct pm_constant_path_node *target; @@ -2774,18 +2861,19 @@ * Represents writing to a constant path in a context that doesn't have an explicit value. * * Foo::Foo, Bar::Bar = baz * ^^^^^^^^ ^^^^^^^^ * - * Type: PM_CONSTANT_PATH_TARGET_NODE + * Type: ::PM_CONSTANT_PATH_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_constant_path_target_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantPathTargetNode#parent */ struct pm_node *parent; @@ -2817,18 +2905,19 @@ * ^^^^^^^^^^^^ * * ::Foo::Bar = 1 * ^^^^^^^^^^^^^^ * - * Type: PM_CONSTANT_PATH_WRITE_NODE + * Type: ::PM_CONSTANT_PATH_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_path_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantPathWriteNode#target * * A node representing the constant path being written to. * @@ -2867,18 +2956,19 @@ * Represents referencing a constant. * * Foo * ^^^ * - * Type: PM_CONSTANT_READ_NODE + * Type: ::PM_CONSTANT_READ_NODE * * @extends pm_node_t */ typedef struct pm_constant_read_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantReadNode#name * * The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). * @@ -2895,18 +2985,19 @@ * Represents writing to a constant in a context that doesn't have an explicit value. * * Foo, Bar = baz * ^^^ ^^^ * - * Type: PM_CONSTANT_TARGET_NODE + * Type: ::PM_CONSTANT_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_constant_target_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantTargetNode#name */ pm_constant_id_t name; } pm_constant_target_node_t; @@ -2917,18 +3008,19 @@ * Represents writing to a constant. * * Foo = 1 * ^^^^^^^ * - * Type: PM_CONSTANT_WRITE_NODE + * Type: ::PM_CONSTANT_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_constant_write_node { /** The embedded base node. */ pm_node_t base; + /** * ConstantWriteNode#name * * The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). * @@ -2979,18 +3071,19 @@ * * def method * end * ^^^^^^^^^^ * - * Type: PM_DEF_NODE + * Type: ::PM_DEF_NODE * * @extends pm_node_t */ typedef struct pm_def_node { /** The embedded base node. */ pm_node_t base; + /** * DefNode#name */ pm_constant_id_t name; @@ -3056,18 +3149,19 @@ * Represents the use of the `defined?` keyword. * * defined?(a) * ^^^^^^^^^^^ * - * Type: PM_DEFINED_NODE + * Type: ::PM_DEFINED_NODE * * @extends pm_node_t */ typedef struct pm_defined_node { /** The embedded base node. */ pm_node_t base; + /** * DefinedNode#lparen_loc */ pm_location_t lparen_loc; @@ -3093,18 +3187,19 @@ * Represents an `else` clause in a `case`, `if`, or `unless` statement. * * if a then b else c end * ^^^^^^^^^^ * - * Type: PM_ELSE_NODE + * Type: ::PM_ELSE_NODE * * @extends pm_node_t */ typedef struct pm_else_node { /** The embedded base node. */ pm_node_t base; + /** * ElseNode#else_keyword_loc */ pm_location_t else_keyword_loc; @@ -3125,18 +3220,19 @@ * Represents an interpolated set of statements. * * "foo #{bar}" * ^^^^^^ * - * Type: PM_EMBEDDED_STATEMENTS_NODE + * Type: ::PM_EMBEDDED_STATEMENTS_NODE * * @extends pm_node_t */ typedef struct pm_embedded_statements_node { /** The embedded base node. */ pm_node_t base; + /** * EmbeddedStatementsNode#opening_loc */ pm_location_t opening_loc; @@ -3157,18 +3253,19 @@ * Represents an interpolated variable. * * "foo #@bar" * ^^^^^ * - * Type: PM_EMBEDDED_VARIABLE_NODE + * Type: ::PM_EMBEDDED_VARIABLE_NODE * * @extends pm_node_t */ typedef struct pm_embedded_variable_node { /** The embedded base node. */ pm_node_t base; + /** * EmbeddedVariableNode#operator_loc */ pm_location_t operator_loc; @@ -3188,18 +3285,19 @@ * ensure * ^^^^^^ * bar * end * - * Type: PM_ENSURE_NODE + * Type: ::PM_ENSURE_NODE * * @extends pm_node_t */ typedef struct pm_ensure_node { /** The embedded base node. */ pm_node_t base; + /** * EnsureNode#ensure_keyword_loc */ pm_location_t ensure_keyword_loc; @@ -3220,17 +3318,18 @@ * Represents the use of the literal `false` keyword. * * false * ^^^^^ * - * Type: PM_FALSE_NODE + * Type: ::PM_FALSE_NODE * * @extends pm_node_t */ typedef struct pm_false_node { /** The embedded base node. */ pm_node_t base; + } pm_false_node_t; /** * FindPatternNode * @@ -3243,27 +3342,28 @@ * ^^^^^^^^^^^^^^^^^ * * foo in Foo(*bar, baz, *qux) * ^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_FIND_PATTERN_NODE + * Type: ::PM_FIND_PATTERN_NODE * * @extends pm_node_t */ typedef struct pm_find_pattern_node { /** The embedded base node. */ pm_node_t base; + /** * FindPatternNode#constant */ struct pm_node *constant; /** * FindPatternNode#left */ - struct pm_node *left; + struct pm_splat_node *left; /** * FindPatternNode#requireds */ struct pm_node_list requireds; @@ -3290,20 +3390,22 @@ * Represents the use of the `..` or `...` operators to create flip flops. * * baz if foo .. bar * ^^^^^^^^^^ * - * Type: PM_FLIP_FLOP_NODE - * Flags: - * PM_RANGE_FLAGS_EXCLUDE_END + * Type: ::PM_FLIP_FLOP_NODE + + * Flags (#pm_range_flags): + * * ::PM_RANGE_FLAGS_EXCLUDE_END * * @extends pm_node_t */ typedef struct pm_flip_flop_node { /** The embedded base node. */ pm_node_t base; + /** * FlipFlopNode#left */ struct pm_node *left; @@ -3324,18 +3426,19 @@ * Represents a floating point number literal. * * 1.0 * ^^^ * - * Type: PM_FLOAT_NODE + * Type: ::PM_FLOAT_NODE * * @extends pm_node_t */ typedef struct pm_float_node { /** The embedded base node. */ pm_node_t base; + /** * FloatNode#value * * The value of the floating point number as a Float. */ @@ -3348,18 +3451,19 @@ * Represents the use of the `for` keyword. * * for i in a end * ^^^^^^^^^^^^^^ * - * Type: PM_FOR_NODE + * Type: ::PM_FOR_NODE * * @extends pm_node_t */ typedef struct pm_for_node { /** The embedded base node. */ pm_node_t base; + /** * ForNode#index * * The index expression for `for` loops. * @@ -3439,17 +3543,18 @@ * def foo(...) * bar(...) * ^^^ * end * - * Type: PM_FORWARDING_ARGUMENTS_NODE + * Type: ::PM_FORWARDING_ARGUMENTS_NODE * * @extends pm_node_t */ typedef struct pm_forwarding_arguments_node { /** The embedded base node. */ pm_node_t base; + } pm_forwarding_arguments_node_t; /** * ForwardingParameterNode * @@ -3457,35 +3562,37 @@ * * def foo(...) * ^^^ * end * - * Type: PM_FORWARDING_PARAMETER_NODE + * Type: ::PM_FORWARDING_PARAMETER_NODE * * @extends pm_node_t */ typedef struct pm_forwarding_parameter_node { /** The embedded base node. */ pm_node_t base; + } pm_forwarding_parameter_node_t; /** * ForwardingSuperNode * * Represents the use of the `super` keyword without parentheses or arguments. * * super * ^^^^^ * - * Type: PM_FORWARDING_SUPER_NODE + * Type: ::PM_FORWARDING_SUPER_NODE * * @extends pm_node_t */ typedef struct pm_forwarding_super_node { /** The embedded base node. */ pm_node_t base; + /** * ForwardingSuperNode#block */ struct pm_block_node *block; } pm_forwarding_super_node_t; @@ -3496,18 +3603,19 @@ * Represents the use of the `&&=` operator for assignment to a global variable. * * $target &&= value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_GLOBAL_VARIABLE_AND_WRITE_NODE + * Type: ::PM_GLOBAL_VARIABLE_AND_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_global_variable_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * GlobalVariableAndWriteNode#name */ pm_constant_id_t name; @@ -3533,18 +3641,19 @@ * Represents assigning to a global variable using an operator that isn't `=`. * * $target += value * ^^^^^^^^^^^^^^^^ * - * Type: PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE + * Type: ::PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_global_variable_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * GlobalVariableOperatorWriteNode#name */ pm_constant_id_t name; @@ -3575,18 +3684,19 @@ * Represents the use of the `||=` operator for assignment to a global variable. * * $target ||= value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_GLOBAL_VARIABLE_OR_WRITE_NODE + * Type: ::PM_GLOBAL_VARIABLE_OR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_global_variable_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * GlobalVariableOrWriteNode#name */ pm_constant_id_t name; @@ -3612,18 +3722,19 @@ * Represents referencing a global variable. * * $foo * ^^^^ * - * Type: PM_GLOBAL_VARIABLE_READ_NODE + * Type: ::PM_GLOBAL_VARIABLE_READ_NODE * * @extends pm_node_t */ typedef struct pm_global_variable_read_node { /** The embedded base node. */ pm_node_t base; + /** * GlobalVariableReadNode#name * * 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. * @@ -3640,18 +3751,19 @@ * Represents writing to a global variable in a context that doesn't have an explicit value. * * $foo, $bar = baz * ^^^^ ^^^^ * - * Type: PM_GLOBAL_VARIABLE_TARGET_NODE + * Type: ::PM_GLOBAL_VARIABLE_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_global_variable_target_node { /** The embedded base node. */ pm_node_t base; + /** * GlobalVariableTargetNode#name */ pm_constant_id_t name; } pm_global_variable_target_node_t; @@ -3662,18 +3774,19 @@ * Represents writing to a global variable. * * $foo = 1 * ^^^^^^^^ * - * Type: PM_GLOBAL_VARIABLE_WRITE_NODE + * Type: ::PM_GLOBAL_VARIABLE_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_global_variable_write_node { /** The embedded base node. */ pm_node_t base; + /** * GlobalVariableWriteNode#name * * 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. * @@ -3723,18 +3836,19 @@ * Represents a hash literal. * * { a => b } * ^^^^^^^^^^ * - * Type: PM_HASH_NODE + * Type: ::PM_HASH_NODE * * @extends pm_node_t */ typedef struct pm_hash_node { /** The embedded base node. */ pm_node_t base; + /** * HashNode#opening_loc * * The location of the opening brace. * @@ -3776,18 +3890,19 @@ * ^^^^^^^^^^^^^^ * * foo => { a: 1, b: 2, **c } * ^^^^^^^^^^^^^^^^^^^ * - * Type: PM_HASH_PATTERN_NODE + * Type: ::PM_HASH_PATTERN_NODE * * @extends pm_node_t */ typedef struct pm_hash_pattern_node { /** The embedded base node. */ pm_node_t base; + /** * HashPatternNode#constant */ struct pm_node *constant; @@ -3824,18 +3939,19 @@ * ^^^^^^^^^^^^^^^^^^^ * * foo ? bar : baz * ^^^^^^^^^^^^^^^ * - * Type: PM_IF_NODE + * Type: ::PM_IF_NODE * * @extends pm_node_t */ typedef struct pm_if_node { /** The embedded base node. */ pm_node_t base; + /** * IfNode#if_keyword_loc * * The location of the `if` keyword if present. * @@ -3929,18 +4045,19 @@ * Represents an imaginary number literal. * * 1.0i * ^^^^ * - * Type: PM_IMAGINARY_NODE + * Type: ::PM_IMAGINARY_NODE * * @extends pm_node_t */ typedef struct pm_imaginary_node { /** The embedded base node. */ pm_node_t base; + /** * ImaginaryNode#numeric */ struct pm_node *numeric; } pm_imaginary_node_t; @@ -3957,18 +4074,19 @@ * ^^^^ * * foo in { bar: } * ^^^^ * - * Type: PM_IMPLICIT_NODE + * Type: ::PM_IMPLICIT_NODE * * @extends pm_node_t */ typedef struct pm_implicit_node { /** The embedded base node. */ pm_node_t base; + /** * ImplicitNode#value */ struct pm_node *value; } pm_implicit_node_t; @@ -3988,35 +4106,37 @@ * ^ * * foo, = bar * ^ * - * Type: PM_IMPLICIT_REST_NODE + * Type: ::PM_IMPLICIT_REST_NODE * * @extends pm_node_t */ typedef struct pm_implicit_rest_node { /** The embedded base node. */ pm_node_t base; + } pm_implicit_rest_node_t; /** * InNode * * Represents the use of the `in` keyword in a case statement. * * case a; in b then c end * ^^^^^^^^^^^ * - * Type: PM_IN_NODE + * Type: ::PM_IN_NODE * * @extends pm_node_t */ typedef struct pm_in_node { /** The embedded base node. */ pm_node_t base; + /** * InNode#pattern */ struct pm_node *pattern; @@ -4042,23 +4162,25 @@ * Represents the use of the `&&=` operator on a call to the `[]` method. * * foo.bar[baz] &&= value * ^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_INDEX_AND_WRITE_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_INDEX_AND_WRITE_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_index_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * IndexAndWriteNode#receiver */ struct pm_node *receiver; @@ -4083,11 +4205,11 @@ pm_location_t closing_loc; /** * IndexAndWriteNode#block */ - struct pm_node *block; + struct pm_block_argument_node *block; /** * IndexAndWriteNode#operator_loc */ pm_location_t operator_loc; @@ -4104,23 +4226,25 @@ * Represents the use of an assignment operator on a call to `[]`. * * foo.bar[baz] += value * ^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_INDEX_OPERATOR_WRITE_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_INDEX_OPERATOR_WRITE_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_index_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * IndexOperatorWriteNode#receiver */ struct pm_node *receiver; @@ -4145,11 +4269,11 @@ pm_location_t closing_loc; /** * IndexOperatorWriteNode#block */ - struct pm_node *block; + struct pm_block_argument_node *block; /** * IndexOperatorWriteNode#binary_operator */ pm_constant_id_t binary_operator; @@ -4171,23 +4295,25 @@ * Represents the use of the `||=` operator on a call to `[]`. * * foo.bar[baz] ||= value * ^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_INDEX_OR_WRITE_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_INDEX_OR_WRITE_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_index_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * IndexOrWriteNode#receiver */ struct pm_node *receiver; @@ -4212,11 +4338,11 @@ pm_location_t closing_loc; /** * IndexOrWriteNode#block */ - struct pm_node *block; + struct pm_block_argument_node *block; /** * IndexOrWriteNode#operator_loc */ pm_location_t operator_loc; @@ -4241,23 +4367,25 @@ * end * * for foo[bar] in baz do end * ^^^^^^^^ * - * Type: PM_INDEX_TARGET_NODE - * Flags: - * PM_CALL_NODE_FLAGS_SAFE_NAVIGATION - * PM_CALL_NODE_FLAGS_VARIABLE_CALL - * PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE - * PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY + * Type: ::PM_INDEX_TARGET_NODE + + * Flags (#pm_call_node_flags): + * * ::PM_CALL_NODE_FLAGS_SAFE_NAVIGATION + * * ::PM_CALL_NODE_FLAGS_VARIABLE_CALL + * * ::PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE + * * ::PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY * * @extends pm_node_t */ typedef struct pm_index_target_node { /** The embedded base node. */ pm_node_t base; + /** * IndexTargetNode#receiver */ struct pm_node *receiver; @@ -4277,29 +4405,30 @@ pm_location_t closing_loc; /** * IndexTargetNode#block */ - struct pm_node *block; + struct pm_block_argument_node *block; } pm_index_target_node_t; /** * InstanceVariableAndWriteNode * * Represents the use of the `&&=` operator for assignment to an instance variable. * * @target &&= value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_INSTANCE_VARIABLE_AND_WRITE_NODE + * Type: ::PM_INSTANCE_VARIABLE_AND_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_instance_variable_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * InstanceVariableAndWriteNode#name */ pm_constant_id_t name; @@ -4325,18 +4454,19 @@ * Represents assigning to an instance variable using an operator that isn't `=`. * * @target += value * ^^^^^^^^^^^^^^^^ * - * Type: PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE + * Type: ::PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_instance_variable_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * InstanceVariableOperatorWriteNode#name */ pm_constant_id_t name; @@ -4367,18 +4497,19 @@ * Represents the use of the `||=` operator for assignment to an instance variable. * * @target ||= value * ^^^^^^^^^^^^^^^^^ * - * Type: PM_INSTANCE_VARIABLE_OR_WRITE_NODE + * Type: ::PM_INSTANCE_VARIABLE_OR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_instance_variable_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * InstanceVariableOrWriteNode#name */ pm_constant_id_t name; @@ -4404,18 +4535,19 @@ * Represents referencing an instance variable. * * @foo * ^^^^ * - * Type: PM_INSTANCE_VARIABLE_READ_NODE + * Type: ::PM_INSTANCE_VARIABLE_READ_NODE * * @extends pm_node_t */ typedef struct pm_instance_variable_read_node { /** The embedded base node. */ pm_node_t base; + /** * InstanceVariableReadNode#name * * 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). * @@ -4432,18 +4564,19 @@ * Represents writing to an instance variable in a context that doesn't have an explicit value. * * @foo, @bar = baz * ^^^^ ^^^^ * - * Type: PM_INSTANCE_VARIABLE_TARGET_NODE + * Type: ::PM_INSTANCE_VARIABLE_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_instance_variable_target_node { /** The embedded base node. */ pm_node_t base; + /** * InstanceVariableTargetNode#name */ pm_constant_id_t name; } pm_instance_variable_target_node_t; @@ -4454,18 +4587,19 @@ * Represents writing to an instance variable. * * @foo = 1 * ^^^^^^^^ * - * Type: PM_INSTANCE_VARIABLE_WRITE_NODE + * Type: ::PM_INSTANCE_VARIABLE_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_instance_variable_write_node { /** The embedded base node. */ pm_node_t base; + /** * InstanceVariableWriteNode#name * * 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). * @@ -4515,23 +4649,25 @@ * Represents an integer number literal. * * 1 * ^ * - * Type: PM_INTEGER_NODE - * Flags: - * PM_INTEGER_BASE_FLAGS_BINARY - * PM_INTEGER_BASE_FLAGS_DECIMAL - * PM_INTEGER_BASE_FLAGS_OCTAL - * PM_INTEGER_BASE_FLAGS_HEXADECIMAL + * Type: ::PM_INTEGER_NODE + + * Flags (#pm_integer_base_flags): + * * ::PM_INTEGER_BASE_FLAGS_BINARY + * * ::PM_INTEGER_BASE_FLAGS_DECIMAL + * * ::PM_INTEGER_BASE_FLAGS_OCTAL + * * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL * * @extends pm_node_t */ typedef struct pm_integer_node { /** The embedded base node. */ pm_node_t base; + /** * IntegerNode#value * * The value of the integer literal as a number. */ @@ -4544,30 +4680,32 @@ * 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. * * if /foo #{bar} baz/ then end * ^^^^^^^^^^^^^^^^ * - * Type: PM_INTERPOLATED_MATCH_LAST_LINE_NODE - * Flags: - * PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE - * PM_REGULAR_EXPRESSION_FLAGS_EXTENDED - * PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE - * PM_REGULAR_EXPRESSION_FLAGS_ONCE - * PM_REGULAR_EXPRESSION_FLAGS_EUC_JP - * PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT - * PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J - * PM_REGULAR_EXPRESSION_FLAGS_UTF_8 - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING + * Type: ::PM_INTERPOLATED_MATCH_LAST_LINE_NODE + + * Flags (#pm_regular_expression_flags): + * * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED + * * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE + * * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP + * * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT + * * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J + * * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8 + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING * * @extends pm_node_t */ typedef struct pm_interpolated_match_last_line_node { /** The embedded base node. */ pm_node_t base; + /** * InterpolatedMatchLastLineNode#opening_loc */ pm_location_t opening_loc; @@ -4588,30 +4726,32 @@ * Represents a regular expression literal that contains interpolation. * * /foo #{bar} baz/ * ^^^^^^^^^^^^^^^^ * - * Type: PM_INTERPOLATED_REGULAR_EXPRESSION_NODE - * Flags: - * PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE - * PM_REGULAR_EXPRESSION_FLAGS_EXTENDED - * PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE - * PM_REGULAR_EXPRESSION_FLAGS_ONCE - * PM_REGULAR_EXPRESSION_FLAGS_EUC_JP - * PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT - * PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J - * PM_REGULAR_EXPRESSION_FLAGS_UTF_8 - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING + * Type: ::PM_INTERPOLATED_REGULAR_EXPRESSION_NODE + + * Flags (#pm_regular_expression_flags): + * * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED + * * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE + * * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP + * * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT + * * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J + * * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8 + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING * * @extends pm_node_t */ typedef struct pm_interpolated_regular_expression_node { /** The embedded base node. */ pm_node_t base; + /** * InterpolatedRegularExpressionNode#opening_loc */ pm_location_t opening_loc; @@ -4632,21 +4772,23 @@ * Represents a string literal that contains interpolation. * * "foo #{bar} baz" * ^^^^^^^^^^^^^^^^ * - * Type: PM_INTERPOLATED_STRING_NODE - * Flags: - * PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN - * PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE + * Type: ::PM_INTERPOLATED_STRING_NODE + + * Flags (#pm_interpolated_string_node_flags): + * * ::PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN + * * ::PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE * * @extends pm_node_t */ typedef struct pm_interpolated_string_node { /** The embedded base node. */ pm_node_t base; + /** * InterpolatedStringNode#opening_loc */ pm_location_t opening_loc; @@ -4667,18 +4809,19 @@ * Represents a symbol literal that contains interpolation. * * :"foo #{bar} baz" * ^^^^^^^^^^^^^^^^^ * - * Type: PM_INTERPOLATED_SYMBOL_NODE + * Type: ::PM_INTERPOLATED_SYMBOL_NODE * * @extends pm_node_t */ typedef struct pm_interpolated_symbol_node { /** The embedded base node. */ pm_node_t base; + /** * InterpolatedSymbolNode#opening_loc */ pm_location_t opening_loc; @@ -4699,18 +4842,19 @@ * Represents an xstring literal that contains interpolation. * * `foo #{bar} baz` * ^^^^^^^^^^^^^^^^ * - * Type: PM_INTERPOLATED_X_STRING_NODE + * Type: ::PM_INTERPOLATED_X_STRING_NODE * * @extends pm_node_t */ typedef struct pm_interpolated_x_string_node { /** The embedded base node. */ pm_node_t base; + /** * InterpolatedXStringNode#opening_loc */ pm_location_t opening_loc; @@ -4731,54 +4875,58 @@ * Represents reading from the implicit `it` local variable. * * -> { it } * ^^ * - * Type: PM_IT_LOCAL_VARIABLE_READ_NODE + * Type: ::PM_IT_LOCAL_VARIABLE_READ_NODE * * @extends pm_node_t */ typedef struct pm_it_local_variable_read_node { /** The embedded base node. */ pm_node_t base; + } pm_it_local_variable_read_node_t; /** * ItParametersNode * * Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. * * -> { it + it } * ^^^^^^^^^^^^^^ * - * Type: PM_IT_PARAMETERS_NODE + * Type: ::PM_IT_PARAMETERS_NODE * * @extends pm_node_t */ typedef struct pm_it_parameters_node { /** The embedded base node. */ pm_node_t base; + } pm_it_parameters_node_t; /** * KeywordHashNode * * Represents a hash literal without opening and closing braces. * * foo(a: b) * ^^^^ * - * Type: PM_KEYWORD_HASH_NODE - * Flags: - * PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS + * Type: ::PM_KEYWORD_HASH_NODE + + * Flags (#pm_keyword_hash_node_flags): + * * ::PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS * * @extends pm_node_t */ typedef struct pm_keyword_hash_node { /** The embedded base node. */ pm_node_t base; + /** * KeywordHashNode#elements */ struct pm_node_list elements; } pm_keyword_hash_node_t; @@ -4790,20 +4938,22 @@ * * def a(**b) * ^^^ * end * - * Type: PM_KEYWORD_REST_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_KEYWORD_REST_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_keyword_rest_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * KeywordRestParameterNode#name */ pm_constant_id_t name; @@ -4824,18 +4974,19 @@ * Represents using a lambda literal (not the lambda method call). * * ->(value) { value * 2 } * ^^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_LAMBDA_NODE + * Type: ::PM_LAMBDA_NODE * * @extends pm_node_t */ typedef struct pm_lambda_node { /** The embedded base node. */ pm_node_t base; + /** * LambdaNode#locals */ pm_constant_id_list_t locals; @@ -4871,18 +5022,19 @@ * Represents the use of the `&&=` operator for assignment to a local variable. * * target &&= value * ^^^^^^^^^^^^^^^^ * - * Type: PM_LOCAL_VARIABLE_AND_WRITE_NODE + * Type: ::PM_LOCAL_VARIABLE_AND_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_local_variable_and_write_node { /** The embedded base node. */ pm_node_t base; + /** * LocalVariableAndWriteNode#name_loc */ pm_location_t name_loc; @@ -4913,18 +5065,19 @@ * Represents assigning to a local variable using an operator that isn't `=`. * * target += value * ^^^^^^^^^^^^^^^ * - * Type: PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE + * Type: ::PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_local_variable_operator_write_node { /** The embedded base node. */ pm_node_t base; + /** * LocalVariableOperatorWriteNode#name_loc */ pm_location_t name_loc; @@ -4960,18 +5113,19 @@ * Represents the use of the `||=` operator for assignment to a local variable. * * target ||= value * ^^^^^^^^^^^^^^^^ * - * Type: PM_LOCAL_VARIABLE_OR_WRITE_NODE + * Type: ::PM_LOCAL_VARIABLE_OR_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_local_variable_or_write_node { /** The embedded base node. */ pm_node_t base; + /** * LocalVariableOrWriteNode#name_loc */ pm_location_t name_loc; @@ -5002,18 +5156,19 @@ * 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. * * foo * ^^^ * - * Type: PM_LOCAL_VARIABLE_READ_NODE + * Type: ::PM_LOCAL_VARIABLE_READ_NODE * * @extends pm_node_t */ typedef struct pm_local_variable_read_node { /** The embedded base node. */ pm_node_t base; + /** * LocalVariableReadNode#name * * The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). * @@ -5047,18 +5202,19 @@ * Represents writing to a local variable in a context that doesn't have an explicit value. * * foo, bar = baz * ^^^ ^^^ * - * Type: PM_LOCAL_VARIABLE_TARGET_NODE + * Type: ::PM_LOCAL_VARIABLE_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_local_variable_target_node { /** The embedded base node. */ pm_node_t base; + /** * LocalVariableTargetNode#name */ pm_constant_id_t name; @@ -5074,18 +5230,19 @@ * Represents writing to a local variable. * * foo = 1 * ^^^^^^^ * - * Type: PM_LOCAL_VARIABLE_WRITE_NODE + * Type: ::PM_LOCAL_VARIABLE_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_local_variable_write_node { /** The embedded base node. */ pm_node_t base; + /** * LocalVariableWriteNode#name * * The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). * @@ -5152,30 +5309,32 @@ * Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. * * if /foo/i then end * ^^^^^^ * - * Type: PM_MATCH_LAST_LINE_NODE - * Flags: - * PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE - * PM_REGULAR_EXPRESSION_FLAGS_EXTENDED - * PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE - * PM_REGULAR_EXPRESSION_FLAGS_ONCE - * PM_REGULAR_EXPRESSION_FLAGS_EUC_JP - * PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT - * PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J - * PM_REGULAR_EXPRESSION_FLAGS_UTF_8 - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING + * Type: ::PM_MATCH_LAST_LINE_NODE + + * Flags (#pm_regular_expression_flags): + * * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED + * * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE + * * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP + * * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT + * * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J + * * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8 + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING * * @extends pm_node_t */ typedef struct pm_match_last_line_node { /** The embedded base node. */ pm_node_t base; + /** * MatchLastLineNode#opening_loc */ pm_location_t opening_loc; @@ -5201,18 +5360,19 @@ * Represents the use of the modifier `in` operator. * * foo in bar * ^^^^^^^^^^ * - * Type: PM_MATCH_PREDICATE_NODE + * Type: ::PM_MATCH_PREDICATE_NODE * * @extends pm_node_t */ typedef struct pm_match_predicate_node { /** The embedded base node. */ pm_node_t base; + /** * MatchPredicateNode#value */ struct pm_node *value; @@ -5233,18 +5393,19 @@ * Represents the use of the `=>` operator. * * foo => bar * ^^^^^^^^^^ * - * Type: PM_MATCH_REQUIRED_NODE + * Type: ::PM_MATCH_REQUIRED_NODE * * @extends pm_node_t */ typedef struct pm_match_required_node { /** The embedded base node. */ pm_node_t base; + /** * MatchRequiredNode#value */ struct pm_node *value; @@ -5265,18 +5426,19 @@ * Represents writing local variables using a regular expression match with named capture groups. * * /(?<foo>bar)/ =~ baz * ^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_MATCH_WRITE_NODE + * Type: ::PM_MATCH_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_match_write_node { /** The embedded base node. */ pm_node_t base; + /** * MatchWriteNode#call */ struct pm_call_node *call; @@ -5289,35 +5451,37 @@ /** * MissingNode * * Represents a node that is missing from the source and results in a syntax error. * - * Type: PM_MISSING_NODE + * Type: ::PM_MISSING_NODE * * @extends pm_node_t */ typedef struct pm_missing_node { /** The embedded base node. */ pm_node_t base; + } pm_missing_node_t; /** * ModuleNode * * Represents a module declaration involving the `module` keyword. * * module Foo end * ^^^^^^^^^^^^^^ * - * Type: PM_MODULE_NODE + * Type: ::PM_MODULE_NODE * * @extends pm_node_t */ typedef struct pm_module_node { /** The embedded base node. */ pm_node_t base; + /** * ModuleNode#locals */ pm_constant_id_list_t locals; @@ -5358,18 +5522,19 @@ * This can be a part of `MultiWriteNode` as above, or the target of a `for` loop * * for a, b in [[1, 2], [3, 4]] * ^^^^ * - * Type: PM_MULTI_TARGET_NODE + * Type: ::PM_MULTI_TARGET_NODE * * @extends pm_node_t */ typedef struct pm_multi_target_node { /** The embedded base node. */ pm_node_t base; + /** * MultiTargetNode#lefts * * Represents the targets expressions before a splat node. * @@ -5394,11 +5559,11 @@ * The variable can be empty, this results in a `SplatNode` with a `nil` expression field. * * a, (b, *) = 1, 2, 3, 4 * ^ * - * If the `*` is omitted, the field will containt an `ImplicitRestNode` + * If the `*` is omitted, this field will contain an `ImplicitRestNode` * * a, (b,) = 1, 2, 3, 4 * ^ */ struct pm_node *rest; @@ -5440,18 +5605,19 @@ * Represents a write to a multi-target expression. * * a, b, c = 1, 2, 3 * ^^^^^^^^^^^^^^^^^ * - * Type: PM_MULTI_WRITE_NODE + * Type: ::PM_MULTI_WRITE_NODE * * @extends pm_node_t */ typedef struct pm_multi_write_node { /** The embedded base node. */ pm_node_t base; + /** * MultiWriteNode#lefts * * Represents the targets expressions before a splat node. * @@ -5476,11 +5642,11 @@ * The variable can be empty, this results in a `SplatNode` with a `nil` expression field. * * a, b, * = 1, 2, 3, 4 * ^ * - * If the `*` is omitted, the field will containt an `ImplicitRestNode` + * If the `*` is omitted, this field will contain an `ImplicitRestNode` * * a, b, = 1, 2, 3, 4 * ^ */ struct pm_node *rest; @@ -5542,18 +5708,19 @@ * Represents the use of the `next` keyword. * * next 1 * ^^^^^^ * - * Type: PM_NEXT_NODE + * Type: ::PM_NEXT_NODE * * @extends pm_node_t */ typedef struct pm_next_node { /** The embedded base node. */ pm_node_t base; + /** * NextNode#arguments */ struct pm_arguments_node *arguments; @@ -5569,17 +5736,18 @@ * Represents the use of the `nil` keyword. * * nil * ^^^ * - * Type: PM_NIL_NODE + * Type: ::PM_NIL_NODE * * @extends pm_node_t */ typedef struct pm_nil_node { /** The embedded base node. */ pm_node_t base; + } pm_nil_node_t; /** * NoKeywordsParameterNode * @@ -5587,18 +5755,19 @@ * * def a(**nil) * ^^^^^ * end * - * Type: PM_NO_KEYWORDS_PARAMETER_NODE + * Type: ::PM_NO_KEYWORDS_PARAMETER_NODE * * @extends pm_node_t */ typedef struct pm_no_keywords_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * NoKeywordsParameterNode#operator_loc */ pm_location_t operator_loc; @@ -5614,18 +5783,19 @@ * Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. * * -> { _1 + _2 } * ^^^^^^^^^^^^^^ * - * Type: PM_NUMBERED_PARAMETERS_NODE + * Type: ::PM_NUMBERED_PARAMETERS_NODE * * @extends pm_node_t */ typedef struct pm_numbered_parameters_node { /** The embedded base node. */ pm_node_t base; + /** * NumberedParametersNode#maximum */ uint8_t maximum; } pm_numbered_parameters_node_t; @@ -5636,18 +5806,19 @@ * Represents reading a numbered reference to a capture in the previous match. * * $1 * ^^ * - * Type: PM_NUMBERED_REFERENCE_READ_NODE + * Type: ::PM_NUMBERED_REFERENCE_READ_NODE * * @extends pm_node_t */ typedef struct pm_numbered_reference_read_node { /** The embedded base node. */ pm_node_t base; + /** * NumberedReferenceReadNode#number * * The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. * @@ -5667,20 +5838,22 @@ * * def a(b: 1) * ^^^^ * end * - * Type: PM_OPTIONAL_KEYWORD_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_OPTIONAL_KEYWORD_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_optional_keyword_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * OptionalKeywordParameterNode#name */ pm_constant_id_t name; @@ -5702,20 +5875,22 @@ * * def a(b = 1) * ^^^^^ * end * - * Type: PM_OPTIONAL_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_OPTIONAL_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_optional_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * OptionalParameterNode#name */ pm_constant_id_t name; @@ -5741,18 +5916,19 @@ * Represents the use of the `||` operator or the `or` keyword. * * left or right * ^^^^^^^^^^^^^ * - * Type: PM_OR_NODE + * Type: ::PM_OR_NODE * * @extends pm_node_t */ typedef struct pm_or_node { /** The embedded base node. */ pm_node_t base; + /** * OrNode#left * * 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). * @@ -5765,11 +5941,11 @@ struct pm_node *left; /** * OrNode#right * - * Represents the right 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). + * Represents the right side of the expression. * * left || right * ^^^^^ * * 1 or 2 @@ -5795,18 +5971,19 @@ * * def a(b, c, d) * ^^^^^^^ * end * - * Type: PM_PARAMETERS_NODE + * Type: ::PM_PARAMETERS_NODE * * @extends pm_node_t */ typedef struct pm_parameters_node { /** The embedded base node. */ pm_node_t base; + /** * ParametersNode#requireds */ struct pm_node_list requireds; @@ -5847,18 +6024,19 @@ * Represents a parenthesized expression * * (10 + 34) * ^^^^^^^^^ * - * Type: PM_PARENTHESES_NODE + * Type: ::PM_PARENTHESES_NODE * * @extends pm_node_t */ typedef struct pm_parentheses_node { /** The embedded base node. */ pm_node_t base; + /** * ParenthesesNode#body */ struct pm_node *body; @@ -5879,18 +6057,19 @@ * Represents the use of the `^` operator for pinning an expression in a pattern matching expression. * * foo in ^(bar) * ^^^^^^ * - * Type: PM_PINNED_EXPRESSION_NODE + * Type: ::PM_PINNED_EXPRESSION_NODE * * @extends pm_node_t */ typedef struct pm_pinned_expression_node { /** The embedded base node. */ pm_node_t base; + /** * PinnedExpressionNode#expression */ struct pm_node *expression; @@ -5916,18 +6095,19 @@ * Represents the use of the `^` operator for pinning a variable in a pattern matching expression. * * foo in ^bar * ^^^^ * - * Type: PM_PINNED_VARIABLE_NODE + * Type: ::PM_PINNED_VARIABLE_NODE * * @extends pm_node_t */ typedef struct pm_pinned_variable_node { /** The embedded base node. */ pm_node_t base; + /** * PinnedVariableNode#variable */ struct pm_node *variable; @@ -5943,18 +6123,19 @@ * Represents the use of the `END` keyword. * * END { foo } * ^^^^^^^^^^^ * - * Type: PM_POST_EXECUTION_NODE + * Type: ::PM_POST_EXECUTION_NODE * * @extends pm_node_t */ typedef struct pm_post_execution_node { /** The embedded base node. */ pm_node_t base; + /** * PostExecutionNode#statements */ struct pm_statements_node *statements; @@ -5980,18 +6161,19 @@ * Represents the use of the `BEGIN` keyword. * * BEGIN { foo } * ^^^^^^^^^^^^^ * - * Type: PM_PRE_EXECUTION_NODE + * Type: ::PM_PRE_EXECUTION_NODE * * @extends pm_node_t */ typedef struct pm_pre_execution_node { /** The embedded base node. */ pm_node_t base; + /** * PreExecutionNode#statements */ struct pm_statements_node *statements; @@ -6014,18 +6196,19 @@ /** * ProgramNode * * The top level node of any parse tree. * - * Type: PM_PROGRAM_NODE + * Type: ::PM_PROGRAM_NODE * * @extends pm_node_t */ typedef struct pm_program_node { /** The embedded base node. */ pm_node_t base; + /** * ProgramNode#locals */ pm_constant_id_list_t locals; @@ -6044,20 +6227,22 @@ * ^^^^ * * c if a =~ /left/ ... b =~ /right/ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_RANGE_NODE - * Flags: - * PM_RANGE_FLAGS_EXCLUDE_END + * Type: ::PM_RANGE_NODE + + * Flags (#pm_range_flags): + * * ::PM_RANGE_FLAGS_EXCLUDE_END * * @extends pm_node_t */ typedef struct pm_range_node { /** The embedded base node. */ pm_node_t base; + /** * RangeNode#left * * 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). * @@ -6097,23 +6282,25 @@ * Represents a rational number literal. * * 1.0r * ^^^^ * - * Type: PM_RATIONAL_NODE - * Flags: - * PM_INTEGER_BASE_FLAGS_BINARY - * PM_INTEGER_BASE_FLAGS_DECIMAL - * PM_INTEGER_BASE_FLAGS_OCTAL - * PM_INTEGER_BASE_FLAGS_HEXADECIMAL + * Type: ::PM_RATIONAL_NODE + + * Flags (#pm_integer_base_flags): + * * ::PM_INTEGER_BASE_FLAGS_BINARY + * * ::PM_INTEGER_BASE_FLAGS_DECIMAL + * * ::PM_INTEGER_BASE_FLAGS_OCTAL + * * ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL * * @extends pm_node_t */ typedef struct pm_rational_node { /** The embedded base node. */ pm_node_t base; + /** * RationalNode#numerator * * The numerator of the rational number. * @@ -6137,47 +6324,50 @@ * Represents the use of the `redo` keyword. * * redo * ^^^^ * - * Type: PM_REDO_NODE + * Type: ::PM_REDO_NODE * * @extends pm_node_t */ typedef struct pm_redo_node { /** The embedded base node. */ pm_node_t base; + } pm_redo_node_t; /** * RegularExpressionNode * * Represents a regular expression literal with no interpolation. * * /foo/i * ^^^^^^ * - * Type: PM_REGULAR_EXPRESSION_NODE - * Flags: - * PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE - * PM_REGULAR_EXPRESSION_FLAGS_EXTENDED - * PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE - * PM_REGULAR_EXPRESSION_FLAGS_ONCE - * PM_REGULAR_EXPRESSION_FLAGS_EUC_JP - * PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT - * PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J - * PM_REGULAR_EXPRESSION_FLAGS_UTF_8 - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING - * PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING + * Type: ::PM_REGULAR_EXPRESSION_NODE + + * Flags (#pm_regular_expression_flags): + * * ::PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EXTENDED + * * ::PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE + * * ::PM_REGULAR_EXPRESSION_FLAGS_ONCE + * * ::PM_REGULAR_EXPRESSION_FLAGS_EUC_JP + * * ::PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT + * * ::PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J + * * ::PM_REGULAR_EXPRESSION_FLAGS_UTF_8 + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING * * @extends pm_node_t */ typedef struct pm_regular_expression_node { /** The embedded base node. */ pm_node_t base; + /** * RegularExpressionNode#opening_loc */ pm_location_t opening_loc; @@ -6204,20 +6394,22 @@ * * def a(b: ) * ^^ * end * - * Type: PM_REQUIRED_KEYWORD_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_REQUIRED_KEYWORD_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_required_keyword_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * RequiredKeywordParameterNode#name */ pm_constant_id_t name; @@ -6234,20 +6426,22 @@ * * def a(b) * ^ * end * - * Type: PM_REQUIRED_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_REQUIRED_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_required_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * RequiredParameterNode#name */ pm_constant_id_t name; } pm_required_parameter_node_t; @@ -6258,18 +6452,19 @@ * Represents an expression modified with a rescue. * * foo rescue nil * ^^^^^^^^^^^^^^ * - * Type: PM_RESCUE_MODIFIER_NODE + * Type: ::PM_RESCUE_MODIFIER_NODE * * @extends pm_node_t */ typedef struct pm_rescue_modifier_node { /** The embedded base node. */ pm_node_t base; + /** * RescueModifierNode#expression */ struct pm_node *expression; @@ -6295,18 +6490,19 @@ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * end * * `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. * - * Type: PM_RESCUE_NODE + * Type: ::PM_RESCUE_NODE * * @extends pm_node_t */ typedef struct pm_rescue_node { /** The embedded base node. */ pm_node_t base; + /** * RescueNode#keyword_loc */ pm_location_t keyword_loc; @@ -6343,20 +6539,22 @@ * * def a(*b) * ^^ * end * - * Type: PM_REST_PARAMETER_NODE - * Flags: - * PM_PARAMETER_FLAGS_REPEATED_PARAMETER + * Type: ::PM_REST_PARAMETER_NODE + + * Flags (#pm_parameter_flags): + * * ::PM_PARAMETER_FLAGS_REPEATED_PARAMETER * * @extends pm_node_t */ typedef struct pm_rest_parameter_node { /** The embedded base node. */ pm_node_t base; + /** * RestParameterNode#name */ pm_constant_id_t name; @@ -6377,35 +6575,37 @@ * Represents the use of the `retry` keyword. * * retry * ^^^^^ * - * Type: PM_RETRY_NODE + * Type: ::PM_RETRY_NODE * * @extends pm_node_t */ typedef struct pm_retry_node { /** The embedded base node. */ pm_node_t base; + } pm_retry_node_t; /** * ReturnNode * * Represents the use of the `return` keyword. * * return 1 * ^^^^^^^^ * - * Type: PM_RETURN_NODE + * Type: ::PM_RETURN_NODE * * @extends pm_node_t */ typedef struct pm_return_node { /** The embedded base node. */ pm_node_t base; + /** * ReturnNode#keyword_loc */ pm_location_t keyword_loc; @@ -6421,17 +6621,18 @@ * Represents the `self` keyword. * * self * ^^^^ * - * Type: PM_SELF_NODE + * Type: ::PM_SELF_NODE * * @extends pm_node_t */ typedef struct pm_self_node { /** The embedded base node. */ pm_node_t base; + } pm_self_node_t; /** * ShareableConstantNode * @@ -6439,22 +6640,24 @@ * * # shareable_constant_value: literal * C = { a: 1 } * ^^^^^^^^^^^^ * - * Type: PM_SHAREABLE_CONSTANT_NODE - * Flags: - * PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL - * PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING - * PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY + * Type: ::PM_SHAREABLE_CONSTANT_NODE + + * Flags (#pm_shareable_constant_node_flags): + * * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL + * * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING + * * ::PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY * * @extends pm_node_t */ typedef struct pm_shareable_constant_node { /** The embedded base node. */ pm_node_t base; + /** * ShareableConstantNode#write * * The constant write that should be modified with the shareability state. */ @@ -6467,18 +6670,19 @@ * Represents a singleton class declaration involving the `class` keyword. * * class << self end * ^^^^^^^^^^^^^^^^^ * - * Type: PM_SINGLETON_CLASS_NODE + * Type: ::PM_SINGLETON_CLASS_NODE * * @extends pm_node_t */ typedef struct pm_singleton_class_node { /** The embedded base node. */ pm_node_t base; + /** * SingletonClassNode#locals */ pm_constant_id_list_t locals; @@ -6514,40 +6718,43 @@ * Represents the use of the `__ENCODING__` keyword. * * __ENCODING__ * ^^^^^^^^^^^^ * - * Type: PM_SOURCE_ENCODING_NODE + * Type: ::PM_SOURCE_ENCODING_NODE * * @extends pm_node_t */ typedef struct pm_source_encoding_node { /** The embedded base node. */ pm_node_t base; + } pm_source_encoding_node_t; /** * SourceFileNode * * Represents the use of the `__FILE__` keyword. * * __FILE__ * ^^^^^^^^ * - * Type: PM_SOURCE_FILE_NODE - * Flags: - * PM_STRING_FLAGS_FORCED_UTF8_ENCODING - * PM_STRING_FLAGS_FORCED_BINARY_ENCODING - * PM_STRING_FLAGS_FROZEN - * PM_STRING_FLAGS_MUTABLE + * Type: ::PM_SOURCE_FILE_NODE + + * Flags (#pm_string_flags): + * * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_STRING_FLAGS_FROZEN + * * ::PM_STRING_FLAGS_MUTABLE * * @extends pm_node_t */ typedef struct pm_source_file_node { /** The embedded base node. */ pm_node_t base; + /** * SourceFileNode#filepath * * Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. */ @@ -6560,35 +6767,37 @@ * Represents the use of the `__LINE__` keyword. * * __LINE__ * ^^^^^^^^ * - * Type: PM_SOURCE_LINE_NODE + * Type: ::PM_SOURCE_LINE_NODE * * @extends pm_node_t */ typedef struct pm_source_line_node { /** The embedded base node. */ pm_node_t base; + } pm_source_line_node_t; /** * SplatNode * * Represents the use of the splat operator. * * [*a] * ^^ * - * Type: PM_SPLAT_NODE + * Type: ::PM_SPLAT_NODE * * @extends pm_node_t */ typedef struct pm_splat_node { /** The embedded base node. */ pm_node_t base; + /** * SplatNode#operator_loc */ pm_location_t operator_loc; @@ -6604,18 +6813,19 @@ * Represents a set of statements contained within some scope. * * foo; bar; baz * ^^^^^^^^^^^^^ * - * Type: PM_STATEMENTS_NODE + * Type: ::PM_STATEMENTS_NODE * * @extends pm_node_t */ typedef struct pm_statements_node { /** The embedded base node. */ pm_node_t base; + /** * StatementsNode#body */ struct pm_node_list body; } pm_statements_node_t; @@ -6632,23 +6842,25 @@ * ^^^ * * "foo #{bar} baz" * ^^^^ ^^^^ * - * Type: PM_STRING_NODE - * Flags: - * PM_STRING_FLAGS_FORCED_UTF8_ENCODING - * PM_STRING_FLAGS_FORCED_BINARY_ENCODING - * PM_STRING_FLAGS_FROZEN - * PM_STRING_FLAGS_MUTABLE + * Type: ::PM_STRING_NODE + + * Flags (#pm_string_flags): + * * ::PM_STRING_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_STRING_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_STRING_FLAGS_FROZEN + * * ::PM_STRING_FLAGS_MUTABLE * * @extends pm_node_t */ typedef struct pm_string_node { /** The embedded base node. */ pm_node_t base; + /** * StringNode#opening_loc */ pm_location_t opening_loc; @@ -6677,18 +6889,19 @@ * ^^^^^^^ * * super foo, bar * ^^^^^^^^^^^^^^ * - * Type: PM_SUPER_NODE + * Type: ::PM_SUPER_NODE * * @extends pm_node_t */ typedef struct pm_super_node { /** The embedded base node. */ pm_node_t base; + /** * SuperNode#keyword_loc */ pm_location_t keyword_loc; @@ -6722,22 +6935,24 @@ * ^^^^ * * %i[foo] * ^^^ * - * Type: PM_SYMBOL_NODE - * Flags: - * PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING - * PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING - * PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING + * Type: ::PM_SYMBOL_NODE + + * Flags (#pm_symbol_flags): + * * ::PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING + * * ::PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING * * @extends pm_node_t */ typedef struct pm_symbol_node { /** The embedded base node. */ pm_node_t base; + /** * SymbolNode#opening_loc */ pm_location_t opening_loc; @@ -6763,35 +6978,37 @@ * Represents the use of the literal `true` keyword. * * true * ^^^^ * - * Type: PM_TRUE_NODE + * Type: ::PM_TRUE_NODE * * @extends pm_node_t */ typedef struct pm_true_node { /** The embedded base node. */ pm_node_t base; + } pm_true_node_t; /** * UndefNode * * Represents the use of the `undef` keyword. * * undef :foo, :bar, :baz * ^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_UNDEF_NODE + * Type: ::PM_UNDEF_NODE * * @extends pm_node_t */ typedef struct pm_undef_node { /** The embedded base node. */ pm_node_t base; + /** * UndefNode#names */ struct pm_node_list names; @@ -6810,18 +7027,19 @@ * ^^^^^^^^^^^^^^ * * unless foo then bar end * ^^^^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_UNLESS_NODE + * Type: ::PM_UNLESS_NODE * * @extends pm_node_t */ typedef struct pm_unless_node { /** The embedded base node. */ pm_node_t base; + /** * UnlessNode#keyword_loc * * The location of the `unless` keyword. * @@ -6897,20 +7115,22 @@ * ^^^^^^^^^^^^^ * * until foo do bar end * ^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_UNTIL_NODE - * Flags: - * PM_LOOP_FLAGS_BEGIN_MODIFIER + * Type: ::PM_UNTIL_NODE + + * Flags (#pm_loop_flags): + * * ::PM_LOOP_FLAGS_BEGIN_MODIFIER * * @extends pm_node_t */ typedef struct pm_until_node { /** The embedded base node. */ pm_node_t base; + /** * UntilNode#keyword_loc */ pm_location_t keyword_loc; @@ -6938,18 +7158,19 @@ * case true * when true * ^^^^^^^^^ * end * - * Type: PM_WHEN_NODE + * Type: ::PM_WHEN_NODE * * @extends pm_node_t */ typedef struct pm_when_node { /** The embedded base node. */ pm_node_t base; + /** * WhenNode#keyword_loc */ pm_location_t keyword_loc; @@ -6978,20 +7199,22 @@ * ^^^^^^^^^^^^^ * * while foo do bar end * ^^^^^^^^^^^^^^^^^^^^ * - * Type: PM_WHILE_NODE - * Flags: - * PM_LOOP_FLAGS_BEGIN_MODIFIER + * Type: ::PM_WHILE_NODE + + * Flags (#pm_loop_flags): + * * ::PM_LOOP_FLAGS_BEGIN_MODIFIER * * @extends pm_node_t */ typedef struct pm_while_node { /** The embedded base node. */ pm_node_t base; + /** * WhileNode#keyword_loc */ pm_location_t keyword_loc; @@ -7017,21 +7240,23 @@ * Represents an xstring literal with no interpolation. * * `foo` * ^^^^^ * - * Type: PM_X_STRING_NODE - * Flags: - * PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING - * PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING + * Type: ::PM_X_STRING_NODE + + * Flags (#pm_encoding_flags): + * * ::PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING + * * ::PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING * * @extends pm_node_t */ typedef struct pm_x_string_node { /** The embedded base node. */ pm_node_t base; + /** * XStringNode#opening_loc */ pm_location_t opening_loc; @@ -7057,18 +7282,19 @@ * Represents the use of the `yield` keyword. * * yield 1 * ^^^^^^^ * - * Type: PM_YIELD_NODE + * Type: ::PM_YIELD_NODE * * @extends pm_node_t */ typedef struct pm_yield_node { /** The embedded base node. */ pm_node_t base; + /** * YieldNode#keyword_loc */ pm_location_t keyword_loc; @@ -7090,18 +7316,24 @@ /** * Flags for arguments nodes. */ typedef enum pm_arguments_node_flags { - /** if arguments contain keywords */ - PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS = 4, + /** if the arguments contain forwarding */ + PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING = 4, - /** if arguments contain keyword splat */ - PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT = 8, + /** if the arguments contain keywords */ + PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS = 8, - /** if arguments contain splat */ - PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT = 16, + /** if the arguments contain a keyword splat */ + PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT = 16, + + /** if the arguments contain a splat */ + PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT = 32, + + /** if the arguments contain multiple splats */ + PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS = 64, } pm_arguments_node_flags_t; /** * Flags for array nodes. */ @@ -7285,8 +7517,8 @@ * When we're serializing to Java, we want to skip serializing the location * fields as they won't be used by JRuby or TruffleRuby. This boolean allows us * to specify that through the environment. It will never be true except for in * those build systems. */ -#define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS false +#define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS 0 #endif