|
Prism Ruby parser
|
The abstract syntax tree. More...
#include "prism/compiler/align.h"#include "prism/compiler/exported.h"#include "prism/arena.h"#include "prism/constant_pool.h"#include "prism/integer.h"#include "prism/stringy.h"#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| struct | pm_token_t |
| This struct represents a token in the Ruby source. More... | |
| struct | pm_location_t |
| This struct represents a slice in the source code, defined by an offset and a length. More... | |
| struct | pm_node_list |
| A list of nodes in the source, most often used for lists of children. More... | |
| struct | pm_node |
| This is the base structure that represents a node in the syntax tree. More... | |
| struct | pm_alias_global_variable_node |
| AliasGlobalVariableNode. More... | |
| struct | pm_alias_method_node |
| AliasMethodNode. More... | |
| struct | pm_alternation_pattern_node |
| AlternationPatternNode. More... | |
| struct | pm_and_node |
| AndNode. More... | |
| struct | pm_arguments_node |
| ArgumentsNode. More... | |
| struct | pm_array_node |
| ArrayNode. More... | |
| struct | pm_array_pattern_node |
| ArrayPatternNode. More... | |
| struct | pm_assoc_node |
| AssocNode. More... | |
| struct | pm_assoc_splat_node |
| AssocSplatNode. More... | |
| struct | pm_back_reference_read_node |
| BackReferenceReadNode. More... | |
| struct | pm_begin_node |
| BeginNode. More... | |
| struct | pm_block_argument_node |
| BlockArgumentNode. More... | |
| struct | pm_block_local_variable_node |
| BlockLocalVariableNode. More... | |
| struct | pm_block_node |
| BlockNode. More... | |
| struct | pm_block_parameter_node |
| BlockParameterNode. More... | |
| struct | pm_block_parameters_node |
| BlockParametersNode. More... | |
| struct | pm_break_node |
| BreakNode. More... | |
| struct | pm_call_and_write_node |
| CallAndWriteNode. More... | |
| struct | pm_call_node |
| CallNode. More... | |
| struct | pm_call_operator_write_node |
| CallOperatorWriteNode. More... | |
| struct | pm_call_or_write_node |
| CallOrWriteNode. More... | |
| struct | pm_call_target_node |
| CallTargetNode. More... | |
| struct | pm_capture_pattern_node |
| CapturePatternNode. More... | |
| struct | pm_case_match_node |
| CaseMatchNode. More... | |
| struct | pm_case_node |
| CaseNode. More... | |
| struct | pm_class_node |
| ClassNode. More... | |
| struct | pm_class_variable_and_write_node |
| ClassVariableAndWriteNode. More... | |
| struct | pm_class_variable_operator_write_node |
| ClassVariableOperatorWriteNode. More... | |
| struct | pm_class_variable_or_write_node |
| ClassVariableOrWriteNode. More... | |
| struct | pm_class_variable_read_node |
| ClassVariableReadNode. More... | |
| struct | pm_class_variable_target_node |
| ClassVariableTargetNode. More... | |
| struct | pm_class_variable_write_node |
| ClassVariableWriteNode. More... | |
| struct | pm_constant_and_write_node |
| ConstantAndWriteNode. More... | |
| struct | pm_constant_operator_write_node |
| ConstantOperatorWriteNode. More... | |
| struct | pm_constant_or_write_node |
| ConstantOrWriteNode. More... | |
| struct | pm_constant_path_and_write_node |
| ConstantPathAndWriteNode. More... | |
| struct | pm_constant_path_node |
| ConstantPathNode. More... | |
| struct | pm_constant_path_operator_write_node |
| ConstantPathOperatorWriteNode. More... | |
| struct | pm_constant_path_or_write_node |
| ConstantPathOrWriteNode. More... | |
| struct | pm_constant_path_target_node |
| ConstantPathTargetNode. More... | |
| struct | pm_constant_path_write_node |
| ConstantPathWriteNode. More... | |
| struct | pm_constant_read_node |
| ConstantReadNode. More... | |
| struct | pm_constant_target_node |
| ConstantTargetNode. More... | |
| struct | pm_constant_write_node |
| ConstantWriteNode. More... | |
| struct | pm_def_node |
| DefNode. More... | |
| struct | pm_defined_node |
| DefinedNode. More... | |
| struct | pm_else_node |
| ElseNode. More... | |
| struct | pm_embedded_statements_node |
| EmbeddedStatementsNode. More... | |
| struct | pm_embedded_variable_node |
| EmbeddedVariableNode. More... | |
| struct | pm_ensure_node |
| EnsureNode. More... | |
| struct | pm_false_node |
| FalseNode. More... | |
| struct | pm_find_pattern_node |
| FindPatternNode. More... | |
| struct | pm_flip_flop_node |
| FlipFlopNode. More... | |
| struct | pm_float_node |
| FloatNode. More... | |
| struct | pm_for_node |
| ForNode. More... | |
| struct | pm_forwarding_arguments_node |
| ForwardingArgumentsNode. More... | |
| struct | pm_forwarding_parameter_node |
| ForwardingParameterNode. More... | |
| struct | pm_forwarding_super_node |
| ForwardingSuperNode. More... | |
| struct | pm_global_variable_and_write_node |
| GlobalVariableAndWriteNode. More... | |
| struct | pm_global_variable_operator_write_node |
| GlobalVariableOperatorWriteNode. More... | |
| struct | pm_global_variable_or_write_node |
| GlobalVariableOrWriteNode. More... | |
| struct | pm_global_variable_read_node |
| GlobalVariableReadNode. More... | |
| struct | pm_global_variable_target_node |
| GlobalVariableTargetNode. More... | |
| struct | pm_global_variable_write_node |
| GlobalVariableWriteNode. More... | |
| struct | pm_hash_node |
| HashNode. More... | |
| struct | pm_hash_pattern_node |
| HashPatternNode. More... | |
| struct | pm_if_node |
| IfNode. More... | |
| struct | pm_imaginary_node |
| ImaginaryNode. More... | |
| struct | pm_implicit_node |
| ImplicitNode. More... | |
| struct | pm_implicit_rest_node |
| ImplicitRestNode. More... | |
| struct | pm_in_node |
| InNode. More... | |
| struct | pm_index_and_write_node |
| IndexAndWriteNode. More... | |
| struct | pm_index_operator_write_node |
| IndexOperatorWriteNode. More... | |
| struct | pm_index_or_write_node |
| IndexOrWriteNode. More... | |
| struct | pm_index_target_node |
| IndexTargetNode. More... | |
| struct | pm_instance_variable_and_write_node |
| InstanceVariableAndWriteNode. More... | |
| struct | pm_instance_variable_operator_write_node |
| InstanceVariableOperatorWriteNode. More... | |
| struct | pm_instance_variable_or_write_node |
| InstanceVariableOrWriteNode. More... | |
| struct | pm_instance_variable_read_node |
| InstanceVariableReadNode. More... | |
| struct | pm_instance_variable_target_node |
| InstanceVariableTargetNode. More... | |
| struct | pm_instance_variable_write_node |
| InstanceVariableWriteNode. More... | |
| struct | pm_integer_node |
| IntegerNode. More... | |
| struct | pm_interpolated_match_last_line_node |
| InterpolatedMatchLastLineNode. More... | |
| struct | pm_interpolated_regular_expression_node |
| InterpolatedRegularExpressionNode. More... | |
| struct | pm_interpolated_string_node |
| InterpolatedStringNode. More... | |
| struct | pm_interpolated_symbol_node |
| InterpolatedSymbolNode. More... | |
| struct | pm_interpolated_x_string_node |
| InterpolatedXStringNode. More... | |
| struct | pm_it_local_variable_read_node |
| ItLocalVariableReadNode. More... | |
| struct | pm_it_parameters_node |
| ItParametersNode. More... | |
| struct | pm_keyword_hash_node |
| KeywordHashNode. More... | |
| struct | pm_keyword_rest_parameter_node |
| KeywordRestParameterNode. More... | |
| struct | pm_lambda_node |
| LambdaNode. More... | |
| struct | pm_local_variable_and_write_node |
| LocalVariableAndWriteNode. More... | |
| struct | pm_local_variable_operator_write_node |
| LocalVariableOperatorWriteNode. More... | |
| struct | pm_local_variable_or_write_node |
| LocalVariableOrWriteNode. More... | |
| struct | pm_local_variable_read_node |
| LocalVariableReadNode. More... | |
| struct | pm_local_variable_target_node |
| LocalVariableTargetNode. More... | |
| struct | pm_local_variable_write_node |
| LocalVariableWriteNode. More... | |
| struct | pm_match_last_line_node |
| MatchLastLineNode. More... | |
| struct | pm_match_predicate_node |
| MatchPredicateNode. More... | |
| struct | pm_match_required_node |
| MatchRequiredNode. More... | |
| struct | pm_match_write_node |
| MatchWriteNode. More... | |
| struct | pm_missing_node |
| MissingNode. More... | |
| struct | pm_module_node |
| ModuleNode. More... | |
| struct | pm_multi_target_node |
| MultiTargetNode. More... | |
| struct | pm_multi_write_node |
| MultiWriteNode. More... | |
| struct | pm_next_node |
| NextNode. More... | |
| struct | pm_nil_node |
| NilNode. More... | |
| struct | pm_no_block_parameter_node |
| NoBlockParameterNode. More... | |
| struct | pm_no_keywords_parameter_node |
| NoKeywordsParameterNode. More... | |
| struct | pm_numbered_parameters_node |
| NumberedParametersNode. More... | |
| struct | pm_numbered_reference_read_node |
| NumberedReferenceReadNode. More... | |
| struct | pm_optional_keyword_parameter_node |
| OptionalKeywordParameterNode. More... | |
| struct | pm_optional_parameter_node |
| OptionalParameterNode. More... | |
| struct | pm_or_node |
| OrNode. More... | |
| struct | pm_parameters_node |
| ParametersNode. More... | |
| struct | pm_parentheses_node |
| ParenthesesNode. More... | |
| struct | pm_pinned_expression_node |
| PinnedExpressionNode. More... | |
| struct | pm_pinned_variable_node |
| PinnedVariableNode. More... | |
| struct | pm_post_execution_node |
| PostExecutionNode. More... | |
| struct | pm_pre_execution_node |
| PreExecutionNode. More... | |
| struct | pm_program_node |
| ProgramNode. More... | |
| struct | pm_range_node |
| RangeNode. More... | |
| struct | pm_rational_node |
| RationalNode. More... | |
| struct | pm_redo_node |
| RedoNode. More... | |
| struct | pm_regular_expression_node |
| RegularExpressionNode. More... | |
| struct | pm_required_keyword_parameter_node |
| RequiredKeywordParameterNode. More... | |
| struct | pm_required_parameter_node |
| RequiredParameterNode. More... | |
| struct | pm_rescue_modifier_node |
| RescueModifierNode. More... | |
| struct | pm_rescue_node |
| RescueNode. More... | |
| struct | pm_rest_parameter_node |
| RestParameterNode. More... | |
| struct | pm_retry_node |
| RetryNode. More... | |
| struct | pm_return_node |
| ReturnNode. More... | |
| struct | pm_self_node |
| SelfNode. More... | |
| struct | pm_shareable_constant_node |
| ShareableConstantNode. More... | |
| struct | pm_singleton_class_node |
| SingletonClassNode. More... | |
| struct | pm_source_encoding_node |
| SourceEncodingNode. More... | |
| struct | pm_source_file_node |
| SourceFileNode. More... | |
| struct | pm_source_line_node |
| SourceLineNode. More... | |
| struct | pm_splat_node |
| SplatNode. More... | |
| struct | pm_statements_node |
| StatementsNode. More... | |
| struct | pm_string_node |
| StringNode. More... | |
| struct | pm_super_node |
| SuperNode. More... | |
| struct | pm_symbol_node |
| SymbolNode. More... | |
| struct | pm_true_node |
| TrueNode. More... | |
| struct | pm_undef_node |
| UndefNode. More... | |
| struct | pm_unless_node |
| UnlessNode. More... | |
| struct | pm_until_node |
| UntilNode. More... | |
| struct | pm_when_node |
| WhenNode. More... | |
| struct | pm_while_node |
| WhileNode. More... | |
| struct | pm_x_string_node |
| XStringNode. More... | |
| struct | pm_yield_node |
| YieldNode. More... | |
Macros | |
| #define | PM_NODE_UPCAST(node_) ((pm_node_t *) (node_)) |
| Cast the given node to the base pm_node_t type. | |
| #define | PM_NODE_TYPE(node_) ((enum pm_node_type) (node_)->type) |
| Cast the type to an enum to allow the compiler to provide exhaustiveness checking. | |
| #define | PM_NODE_TYPE_P(node_, type_) (PM_NODE_TYPE(node_) == (type_)) |
| Return true if the type of the given node matches the given type. | |
| #define | PM_NODE_FLAGS(node_) (PM_NODE_UPCAST(node_)->flags) |
| Return the flags associated with the given node. | |
| #define | PM_NODE_FLAG_P(node_, flag_) ((PM_NODE_FLAGS(node_) & (flag_)) != 0) |
| Return true if the given flag is set on the given node. | |
| #define | PM_NODE_ALIGNAS PRISM_ALIGNAS(PRISM_ALIGNOF(void *)) |
| The alignment required for a child node within a parent node. | |
| #define | PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS 0 |
| When we're serializing to Java, we want to skip serializing the location fields as they won't be used by JRuby or TruffleRuby. | |
Functions | |
| PRISM_EXPORTED_FUNCTION const char * | pm_token_type (pm_token_type_t token_type) |
| Returns a string representation of the given token type. | |
| PRISM_EXPORTED_FUNCTION pm_alias_global_variable_node_t * | pm_alias_global_variable_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *new_name, struct pm_node *old_name, pm_location_t keyword_loc) |
| Allocate and initialize a new AliasGlobalVariableNode node. | |
| PRISM_EXPORTED_FUNCTION pm_alias_method_node_t * | pm_alias_method_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *new_name, struct pm_node *old_name, pm_location_t keyword_loc) |
| Allocate and initialize a new AliasMethodNode node. | |
| PRISM_EXPORTED_FUNCTION pm_alternation_pattern_node_t * | pm_alternation_pattern_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *left, struct pm_node *right, pm_location_t operator_loc) |
| Allocate and initialize a new AlternationPatternNode node. | |
| PRISM_EXPORTED_FUNCTION pm_and_node_t * | pm_and_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *left, struct pm_node *right, pm_location_t operator_loc) |
| Allocate and initialize a new AndNode node. | |
| PRISM_EXPORTED_FUNCTION pm_arguments_node_t * | pm_arguments_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t arguments) |
| Allocate and initialize a new ArgumentsNode node. | |
| PRISM_EXPORTED_FUNCTION pm_array_node_t * | pm_array_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t elements, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new ArrayNode node. | |
| PRISM_EXPORTED_FUNCTION pm_array_pattern_node_t * | pm_array_pattern_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *constant, pm_node_list_t requireds, struct pm_node *rest, pm_node_list_t posts, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new ArrayPatternNode node. | |
| PRISM_EXPORTED_FUNCTION pm_assoc_node_t * | pm_assoc_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *key, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new AssocNode node. | |
| PRISM_EXPORTED_FUNCTION pm_assoc_splat_node_t * | pm_assoc_splat_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new AssocSplatNode node. | |
| PRISM_EXPORTED_FUNCTION pm_back_reference_read_node_t * | pm_back_reference_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new BackReferenceReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_begin_node_t * | pm_begin_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t begin_keyword_loc, struct pm_statements_node *statements, struct pm_rescue_node *rescue_clause, struct pm_else_node *else_clause, struct pm_ensure_node *ensure_clause, pm_location_t end_keyword_loc) |
| Allocate and initialize a new BeginNode node. | |
| PRISM_EXPORTED_FUNCTION pm_block_argument_node_t * | pm_block_argument_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *expression, pm_location_t operator_loc) |
| Allocate and initialize a new BlockArgumentNode node. | |
| PRISM_EXPORTED_FUNCTION pm_block_local_variable_node_t * | pm_block_local_variable_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new BlockLocalVariableNode node. | |
| PRISM_EXPORTED_FUNCTION pm_block_node_t * | pm_block_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_list_t locals, struct pm_node *parameters, struct pm_node *body, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new BlockNode node. | |
| PRISM_EXPORTED_FUNCTION pm_block_parameter_node_t * | pm_block_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc) |
| Allocate and initialize a new BlockParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_block_parameters_node_t * | pm_block_parameters_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_parameters_node *parameters, pm_node_list_t locals, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new BlockParametersNode node. | |
| PRISM_EXPORTED_FUNCTION pm_break_node_t * | pm_break_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_arguments_node *arguments, pm_location_t keyword_loc) |
| Allocate and initialize a new BreakNode node. | |
| PRISM_EXPORTED_FUNCTION pm_call_and_write_node_t * | pm_call_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_location_t message_loc, pm_constant_id_t read_name, pm_constant_id_t write_name, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new CallAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_call_node_t * | pm_call_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_constant_id_t name, pm_location_t message_loc, pm_location_t opening_loc, struct pm_arguments_node *arguments, pm_location_t closing_loc, pm_location_t equal_loc, struct pm_node *block) |
| Allocate and initialize a new CallNode node. | |
| PRISM_EXPORTED_FUNCTION pm_call_operator_write_node_t * | pm_call_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_location_t message_loc, pm_constant_id_t read_name, pm_constant_id_t write_name, pm_constant_id_t binary_operator, pm_location_t binary_operator_loc, struct pm_node *value) |
| Allocate and initialize a new CallOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_call_or_write_node_t * | pm_call_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_location_t message_loc, pm_constant_id_t read_name, pm_constant_id_t write_name, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new CallOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_call_target_node_t * | pm_call_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_constant_id_t name, pm_location_t message_loc) |
| Allocate and initialize a new CallTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_capture_pattern_node_t * | pm_capture_pattern_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *value, struct pm_local_variable_target_node *target, pm_location_t operator_loc) |
| Allocate and initialize a new CapturePatternNode node. | |
| PRISM_EXPORTED_FUNCTION pm_case_match_node_t * | pm_case_match_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *predicate, pm_node_list_t conditions, struct pm_else_node *else_clause, pm_location_t case_keyword_loc, pm_location_t end_keyword_loc) |
| Allocate and initialize a new CaseMatchNode node. | |
| PRISM_EXPORTED_FUNCTION pm_case_node_t * | pm_case_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *predicate, pm_node_list_t conditions, struct pm_else_node *else_clause, pm_location_t case_keyword_loc, pm_location_t end_keyword_loc) |
| Allocate and initialize a new CaseNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_node_t * | pm_class_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_list_t locals, pm_location_t class_keyword_loc, struct pm_node *constant_path, pm_location_t inheritance_operator_loc, struct pm_node *superclass, struct pm_node *body, pm_location_t end_keyword_loc, pm_constant_id_t name) |
| Allocate and initialize a new ClassNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_variable_and_write_node_t * | pm_class_variable_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ClassVariableAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_variable_operator_write_node_t * | pm_class_variable_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t binary_operator_loc, struct pm_node *value, pm_constant_id_t binary_operator) |
| Allocate and initialize a new ClassVariableOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_variable_or_write_node_t * | pm_class_variable_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ClassVariableOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_variable_read_node_t * | pm_class_variable_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new ClassVariableReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_variable_target_node_t * | pm_class_variable_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new ClassVariableTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_class_variable_write_node_t * | pm_class_variable_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new ClassVariableWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_and_write_node_t * | pm_constant_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ConstantAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_operator_write_node_t * | pm_constant_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t binary_operator_loc, struct pm_node *value, pm_constant_id_t binary_operator) |
| Allocate and initialize a new ConstantOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_or_write_node_t * | pm_constant_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ConstantOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_path_and_write_node_t * | pm_constant_path_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_constant_path_node *target, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ConstantPathAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_path_node_t * | pm_constant_path_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *parent, pm_constant_id_t name, pm_location_t delimiter_loc, pm_location_t name_loc) |
| Allocate and initialize a new ConstantPathNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_path_operator_write_node_t * | pm_constant_path_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_constant_path_node *target, pm_location_t binary_operator_loc, struct pm_node *value, pm_constant_id_t binary_operator) |
| Allocate and initialize a new ConstantPathOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_path_or_write_node_t * | pm_constant_path_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_constant_path_node *target, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ConstantPathOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_path_target_node_t * | pm_constant_path_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *parent, pm_constant_id_t name, pm_location_t delimiter_loc, pm_location_t name_loc) |
| Allocate and initialize a new ConstantPathTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_path_write_node_t * | pm_constant_path_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_constant_path_node *target, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new ConstantPathWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_read_node_t * | pm_constant_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new ConstantReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_target_node_t * | pm_constant_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new ConstantTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_constant_write_node_t * | pm_constant_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new ConstantWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_def_node_t * | pm_def_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, struct pm_node *receiver, struct pm_parameters_node *parameters, struct pm_node *body, pm_constant_id_list_t locals, pm_location_t def_keyword_loc, pm_location_t operator_loc, pm_location_t lparen_loc, pm_location_t rparen_loc, pm_location_t equal_loc, pm_location_t end_keyword_loc) |
| Allocate and initialize a new DefNode node. | |
| PRISM_EXPORTED_FUNCTION pm_defined_node_t * | pm_defined_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t lparen_loc, struct pm_node *value, pm_location_t rparen_loc, pm_location_t keyword_loc) |
| Allocate and initialize a new DefinedNode node. | |
| PRISM_EXPORTED_FUNCTION pm_else_node_t * | pm_else_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t else_keyword_loc, struct pm_statements_node *statements, pm_location_t end_keyword_loc) |
| Allocate and initialize a new ElseNode node. | |
| PRISM_EXPORTED_FUNCTION pm_embedded_statements_node_t * | pm_embedded_statements_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, struct pm_statements_node *statements, pm_location_t closing_loc) |
| Allocate and initialize a new EmbeddedStatementsNode node. | |
| PRISM_EXPORTED_FUNCTION pm_embedded_variable_node_t * | pm_embedded_variable_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t operator_loc, struct pm_node *variable) |
| Allocate and initialize a new EmbeddedVariableNode node. | |
| PRISM_EXPORTED_FUNCTION pm_ensure_node_t * | pm_ensure_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t ensure_keyword_loc, struct pm_statements_node *statements, pm_location_t end_keyword_loc) |
| Allocate and initialize a new EnsureNode node. | |
| PRISM_EXPORTED_FUNCTION pm_false_node_t * | pm_false_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new FalseNode node. | |
| PRISM_EXPORTED_FUNCTION pm_find_pattern_node_t * | pm_find_pattern_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *constant, struct pm_splat_node *left, pm_node_list_t requireds, struct pm_node *right, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new FindPatternNode node. | |
| PRISM_EXPORTED_FUNCTION pm_flip_flop_node_t * | pm_flip_flop_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *left, struct pm_node *right, pm_location_t operator_loc) |
| Allocate and initialize a new FlipFlopNode node. | |
| PRISM_EXPORTED_FUNCTION pm_float_node_t * | pm_float_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, double value) |
| Allocate and initialize a new FloatNode node. | |
| PRISM_EXPORTED_FUNCTION pm_for_node_t * | pm_for_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *index, struct pm_node *collection, struct pm_statements_node *statements, pm_location_t for_keyword_loc, pm_location_t in_keyword_loc, pm_location_t do_keyword_loc, pm_location_t end_keyword_loc) |
| Allocate and initialize a new ForNode node. | |
| PRISM_EXPORTED_FUNCTION pm_forwarding_arguments_node_t * | pm_forwarding_arguments_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new ForwardingArgumentsNode node. | |
| PRISM_EXPORTED_FUNCTION pm_forwarding_parameter_node_t * | pm_forwarding_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new ForwardingParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_forwarding_super_node_t * | pm_forwarding_super_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_block_node *block) |
| Allocate and initialize a new ForwardingSuperNode node. | |
| PRISM_EXPORTED_FUNCTION pm_global_variable_and_write_node_t * | pm_global_variable_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new GlobalVariableAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_global_variable_operator_write_node_t * | pm_global_variable_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t binary_operator_loc, struct pm_node *value, pm_constant_id_t binary_operator) |
| Allocate and initialize a new GlobalVariableOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_global_variable_or_write_node_t * | pm_global_variable_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new GlobalVariableOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_global_variable_read_node_t * | pm_global_variable_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new GlobalVariableReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_global_variable_target_node_t * | pm_global_variable_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new GlobalVariableTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_global_variable_write_node_t * | pm_global_variable_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new GlobalVariableWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_hash_node_t * | pm_hash_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_node_list_t elements, pm_location_t closing_loc) |
| Allocate and initialize a new HashNode node. | |
| PRISM_EXPORTED_FUNCTION pm_hash_pattern_node_t * | pm_hash_pattern_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *constant, pm_node_list_t elements, struct pm_node *rest, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new HashPatternNode node. | |
| PRISM_EXPORTED_FUNCTION pm_if_node_t * | pm_if_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t if_keyword_loc, struct pm_node *predicate, pm_location_t then_keyword_loc, struct pm_statements_node *statements, struct pm_node *subsequent, pm_location_t end_keyword_loc) |
| Allocate and initialize a new IfNode node. | |
| PRISM_EXPORTED_FUNCTION pm_imaginary_node_t * | pm_imaginary_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *numeric) |
| Allocate and initialize a new ImaginaryNode node. | |
| PRISM_EXPORTED_FUNCTION pm_implicit_node_t * | pm_implicit_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *value) |
| Allocate and initialize a new ImplicitNode node. | |
| PRISM_EXPORTED_FUNCTION pm_implicit_rest_node_t * | pm_implicit_rest_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new ImplicitRestNode node. | |
| PRISM_EXPORTED_FUNCTION pm_in_node_t * | pm_in_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *pattern, struct pm_statements_node *statements, pm_location_t in_loc, pm_location_t then_loc) |
| Allocate and initialize a new InNode node. | |
| PRISM_EXPORTED_FUNCTION pm_index_and_write_node_t * | pm_index_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_location_t opening_loc, struct pm_arguments_node *arguments, pm_location_t closing_loc, struct pm_block_argument_node *block, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new IndexAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_index_operator_write_node_t * | pm_index_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_location_t opening_loc, struct pm_arguments_node *arguments, pm_location_t closing_loc, struct pm_block_argument_node *block, pm_constant_id_t binary_operator, pm_location_t binary_operator_loc, struct pm_node *value) |
| Allocate and initialize a new IndexOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_index_or_write_node_t * | pm_index_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t call_operator_loc, pm_location_t opening_loc, struct pm_arguments_node *arguments, pm_location_t closing_loc, struct pm_block_argument_node *block, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new IndexOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_index_target_node_t * | pm_index_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *receiver, pm_location_t opening_loc, struct pm_arguments_node *arguments, pm_location_t closing_loc, struct pm_block_argument_node *block) |
| Allocate and initialize a new IndexTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_and_write_node_t * | pm_instance_variable_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new InstanceVariableAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_operator_write_node_t * | pm_instance_variable_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t binary_operator_loc, struct pm_node *value, pm_constant_id_t binary_operator) |
| Allocate and initialize a new InstanceVariableOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_or_write_node_t * | pm_instance_variable_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new InstanceVariableOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_read_node_t * | pm_instance_variable_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new InstanceVariableReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_target_node_t * | pm_instance_variable_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new InstanceVariableTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_write_node_t * | pm_instance_variable_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new InstanceVariableWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_integer_node_t * | pm_integer_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_integer_t value) |
| Allocate and initialize a new IntegerNode node. | |
| PRISM_EXPORTED_FUNCTION pm_interpolated_match_last_line_node_t * | pm_interpolated_match_last_line_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_node_list_t parts, pm_location_t closing_loc) |
| Allocate and initialize a new InterpolatedMatchLastLineNode node. | |
| PRISM_EXPORTED_FUNCTION pm_interpolated_regular_expression_node_t * | pm_interpolated_regular_expression_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_node_list_t parts, pm_location_t closing_loc) |
| Allocate and initialize a new InterpolatedRegularExpressionNode node. | |
| PRISM_EXPORTED_FUNCTION pm_interpolated_string_node_t * | pm_interpolated_string_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_node_list_t parts, pm_location_t closing_loc) |
| Allocate and initialize a new InterpolatedStringNode node. | |
| PRISM_EXPORTED_FUNCTION pm_interpolated_symbol_node_t * | pm_interpolated_symbol_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_node_list_t parts, pm_location_t closing_loc) |
| Allocate and initialize a new InterpolatedSymbolNode node. | |
| PRISM_EXPORTED_FUNCTION pm_interpolated_x_string_node_t * | pm_interpolated_x_string_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_node_list_t parts, pm_location_t closing_loc) |
| Allocate and initialize a new InterpolatedXStringNode node. | |
| PRISM_EXPORTED_FUNCTION pm_it_local_variable_read_node_t * | pm_it_local_variable_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new ItLocalVariableReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_it_parameters_node_t * | pm_it_parameters_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new ItParametersNode node. | |
| PRISM_EXPORTED_FUNCTION pm_keyword_hash_node_t * | pm_keyword_hash_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t elements) |
| Allocate and initialize a new KeywordHashNode node. | |
| PRISM_EXPORTED_FUNCTION pm_keyword_rest_parameter_node_t * | pm_keyword_rest_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc) |
| Allocate and initialize a new KeywordRestParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_lambda_node_t * | pm_lambda_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_list_t locals, pm_location_t operator_loc, pm_location_t opening_loc, pm_location_t closing_loc, struct pm_node *parameters, struct pm_node *body) |
| Allocate and initialize a new LambdaNode node. | |
| PRISM_EXPORTED_FUNCTION pm_local_variable_and_write_node_t * | pm_local_variable_and_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value, pm_constant_id_t name, uint32_t depth) |
| Allocate and initialize a new LocalVariableAndWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_local_variable_operator_write_node_t * | pm_local_variable_operator_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t name_loc, pm_location_t binary_operator_loc, struct pm_node *value, pm_constant_id_t name, pm_constant_id_t binary_operator, uint32_t depth) |
| Allocate and initialize a new LocalVariableOperatorWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_local_variable_or_write_node_t * | pm_local_variable_or_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value, pm_constant_id_t name, uint32_t depth) |
| Allocate and initialize a new LocalVariableOrWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_local_variable_read_node_t * | pm_local_variable_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, uint32_t depth) |
| Allocate and initialize a new LocalVariableReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_local_variable_target_node_t * | pm_local_variable_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, uint32_t depth) |
| Allocate and initialize a new LocalVariableTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_local_variable_write_node_t * | pm_local_variable_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, uint32_t depth, pm_location_t name_loc, struct pm_node *value, pm_location_t operator_loc) |
| Allocate and initialize a new LocalVariableWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_match_last_line_node_t * | pm_match_last_line_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_location_t content_loc, pm_location_t closing_loc, pm_string_t unescaped) |
| Allocate and initialize a new MatchLastLineNode node. | |
| PRISM_EXPORTED_FUNCTION pm_match_predicate_node_t * | pm_match_predicate_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *value, struct pm_node *pattern, pm_location_t operator_loc) |
| Allocate and initialize a new MatchPredicateNode node. | |
| PRISM_EXPORTED_FUNCTION pm_match_required_node_t * | pm_match_required_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *value, struct pm_node *pattern, pm_location_t operator_loc) |
| Allocate and initialize a new MatchRequiredNode node. | |
| PRISM_EXPORTED_FUNCTION pm_match_write_node_t * | pm_match_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_call_node *call, pm_node_list_t targets) |
| Allocate and initialize a new MatchWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_missing_node_t * | pm_missing_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new MissingNode node. | |
| PRISM_EXPORTED_FUNCTION pm_module_node_t * | pm_module_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_list_t locals, pm_location_t module_keyword_loc, struct pm_node *constant_path, struct pm_node *body, pm_location_t end_keyword_loc, pm_constant_id_t name) |
| Allocate and initialize a new ModuleNode node. | |
| PRISM_EXPORTED_FUNCTION pm_multi_target_node_t * | pm_multi_target_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t lefts, struct pm_node *rest, pm_node_list_t rights, pm_location_t lparen_loc, pm_location_t rparen_loc) |
| Allocate and initialize a new MultiTargetNode node. | |
| PRISM_EXPORTED_FUNCTION pm_multi_write_node_t * | pm_multi_write_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t lefts, struct pm_node *rest, pm_node_list_t rights, pm_location_t lparen_loc, pm_location_t rparen_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new MultiWriteNode node. | |
| PRISM_EXPORTED_FUNCTION pm_next_node_t * | pm_next_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_arguments_node *arguments, pm_location_t keyword_loc) |
| Allocate and initialize a new NextNode node. | |
| PRISM_EXPORTED_FUNCTION pm_nil_node_t * | pm_nil_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new NilNode node. | |
| PRISM_EXPORTED_FUNCTION pm_no_block_parameter_node_t * | pm_no_block_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t operator_loc, pm_location_t keyword_loc) |
| Allocate and initialize a new NoBlockParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_no_keywords_parameter_node_t * | pm_no_keywords_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t operator_loc, pm_location_t keyword_loc) |
| Allocate and initialize a new NoKeywordsParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_numbered_parameters_node_t * | pm_numbered_parameters_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, uint8_t maximum) |
| Allocate and initialize a new NumberedParametersNode node. | |
| PRISM_EXPORTED_FUNCTION pm_numbered_reference_read_node_t * | pm_numbered_reference_read_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, uint32_t number) |
| Allocate and initialize a new NumberedReferenceReadNode node. | |
| PRISM_EXPORTED_FUNCTION pm_optional_keyword_parameter_node_t * | pm_optional_keyword_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, struct pm_node *value) |
| Allocate and initialize a new OptionalKeywordParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_optional_parameter_node_t * | pm_optional_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc, struct pm_node *value) |
| Allocate and initialize a new OptionalParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_or_node_t * | pm_or_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *left, struct pm_node *right, pm_location_t operator_loc) |
| Allocate and initialize a new OrNode node. | |
| PRISM_EXPORTED_FUNCTION pm_parameters_node_t * | pm_parameters_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t requireds, pm_node_list_t optionals, struct pm_node *rest, pm_node_list_t posts, pm_node_list_t keywords, struct pm_node *keyword_rest, struct pm_node *block) |
| Allocate and initialize a new ParametersNode node. | |
| PRISM_EXPORTED_FUNCTION pm_parentheses_node_t * | pm_parentheses_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *body, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new ParenthesesNode node. | |
| PRISM_EXPORTED_FUNCTION pm_pinned_expression_node_t * | pm_pinned_expression_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *expression, pm_location_t operator_loc, pm_location_t lparen_loc, pm_location_t rparen_loc) |
| Allocate and initialize a new PinnedExpressionNode node. | |
| PRISM_EXPORTED_FUNCTION pm_pinned_variable_node_t * | pm_pinned_variable_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *variable, pm_location_t operator_loc) |
| Allocate and initialize a new PinnedVariableNode node. | |
| PRISM_EXPORTED_FUNCTION pm_post_execution_node_t * | pm_post_execution_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_statements_node *statements, pm_location_t keyword_loc, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new PostExecutionNode node. | |
| PRISM_EXPORTED_FUNCTION pm_pre_execution_node_t * | pm_pre_execution_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_statements_node *statements, pm_location_t keyword_loc, pm_location_t opening_loc, pm_location_t closing_loc) |
| Allocate and initialize a new PreExecutionNode node. | |
| PRISM_EXPORTED_FUNCTION pm_program_node_t * | pm_program_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_list_t locals, struct pm_statements_node *statements) |
| Allocate and initialize a new ProgramNode node. | |
| PRISM_EXPORTED_FUNCTION pm_range_node_t * | pm_range_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *left, struct pm_node *right, pm_location_t operator_loc) |
| Allocate and initialize a new RangeNode node. | |
| PRISM_EXPORTED_FUNCTION pm_rational_node_t * | pm_rational_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_integer_t numerator, pm_integer_t denominator) |
| Allocate and initialize a new RationalNode node. | |
| PRISM_EXPORTED_FUNCTION pm_redo_node_t * | pm_redo_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new RedoNode node. | |
| PRISM_EXPORTED_FUNCTION pm_regular_expression_node_t * | pm_regular_expression_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_location_t content_loc, pm_location_t closing_loc, pm_string_t unescaped) |
| Allocate and initialize a new RegularExpressionNode node. | |
| PRISM_EXPORTED_FUNCTION pm_required_keyword_parameter_node_t * | pm_required_keyword_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc) |
| Allocate and initialize a new RequiredKeywordParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_required_parameter_node_t * | pm_required_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name) |
| Allocate and initialize a new RequiredParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_rescue_modifier_node_t * | pm_rescue_modifier_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *expression, pm_location_t keyword_loc, struct pm_node *rescue_expression) |
| Allocate and initialize a new RescueModifierNode node. | |
| PRISM_EXPORTED_FUNCTION pm_rescue_node_t * | pm_rescue_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, pm_node_list_t exceptions, pm_location_t operator_loc, struct pm_node *reference, pm_location_t then_keyword_loc, struct pm_statements_node *statements, struct pm_rescue_node *subsequent) |
| Allocate and initialize a new RescueNode node. | |
| PRISM_EXPORTED_FUNCTION pm_rest_parameter_node_t * | pm_rest_parameter_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_t name, pm_location_t name_loc, pm_location_t operator_loc) |
| Allocate and initialize a new RestParameterNode node. | |
| PRISM_EXPORTED_FUNCTION pm_retry_node_t * | pm_retry_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new RetryNode node. | |
| PRISM_EXPORTED_FUNCTION pm_return_node_t * | pm_return_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, struct pm_arguments_node *arguments) |
| Allocate and initialize a new ReturnNode node. | |
| PRISM_EXPORTED_FUNCTION pm_self_node_t * | pm_self_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new SelfNode node. | |
| PRISM_EXPORTED_FUNCTION pm_shareable_constant_node_t * | pm_shareable_constant_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, struct pm_node *write) |
| Allocate and initialize a new ShareableConstantNode node. | |
| PRISM_EXPORTED_FUNCTION pm_singleton_class_node_t * | pm_singleton_class_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_constant_id_list_t locals, pm_location_t class_keyword_loc, pm_location_t operator_loc, struct pm_node *expression, struct pm_node *body, pm_location_t end_keyword_loc) |
| Allocate and initialize a new SingletonClassNode node. | |
| PRISM_EXPORTED_FUNCTION pm_source_encoding_node_t * | pm_source_encoding_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new SourceEncodingNode node. | |
| PRISM_EXPORTED_FUNCTION pm_source_file_node_t * | pm_source_file_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_string_t filepath) |
| Allocate and initialize a new SourceFileNode node. | |
| PRISM_EXPORTED_FUNCTION pm_source_line_node_t * | pm_source_line_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new SourceLineNode node. | |
| PRISM_EXPORTED_FUNCTION pm_splat_node_t * | pm_splat_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t operator_loc, struct pm_node *expression) |
| Allocate and initialize a new SplatNode node. | |
| PRISM_EXPORTED_FUNCTION pm_statements_node_t * | pm_statements_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t body) |
| Allocate and initialize a new StatementsNode node. | |
| PRISM_EXPORTED_FUNCTION pm_string_node_t * | pm_string_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_location_t content_loc, pm_location_t closing_loc, pm_string_t unescaped) |
| Allocate and initialize a new StringNode node. | |
| PRISM_EXPORTED_FUNCTION pm_super_node_t * | pm_super_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, pm_location_t lparen_loc, struct pm_arguments_node *arguments, pm_location_t rparen_loc, struct pm_node *block) |
| Allocate and initialize a new SuperNode node. | |
| PRISM_EXPORTED_FUNCTION pm_symbol_node_t * | pm_symbol_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_location_t value_loc, pm_location_t closing_loc, pm_string_t unescaped) |
| Allocate and initialize a new SymbolNode node. | |
| PRISM_EXPORTED_FUNCTION pm_true_node_t * | pm_true_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location) |
| Allocate and initialize a new TrueNode node. | |
| PRISM_EXPORTED_FUNCTION pm_undef_node_t * | pm_undef_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_node_list_t names, pm_location_t keyword_loc) |
| Allocate and initialize a new UndefNode node. | |
| PRISM_EXPORTED_FUNCTION pm_unless_node_t * | pm_unless_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, struct pm_node *predicate, pm_location_t then_keyword_loc, struct pm_statements_node *statements, struct pm_else_node *else_clause, pm_location_t end_keyword_loc) |
| Allocate and initialize a new UnlessNode node. | |
| PRISM_EXPORTED_FUNCTION pm_until_node_t * | pm_until_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, pm_location_t do_keyword_loc, pm_location_t closing_loc, struct pm_node *predicate, struct pm_statements_node *statements) |
| Allocate and initialize a new UntilNode node. | |
| PRISM_EXPORTED_FUNCTION pm_when_node_t * | pm_when_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, pm_node_list_t conditions, pm_location_t then_keyword_loc, struct pm_statements_node *statements) |
| Allocate and initialize a new WhenNode node. | |
| PRISM_EXPORTED_FUNCTION pm_while_node_t * | pm_while_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, pm_location_t do_keyword_loc, pm_location_t closing_loc, struct pm_node *predicate, struct pm_statements_node *statements) |
| Allocate and initialize a new WhileNode node. | |
| PRISM_EXPORTED_FUNCTION pm_x_string_node_t * | pm_x_string_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t opening_loc, pm_location_t content_loc, pm_location_t closing_loc, pm_string_t unescaped) |
| Allocate and initialize a new XStringNode node. | |
| PRISM_EXPORTED_FUNCTION pm_yield_node_t * | pm_yield_node_new (pm_arena_t *arena, uint32_t node_id, pm_node_flags_t flags, pm_location_t location, pm_location_t keyword_loc, pm_location_t lparen_loc, struct pm_arguments_node *arguments, pm_location_t rparen_loc) |
| Allocate and initialize a new YieldNode node. | |
The abstract syntax tree.
| #define PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS 0 |
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.
| typedef uint16_t pm_node_type_t |
This is the type of node embedded in the node struct.
We explicitly control the size of it here to avoid having the variable-width enum.
| typedef uint16_t pm_node_flags_t |
These are the flags embedded in the node struct.
We explicitly control the size of it here to avoid having the variable-width enum.
This is the base structure that represents a node in the syntax tree.
It is embedded into every node type.
| typedef struct pm_alias_global_variable_node pm_alias_global_variable_node_t |
AliasGlobalVariableNode.
Represents the use of the alias keyword to alias a global variable.
alias $foo $bar ^^^^^^^^^^^^^^^
| typedef struct pm_alias_method_node pm_alias_method_node_t |
AliasMethodNode.
Represents the use of the alias keyword to alias a method.
alias foo bar ^^^^^^^^^^^^^
Type: PM_ALIAS_METHOD_NODE
| typedef struct pm_alternation_pattern_node pm_alternation_pattern_node_t |
AlternationPatternNode.
Represents an alternation pattern in pattern matching.
foo => bar | baz
^^^^^^^^^
| typedef struct pm_and_node pm_and_node_t |
AndNode.
Represents the use of the && operator or the and keyword.
left and right ^^^^^^^^^^^^^^
Type: PM_AND_NODE
| typedef struct pm_arguments_node pm_arguments_node_t |
ArgumentsNode.
Represents a set of arguments to a method or a keyword.
return foo, bar, baz
^^^^^^^^^^^^^
Type: PM_ARGUMENTS_NODE
Flags (pm_arguments_node_flags):
| typedef struct pm_array_node pm_array_node_t |
ArrayNode.
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):
| typedef struct pm_array_pattern_node pm_array_pattern_node_t |
ArrayPatternNode.
Represents an array pattern in pattern matching.
foo in 1, 2
^^^^
foo in [1, 2]
^^^^^^
foo in *bar
^^^^
foo in Bar[]
^^^^^
foo in Bar[1, 2, 3]
^^^^^^^^^^^^
Type: PM_ARRAY_PATTERN_NODE
| typedef struct pm_assoc_node pm_assoc_node_t |
| typedef struct pm_assoc_splat_node pm_assoc_splat_node_t |
| typedef struct pm_back_reference_read_node pm_back_reference_read_node_t |
BackReferenceReadNode.
Represents reading a reference to a field in the previous match.
$' ^^
| typedef struct pm_begin_node pm_begin_node_t |
| typedef struct pm_block_argument_node pm_block_argument_node_t |
BlockArgumentNode.
Represents a block argument using &.
bar(&args)
^^^^^
Type: PM_BLOCK_ARGUMENT_NODE
| typedef struct pm_block_local_variable_node pm_block_local_variable_node_t |
BlockLocalVariableNode.
Represents a block local variable.
a { |; b| }
^
Type: PM_BLOCK_LOCAL_VARIABLE_NODE
Flags (pm_parameter_flags):
| typedef struct pm_block_node pm_block_node_t |
BlockNode.
Represents a block of ruby code.
[1, 2, 3].each { |i| puts x }
^^^^^^^^^^^^^^
Type: PM_BLOCK_NODE
| typedef struct pm_block_parameter_node pm_block_parameter_node_t |
BlockParameterNode.
Represents a block parameter of a method, block, or lambda definition.
def a(&b)
^^
end
Type: PM_BLOCK_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_block_parameters_node pm_block_parameters_node_t |
BlockParametersNode.
Represents a block's parameters declaration.
-> (a, b = 1; local) { }
^^^^^^^^^^^^^^^^^
foo do |a, b = 1; local|
^^^^^^^^^^^^^^^^^
end
Type: PM_BLOCK_PARAMETERS_NODE
| typedef struct pm_break_node pm_break_node_t |
| typedef struct pm_call_and_write_node pm_call_and_write_node_t |
CallAndWriteNode.
Represents the use of the &&= operator on a call.
foo.bar &&= value ^^^^^^^^^^^^^^^^^
Type: PM_CALL_AND_WRITE_NODE
Flags (pm_call_node_flags):
| typedef struct pm_call_node pm_call_node_t |
CallNode.
Represents a method call, in all of the various forms that can take.
foo ^^^ foo() ^^^^^ +foo ^^^^ foo + bar ^^^^^^^^^ foo.bar ^^^^^^^ foo&.bar ^^^^^^^^
Type: PM_CALL_NODE
Flags (pm_call_node_flags):
| typedef struct pm_call_operator_write_node pm_call_operator_write_node_t |
CallOperatorWriteNode.
Represents the use of an assignment operator on a call.
foo.bar += baz ^^^^^^^^^^^^^^
Type: PM_CALL_OPERATOR_WRITE_NODE
Flags (pm_call_node_flags):
| typedef struct pm_call_or_write_node pm_call_or_write_node_t |
CallOrWriteNode.
Represents the use of the ||= operator on a call.
foo.bar ||= value ^^^^^^^^^^^^^^^^^
Type: PM_CALL_OR_WRITE_NODE
Flags (pm_call_node_flags):
| typedef struct pm_call_target_node pm_call_target_node_t |
CallTargetNode.
Represents assigning to a method call.
foo.bar, = 1
^^^^^^^
begin
rescue => foo.bar
^^^^^^^
end
for foo.bar in baz do end
^^^^^^^
Type: PM_CALL_TARGET_NODE
Flags (pm_call_node_flags):
| typedef struct pm_capture_pattern_node pm_capture_pattern_node_t |
CapturePatternNode.
Represents assigning to a local variable in pattern matching.
foo => [bar => baz]
^^^^^^^^^^
Type: PM_CAPTURE_PATTERN_NODE
| typedef struct pm_case_match_node pm_case_match_node_t |
CaseMatchNode.
Represents the use of a case statement for pattern matching.
case true in false end ^^^^^^^^^
Type: PM_CASE_MATCH_NODE
| typedef struct pm_case_node pm_case_node_t |
CaseNode.
Represents the use of a case statement.
case true when false end ^^^^^^^^^^
Type: PM_CASE_NODE
| typedef struct pm_class_node pm_class_node_t |
ClassNode.
Represents a class declaration involving the class keyword.
class Foo end ^^^^^^^^^^^^^
Type: PM_CLASS_NODE
ClassVariableAndWriteNode.
Represents the use of the &&= operator for assignment to a class variable.
@@target &&= value ^^^^^^^^^^^^^^^^^^
ClassVariableOperatorWriteNode.
Represents assigning to a class variable using an operator that isn't =.
@@target += value ^^^^^^^^^^^^^^^^^
| typedef struct pm_class_variable_or_write_node pm_class_variable_or_write_node_t |
ClassVariableOrWriteNode.
Represents the use of the ||= operator for assignment to a class variable.
@@target ||= value ^^^^^^^^^^^^^^^^^^
| typedef struct pm_class_variable_read_node pm_class_variable_read_node_t |
ClassVariableReadNode.
Represents referencing a class variable.
@@foo ^^^^^
| typedef struct pm_class_variable_target_node pm_class_variable_target_node_t |
ClassVariableTargetNode.
Represents writing to a class variable in a context that doesn't have an explicit value.
@@foo, @@bar = baz ^^^^^ ^^^^^
| typedef struct pm_class_variable_write_node pm_class_variable_write_node_t |
ClassVariableWriteNode.
Represents writing to a class variable.
@@foo = 1 ^^^^^^^^^
| typedef struct pm_constant_and_write_node pm_constant_and_write_node_t |
ConstantAndWriteNode.
Represents the use of the &&= operator for assignment to a constant.
Target &&= value ^^^^^^^^^^^^^^^^
| typedef struct pm_constant_operator_write_node pm_constant_operator_write_node_t |
ConstantOperatorWriteNode.
Represents assigning to a constant using an operator that isn't =.
Target += value ^^^^^^^^^^^^^^^
| typedef struct pm_constant_or_write_node pm_constant_or_write_node_t |
ConstantOrWriteNode.
Represents the use of the ||= operator for assignment to a constant.
Target ||= value ^^^^^^^^^^^^^^^^
| typedef struct pm_constant_path_and_write_node pm_constant_path_and_write_node_t |
ConstantPathAndWriteNode.
Represents the use of the &&= operator for assignment to a constant path.
Parent::Child &&= value ^^^^^^^^^^^^^^^^^^^^^^^
| typedef struct pm_constant_path_node pm_constant_path_node_t |
ConstantPathNode.
Represents accessing a constant through a path of :: operators.
Foo::Bar ^^^^^^^^
Type: PM_CONSTANT_PATH_NODE
ConstantPathOperatorWriteNode.
Represents assigning to a constant path using an operator that isn't =.
Parent::Child += value ^^^^^^^^^^^^^^^^^^^^^^
| typedef struct pm_constant_path_or_write_node pm_constant_path_or_write_node_t |
ConstantPathOrWriteNode.
Represents the use of the ||= operator for assignment to a constant path.
Parent::Child ||= value ^^^^^^^^^^^^^^^^^^^^^^^
| typedef struct pm_constant_path_target_node pm_constant_path_target_node_t |
ConstantPathTargetNode.
Represents writing to a constant path in a context that doesn't have an explicit value.
Foo::Foo, Bar::Bar = baz ^^^^^^^^ ^^^^^^^^
| typedef struct pm_constant_path_write_node pm_constant_path_write_node_t |
ConstantPathWriteNode.
Represents writing to a constant path.
::Foo = 1 ^^^^^^^^^ Foo::Bar = 1 ^^^^^^^^^^^^ ::Foo::Bar = 1 ^^^^^^^^^^^^^^
| typedef struct pm_constant_read_node pm_constant_read_node_t |
| typedef struct pm_constant_target_node pm_constant_target_node_t |
ConstantTargetNode.
Represents writing to a constant in a context that doesn't have an explicit value.
Foo, Bar = baz ^^^ ^^^
Type: PM_CONSTANT_TARGET_NODE
| typedef struct pm_constant_write_node pm_constant_write_node_t |
| typedef struct pm_def_node pm_def_node_t |
| typedef struct pm_defined_node pm_defined_node_t |
DefinedNode.
Represents the use of the defined? keyword.
defined?(a) ^^^^^^^^^^^
Type: PM_DEFINED_NODE
| typedef struct pm_else_node pm_else_node_t |
ElseNode.
Represents an else clause in a case, if, or unless statement.
if a then b else c end
^^^^^^^^^^
Type: PM_ELSE_NODE
| typedef struct pm_embedded_statements_node pm_embedded_statements_node_t |
EmbeddedStatementsNode.
Represents an interpolated set of statements.
"foo #{bar}"
^^^^^^
| typedef struct pm_embedded_variable_node pm_embedded_variable_node_t |
EmbeddedVariableNode.
Represents an interpolated variable.
"foo #@bar"
^^^^^
| typedef struct pm_ensure_node pm_ensure_node_t |
EnsureNode.
Represents an ensure clause in a begin statement.
begin foo ensure ^^^^^^ bar end
Type: PM_ENSURE_NODE
| typedef struct pm_false_node pm_false_node_t |
| typedef struct pm_find_pattern_node pm_find_pattern_node_t |
FindPatternNode.
Represents a find pattern in pattern matching.
foo in *bar, baz, *qux
^^^^^^^^^^^^^^^
foo in [*bar, baz, *qux]
^^^^^^^^^^^^^^^^^
foo in Foo(*bar, baz, *qux)
^^^^^^^^^^^^^^^^^^^^
foo => *bar, baz, *qux
^^^^^^^^^^^^^^^
Type: PM_FIND_PATTERN_NODE
| typedef struct pm_flip_flop_node pm_flip_flop_node_t |
FlipFlopNode.
Represents the use of the .. or ... operators to create flip flops.
baz if foo .. bar
^^^^^^^^^^
Type: PM_FLIP_FLOP_NODE
Flags (pm_range_flags):
| typedef struct pm_float_node pm_float_node_t |
| typedef struct pm_for_node pm_for_node_t |
| typedef struct pm_forwarding_arguments_node pm_forwarding_arguments_node_t |
ForwardingArgumentsNode.
Represents forwarding all arguments to this method to another method.
def foo(...)
bar(...)
^^^
end
| typedef struct pm_forwarding_parameter_node pm_forwarding_parameter_node_t |
ForwardingParameterNode.
Represents the use of the forwarding parameter in a method, block, or lambda declaration.
def foo(...)
^^^
end
| typedef struct pm_forwarding_super_node pm_forwarding_super_node_t |
ForwardingSuperNode.
Represents the use of the super keyword without parentheses or arguments, but which might have a block.
super
^^^^^
super { 123 }
^^^^^^^^^^^^^
If it has any other arguments, it would be a SuperNode instead.
Type: PM_FORWARDING_SUPER_NODE
GlobalVariableAndWriteNode.
Represents the use of the &&= operator for assignment to a global variable.
$target &&= value ^^^^^^^^^^^^^^^^^
GlobalVariableOperatorWriteNode.
Represents assigning to a global variable using an operator that isn't =.
$target += value ^^^^^^^^^^^^^^^^
GlobalVariableOrWriteNode.
Represents the use of the ||= operator for assignment to a global variable.
$target ||= value ^^^^^^^^^^^^^^^^^
| typedef struct pm_global_variable_read_node pm_global_variable_read_node_t |
GlobalVariableReadNode.
Represents referencing a global variable.
$foo ^^^^
| typedef struct pm_global_variable_target_node pm_global_variable_target_node_t |
GlobalVariableTargetNode.
Represents writing to a global variable in a context that doesn't have an explicit value.
$foo, $bar = baz ^^^^ ^^^^
| typedef struct pm_global_variable_write_node pm_global_variable_write_node_t |
GlobalVariableWriteNode.
Represents writing to a global variable.
$foo = 1 ^^^^^^^^
| typedef struct pm_hash_node pm_hash_node_t |
| typedef struct pm_hash_pattern_node pm_hash_pattern_node_t |
HashPatternNode.
Represents a hash pattern in pattern matching.
foo => { a: 1, b: 2 }
^^^^^^^^^^^^^^
foo => { a: 1, b: 2, **c }
^^^^^^^^^^^^^^^^^^^
foo => Bar[a: 1, b: 2]
^^^^^^^^^^^^^^^
foo in { a: 1, b: 2 }
^^^^^^^^^^^^^^
Type: PM_HASH_PATTERN_NODE
| typedef struct pm_if_node pm_if_node_t |
IfNode.
Represents the use of the if keyword, either in the block form or the modifier form, or a ternary expression.
bar if foo ^^^^^^^^^^ if foo then bar end ^^^^^^^^^^^^^^^^^^^ foo ? bar : baz ^^^^^^^^^^^^^^^
Type: PM_IF_NODE
| typedef struct pm_imaginary_node pm_imaginary_node_t |
| typedef struct pm_implicit_node pm_implicit_node_t |
ImplicitNode.
Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
{ foo: }
^^^^
{ Foo: }
^^^^
foo in { bar: }
^^^^
Type: PM_IMPLICIT_NODE
| typedef struct pm_implicit_rest_node pm_implicit_rest_node_t |
ImplicitRestNode.
Represents using a trailing comma to indicate an implicit rest parameter.
foo { |bar,| }
^
foo in [bar,]
^
for foo, in bar do end
^
foo, = bar
^
Type: PM_IMPLICIT_REST_NODE
| typedef struct pm_in_node pm_in_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
| typedef struct pm_index_and_write_node pm_index_and_write_node_t |
IndexAndWriteNode.
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):
| typedef struct pm_index_operator_write_node pm_index_operator_write_node_t |
IndexOperatorWriteNode.
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):
| typedef struct pm_index_or_write_node pm_index_or_write_node_t |
IndexOrWriteNode.
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):
| typedef struct pm_index_target_node pm_index_target_node_t |
IndexTargetNode.
Represents assigning to an index.
foo[bar], = 1
^^^^^^^^
begin
rescue => foo[bar]
^^^^^^^^
end
for foo[bar] in baz do end
^^^^^^^^
Type: PM_INDEX_TARGET_NODE
Flags (pm_call_node_flags):
InstanceVariableAndWriteNode.
Represents the use of the &&= operator for assignment to an instance variable.
@target &&= value ^^^^^^^^^^^^^^^^^
InstanceVariableOperatorWriteNode.
Represents assigning to an instance variable using an operator that isn't =.
@target += value ^^^^^^^^^^^^^^^^
InstanceVariableOrWriteNode.
Represents the use of the ||= operator for assignment to an instance variable.
@target ||= value ^^^^^^^^^^^^^^^^^
| typedef struct pm_instance_variable_read_node pm_instance_variable_read_node_t |
InstanceVariableReadNode.
Represents referencing an instance variable.
@foo ^^^^
InstanceVariableTargetNode.
Represents writing to an instance variable in a context that doesn't have an explicit value.
@foo, @bar = baz ^^^^ ^^^^
| typedef struct pm_instance_variable_write_node pm_instance_variable_write_node_t |
InstanceVariableWriteNode.
Represents writing to an instance variable.
@foo = 1 ^^^^^^^^
| typedef struct pm_integer_node pm_integer_node_t |
IntegerNode.
Represents an integer number literal.
1 ^
Type: PM_INTEGER_NODE
Flags (pm_integer_base_flags):
InterpolatedMatchLastLineNode.
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):
InterpolatedRegularExpressionNode.
Represents a regular expression literal that contains interpolation.
/foo #{bar} baz/
^^^^^^^^^^^^^^^^
Type: PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
Flags (pm_regular_expression_flags):
| typedef struct pm_interpolated_string_node pm_interpolated_string_node_t |
InterpolatedStringNode.
Represents a string literal that contains interpolation.
"foo #{bar} baz"
^^^^^^^^^^^^^^^^
Type: PM_INTERPOLATED_STRING_NODE
Flags (pm_interpolated_string_node_flags):
| typedef struct pm_interpolated_symbol_node pm_interpolated_symbol_node_t |
InterpolatedSymbolNode.
Represents a symbol literal that contains interpolation.
:"foo #{bar} baz"
^^^^^^^^^^^^^^^^^
| typedef struct pm_interpolated_x_string_node pm_interpolated_x_string_node_t |
InterpolatedXStringNode.
Represents an xstring literal that contains interpolation.
`foo #{bar} baz`
^^^^^^^^^^^^^^^^
| typedef struct pm_it_local_variable_read_node pm_it_local_variable_read_node_t |
ItLocalVariableReadNode.
Represents reading from the implicit it local variable.
-> { it }
^^
| typedef struct pm_it_parameters_node pm_it_parameters_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
| typedef struct pm_keyword_hash_node pm_keyword_hash_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):
| typedef struct pm_keyword_rest_parameter_node pm_keyword_rest_parameter_node_t |
KeywordRestParameterNode.
Represents a keyword rest parameter to a method, block, or lambda definition.
def a(**b)
^^^
end
Type: PM_KEYWORD_REST_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_lambda_node pm_lambda_node_t |
LambdaNode.
Represents using a lambda literal (not the lambda method call).
->(value) { value * 2 }
^^^^^^^^^^^^^^^^^^^^^^^
Type: PM_LAMBDA_NODE
LocalVariableAndWriteNode.
Represents the use of the &&= operator for assignment to a local variable.
target &&= value ^^^^^^^^^^^^^^^^
LocalVariableOperatorWriteNode.
Represents assigning to a local variable using an operator that isn't =.
target += value ^^^^^^^^^^^^^^^
| typedef struct pm_local_variable_or_write_node pm_local_variable_or_write_node_t |
LocalVariableOrWriteNode.
Represents the use of the ||= operator for assignment to a local variable.
target ||= value ^^^^^^^^^^^^^^^^
| typedef struct pm_local_variable_read_node pm_local_variable_read_node_t |
LocalVariableReadNode.
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 ^^^
| typedef struct pm_local_variable_target_node pm_local_variable_target_node_t |
LocalVariableTargetNode.
Represents writing to a local variable in a context that doesn't have an explicit value.
foo, bar = baz
^^^ ^^^
foo => baz
^^^
| typedef struct pm_local_variable_write_node pm_local_variable_write_node_t |
LocalVariableWriteNode.
Represents writing to a local variable.
foo = 1 ^^^^^^^
| typedef struct pm_match_last_line_node pm_match_last_line_node_t |
MatchLastLineNode.
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):
| typedef struct pm_match_predicate_node pm_match_predicate_node_t |
MatchPredicateNode.
Represents the use of the modifier in operator.
foo in bar ^^^^^^^^^^
Type: PM_MATCH_PREDICATE_NODE
| typedef struct pm_match_required_node pm_match_required_node_t |
MatchRequiredNode.
Represents the use of the => operator.
foo => bar ^^^^^^^^^^
Type: PM_MATCH_REQUIRED_NODE
| typedef struct pm_match_write_node pm_match_write_node_t |
MatchWriteNode.
Represents writing local variables using a regular expression match with named capture groups.
/(?<foo>bar)/ =~ baz ^^^^^^^^^^^^^^^^^^^^
Type: PM_MATCH_WRITE_NODE
| typedef struct pm_missing_node pm_missing_node_t |
MissingNode.
Represents a node that is missing from the source and results in a syntax error.
Type: PM_MISSING_NODE
| typedef struct pm_module_node pm_module_node_t |
ModuleNode.
Represents a module declaration involving the module keyword.
module Foo end ^^^^^^^^^^^^^^
Type: PM_MODULE_NODE
| typedef struct pm_multi_target_node pm_multi_target_node_t |
MultiTargetNode.
Represents a multi-target expression.
a, (b, c) = 1, 2, 3 ^^^^^^
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
| typedef struct pm_multi_write_node pm_multi_write_node_t |
MultiWriteNode.
Represents a write to a multi-target expression.
a, b, c = 1, 2, 3 ^^^^^^^^^^^^^^^^^
Type: PM_MULTI_WRITE_NODE
| typedef struct pm_next_node pm_next_node_t |
| typedef struct pm_nil_node pm_nil_node_t |
| typedef struct pm_no_block_parameter_node pm_no_block_parameter_node_t |
NoBlockParameterNode.
Represents the use of &nil inside method arguments.
def a(&nil)
^^^^
end
| typedef struct pm_no_keywords_parameter_node pm_no_keywords_parameter_node_t |
NoKeywordsParameterNode.
Represents the use of **nil inside method arguments.
def a(**nil)
^^^^^
end
| typedef struct pm_numbered_parameters_node pm_numbered_parameters_node_t |
NumberedParametersNode.
Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
-> { _1 + _2 }
^^^^^^^^^^^^^^
| typedef struct pm_numbered_reference_read_node pm_numbered_reference_read_node_t |
NumberedReferenceReadNode.
Represents reading a numbered reference to a capture in the previous match.
$1 ^^
OptionalKeywordParameterNode.
Represents an optional keyword parameter to a method, block, or lambda definition.
def a(b: 1)
^^^^
end
Type: PM_OPTIONAL_KEYWORD_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_optional_parameter_node pm_optional_parameter_node_t |
OptionalParameterNode.
Represents an optional parameter to a method, block, or lambda definition.
def a(b = 1)
^^^^^
end
Type: PM_OPTIONAL_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_or_node pm_or_node_t |
OrNode.
Represents the use of the || operator or the or keyword.
left or right ^^^^^^^^^^^^^
Type: PM_OR_NODE
| typedef struct pm_parameters_node pm_parameters_node_t |
ParametersNode.
Represents the list of parameters on a method, block, or lambda definition.
def a(b, c, d)
^^^^^^^
end
Type: PM_PARAMETERS_NODE
| typedef struct pm_parentheses_node pm_parentheses_node_t |
ParenthesesNode.
Represents a parenthesized expression
(10 + 34) ^^^^^^^^^
Type: PM_PARENTHESES_NODE
Flags (pm_parentheses_node_flags):
| typedef struct pm_pinned_expression_node pm_pinned_expression_node_t |
PinnedExpressionNode.
Represents the use of the ^ operator for pinning an expression in a pattern matching expression.
foo in ^(bar)
^^^^^^
| typedef struct pm_pinned_variable_node pm_pinned_variable_node_t |
PinnedVariableNode.
Represents the use of the ^ operator for pinning a variable in a pattern matching expression.
foo in ^bar
^^^^
Type: PM_PINNED_VARIABLE_NODE
| typedef struct pm_post_execution_node pm_post_execution_node_t |
PostExecutionNode.
Represents the use of the END keyword.
END { foo }
^^^^^^^^^^^
Type: PM_POST_EXECUTION_NODE
| typedef struct pm_pre_execution_node pm_pre_execution_node_t |
PreExecutionNode.
Represents the use of the BEGIN keyword.
BEGIN { foo }
^^^^^^^^^^^^^
Type: PM_PRE_EXECUTION_NODE
| typedef struct pm_program_node pm_program_node_t |
| typedef struct pm_range_node pm_range_node_t |
RangeNode.
Represents the use of the .. or ... operators.
1..2
^^^^
c if a =~ /left/ ... b =~ /right/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Type: PM_RANGE_NODE
Flags (pm_range_flags):
| typedef struct pm_rational_node pm_rational_node_t |
RationalNode.
Represents a rational number literal.
1.0r ^^^^
Type: PM_RATIONAL_NODE
Flags (pm_integer_base_flags):
| typedef struct pm_redo_node pm_redo_node_t |
| typedef struct pm_regular_expression_node pm_regular_expression_node_t |
RegularExpressionNode.
Represents a regular expression literal with no interpolation.
/foo/i ^^^^^^
Type: PM_REGULAR_EXPRESSION_NODE
Flags (pm_regular_expression_flags):
RequiredKeywordParameterNode.
Represents a required keyword parameter to a method, block, or lambda definition.
def a(b: )
^^
end
Type: PM_REQUIRED_KEYWORD_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_required_parameter_node pm_required_parameter_node_t |
RequiredParameterNode.
Represents a required parameter to a method, block, or lambda definition.
def a(b)
^
end
Type: PM_REQUIRED_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_rescue_modifier_node pm_rescue_modifier_node_t |
RescueModifierNode.
Represents an expression modified with a rescue.
foo rescue nil ^^^^^^^^^^^^^^
Type: PM_RESCUE_MODIFIER_NODE
| typedef struct pm_rescue_node pm_rescue_node_t |
RescueNode.
Represents a rescue statement.
begin rescue Foo, *splat, Bar => ex foo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ end
Foo, *splat, Bar are in the exceptions field. ex is in the reference field.
Type: PM_RESCUE_NODE
| typedef struct pm_rest_parameter_node pm_rest_parameter_node_t |
RestParameterNode.
Represents a rest parameter to a method, block, or lambda definition.
def a(*b)
^^
end
Type: PM_REST_PARAMETER_NODE
Flags (pm_parameter_flags):
| typedef struct pm_retry_node pm_retry_node_t |
| typedef struct pm_return_node pm_return_node_t |
| typedef struct pm_self_node pm_self_node_t |
| typedef struct pm_shareable_constant_node pm_shareable_constant_node_t |
ShareableConstantNode.
This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
# shareable_constant_value: literal
C = { a: 1 }
^^^^^^^^^^^^
Type: PM_SHAREABLE_CONSTANT_NODE
Flags (pm_shareable_constant_node_flags):
| typedef struct pm_singleton_class_node pm_singleton_class_node_t |
SingletonClassNode.
Represents a singleton class declaration involving the class keyword.
class << self end ^^^^^^^^^^^^^^^^^
Type: PM_SINGLETON_CLASS_NODE
| typedef struct pm_source_encoding_node pm_source_encoding_node_t |
SourceEncodingNode.
Represents the use of the __ENCODING__ keyword.
__ENCODING__ ^^^^^^^^^^^^
Type: PM_SOURCE_ENCODING_NODE
| typedef struct pm_source_file_node pm_source_file_node_t |
SourceFileNode.
Represents the use of the __FILE__ keyword.
__FILE__ ^^^^^^^^
Type: PM_SOURCE_FILE_NODE
Flags (pm_string_flags):
| typedef struct pm_source_line_node pm_source_line_node_t |
SourceLineNode.
Represents the use of the __LINE__ keyword.
__LINE__ ^^^^^^^^
Type: PM_SOURCE_LINE_NODE
| typedef struct pm_splat_node pm_splat_node_t |
| typedef struct pm_statements_node pm_statements_node_t |
StatementsNode.
Represents a set of statements contained within some scope.
foo; bar; baz ^^^^^^^^^^^^^
Type: PM_STATEMENTS_NODE
| typedef struct pm_string_node pm_string_node_t |
StringNode.
Represents a string literal, a string contained within a w list, or plain string content within an interpolated string.
"foo"
^^^^^
%w[foo]
^^^
"foo #{bar} baz"
^^^^ ^^^^
Type: PM_STRING_NODE
Flags (pm_string_flags):
| typedef struct pm_super_node pm_super_node_t |
SuperNode.
Represents the use of the super keyword with parentheses or arguments.
super() ^^^^^^^ super foo, bar ^^^^^^^^^^^^^^
If no arguments are provided (except for a block), it would be a ForwardingSuperNode instead.
Type: PM_SUPER_NODE
| typedef struct pm_symbol_node pm_symbol_node_t |
SymbolNode.
Represents a symbol literal or a symbol contained within a i list.
:foo ^^^^ %i[foo] ^^^
Type: PM_SYMBOL_NODE
Flags (pm_symbol_flags):
| typedef struct pm_true_node pm_true_node_t |
| typedef struct pm_undef_node pm_undef_node_t |
UndefNode.
Represents the use of the undef keyword.
undef :foo, :bar, :baz ^^^^^^^^^^^^^^^^^^^^^^
Type: PM_UNDEF_NODE
| typedef struct pm_unless_node pm_unless_node_t |
UnlessNode.
Represents the use of the unless keyword, either in the block form or the modifier form.
bar unless foo ^^^^^^^^^^^^^^ unless foo then bar end ^^^^^^^^^^^^^^^^^^^^^^^
Type: PM_UNLESS_NODE
| typedef struct pm_until_node pm_until_node_t |
UntilNode.
Represents the use of the until keyword, either in the block form or the modifier form.
bar until foo ^^^^^^^^^^^^^ until foo do bar end ^^^^^^^^^^^^^^^^^^^^
Type: PM_UNTIL_NODE
Flags (pm_loop_flags):
| typedef struct pm_when_node pm_when_node_t |
WhenNode.
Represents the use of the when keyword within a case statement.
case true when true ^^^^^^^^^ end
Type: PM_WHEN_NODE
| typedef struct pm_while_node pm_while_node_t |
WhileNode.
Represents the use of the while keyword, either in the block form or the modifier form.
bar while foo ^^^^^^^^^^^^^ while foo do bar end ^^^^^^^^^^^^^^^^^^^^
Type: PM_WHILE_NODE
Flags (pm_loop_flags):
| typedef struct pm_x_string_node pm_x_string_node_t |
XStringNode.
Represents an xstring literal with no interpolation.
`foo` ^^^^^
Type: PM_X_STRING_NODE
Flags (pm_encoding_flags):
| typedef struct pm_yield_node pm_yield_node_t |
| enum pm_token_type |
This enum represents every type of token in the Ruby source.
| enum pm_node_type |
This enum represents every type of node in the Ruby syntax tree.
Flags for arguments nodes.
| enum pm_array_node_flags |
| enum pm_call_node_flags |
Flags for call nodes.
| enum pm_encoding_flags |
Flags for interpolated string nodes that indicated mutability if they are also marked as literals.
| enum pm_loop_flags |
| enum pm_parameter_flags |
| enum pm_range_flags |
Flags for regular expression and match last line nodes.
Flags for shareable constant nodes.
| enum pm_string_flags |
Flags for string nodes.
| enum pm_symbol_flags |
| PRISM_EXPORTED_FUNCTION const char * pm_token_type | ( | pm_token_type_t | token_type | ) |
Returns a string representation of the given token type.
| token_type | The type of the token to get the string representation of. |
| PRISM_EXPORTED_FUNCTION pm_alias_global_variable_node_t * pm_alias_global_variable_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | new_name, | ||
| struct pm_node * | old_name, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new AliasGlobalVariableNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| new_name | Represents the new name of the global variable that can be used after aliasing. |
| old_name | Represents the old name of the global variable that can be used before aliasing. |
| keyword_loc | The Location of the `alias` keyword. |
| PRISM_EXPORTED_FUNCTION pm_alias_method_node_t * pm_alias_method_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | new_name, | ||
| struct pm_node * | old_name, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new AliasMethodNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| new_name | Represents the new name of the method that will be aliased. |
| old_name | Represents the old name of the method that will be aliased. |
| keyword_loc | Represents the Location of the `alias` keyword. |
| PRISM_EXPORTED_FUNCTION pm_alternation_pattern_node_t * pm_alternation_pattern_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | left, | ||
| struct pm_node * | right, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new AlternationPatternNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| left | Represents the left side of the expression. |
| right | Represents the right side of the expression. |
| operator_loc | Represents the alternation operator Location. |
| PRISM_EXPORTED_FUNCTION pm_and_node_t * pm_and_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | left, | ||
| struct pm_node * | right, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new AndNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| left | Represents the left side of the expression. It can be any non-void expression. |
| right | Represents the right side of the expression. |
| operator_loc | The Location of the `and` keyword or the `&&` operator. |
| PRISM_EXPORTED_FUNCTION pm_arguments_node_t * pm_arguments_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | arguments | ||
| ) |
Allocate and initialize a new ArgumentsNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| arguments | The list of arguments, if present. These can be any non-void expressions. |
| PRISM_EXPORTED_FUNCTION pm_array_node_t * pm_array_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | elements, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new ArrayNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| elements | Represent the list of zero or more non-void expressions within the array. |
| opening_loc | Represents the optional source Location for the opening token. |
| closing_loc | Represents the optional source Location for the closing token. |
| PRISM_EXPORTED_FUNCTION pm_array_pattern_node_t * pm_array_pattern_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | constant, | ||
| pm_node_list_t | requireds, | ||
| struct pm_node * | rest, | ||
| pm_node_list_t | posts, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new ArrayPatternNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| constant | Represents the optional constant preceding the Array |
| requireds | Represents the required elements of the array pattern. |
| rest | Represents the rest element of the array pattern. |
| posts | Represents the elements after the rest element of the array pattern. |
| opening_loc | Represents the opening Location of the array pattern. |
| closing_loc | Represents the closing Location of the array pattern. |
| PRISM_EXPORTED_FUNCTION pm_assoc_node_t * pm_assoc_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | key, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new AssocNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| key | The key of the association. This can be any non-void expression. |
| value | The value of the association, if present. This can be any non-void expression. |
| operator_loc | The Location of the `=>` operator, if present. |
| PRISM_EXPORTED_FUNCTION pm_assoc_splat_node_t * pm_assoc_splat_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new AssocSplatNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. |
| operator_loc | The Location of the `**` operator. |
| PRISM_EXPORTED_FUNCTION pm_back_reference_read_node_t * pm_back_reference_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new BackReferenceReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the back-reference variable, including the leading `$`. |
| PRISM_EXPORTED_FUNCTION pm_begin_node_t * pm_begin_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | begin_keyword_loc, | ||
| struct pm_statements_node * | statements, | ||
| struct pm_rescue_node * | rescue_clause, | ||
| struct pm_else_node * | else_clause, | ||
| struct pm_ensure_node * | ensure_clause, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new BeginNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| begin_keyword_loc | Represents the Location of the `begin` keyword. |
| statements | Represents the statements within the begin block. |
| rescue_clause | Represents the rescue clause within the begin block. |
| else_clause | Represents the else clause within the begin block. |
| ensure_clause | Represents the ensure clause within the begin block. |
| end_keyword_loc | Represents the Location of the `end` keyword. |
| PRISM_EXPORTED_FUNCTION pm_block_argument_node_t * pm_block_argument_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | expression, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new BlockArgumentNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| expression | The expression that is being passed as a block argument. This can be any non-void expression. |
| operator_loc | Represents the Location of the `&` operator. |
| PRISM_EXPORTED_FUNCTION pm_block_local_variable_node_t * pm_block_local_variable_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new BlockLocalVariableNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the block local variable. |
| PRISM_EXPORTED_FUNCTION pm_block_node_t * pm_block_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_list_t | locals, | ||
| struct pm_node * | parameters, | ||
| struct pm_node * | body, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new BlockNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| locals | The local variables declared in the block. |
| parameters | The parameters of the block. |
| body | The body of the block. |
| opening_loc | Represents the Location of the opening `{` or `do`. |
| closing_loc | Represents the Location of the closing `}` or `end`. |
| PRISM_EXPORTED_FUNCTION pm_block_parameter_node_t * pm_block_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new BlockParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the block parameter. |
| name_loc | Represents the Location of the block parameter name. |
| operator_loc | Represents the Location of the `&` operator. |
| PRISM_EXPORTED_FUNCTION pm_block_parameters_node_t * pm_block_parameters_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_parameters_node * | parameters, | ||
| pm_node_list_t | locals, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new BlockParametersNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| parameters | Represents the parameters of the block. |
| locals | Represents the local variables of the block. |
| opening_loc | Represents the opening Location of the block parameters. |
| closing_loc | Represents the closing Location of the block parameters. |
| PRISM_EXPORTED_FUNCTION pm_break_node_t * pm_break_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new BreakNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| arguments | The arguments to the break statement, if present. These can be any non-void expressions. |
| keyword_loc | The Location of the `break` keyword. |
| PRISM_EXPORTED_FUNCTION pm_call_and_write_node_t * pm_call_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_location_t | message_loc, | ||
| pm_constant_id_t | read_name, | ||
| pm_constant_id_t | write_name, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new CallAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The object that the method is being called on. This can be either `nil` or any non-void expression. |
| call_operator_loc | Represents the Location of the call operator. |
| message_loc | Represents the Location of the message. |
| read_name | Represents the name of the method being called. |
| write_name | Represents the name of the method being written to. |
| operator_loc | Represents the Location of the operator. |
| value | Represents the value being assigned. |
| PRISM_EXPORTED_FUNCTION pm_call_node_t * pm_call_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | message_loc, | ||
| pm_location_t | opening_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | closing_loc, | ||
| pm_location_t | equal_loc, | ||
| struct pm_node * | block | ||
| ) |
Allocate and initialize a new CallNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The object that the method is being called on. This can be either `nil` or any non-void expression. |
| call_operator_loc | Represents the Location of the call operator. |
| name | Represents the name of the method being called. |
| message_loc | Represents the Location of the message. |
| opening_loc | Represents the Location of the left parenthesis. |
| arguments | Represents the arguments to the method call. These can be any non-void expressions. |
| closing_loc | Represents the Location of the right parenthesis. |
| equal_loc | Represents the Location of the equal sign, in the case that this is an attribute write. |
| block | Represents the block that is being passed to the method. |
| PRISM_EXPORTED_FUNCTION pm_call_operator_write_node_t * pm_call_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_location_t | message_loc, | ||
| pm_constant_id_t | read_name, | ||
| pm_constant_id_t | write_name, | ||
| pm_constant_id_t | binary_operator, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new CallOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The object that the method is being called on. This can be either `nil` or any non-void expressions. |
| call_operator_loc | Represents the Location of the call operator. |
| message_loc | Represents the Location of the message. |
| read_name | Represents the name of the method being called. |
| write_name | Represents the name of the method being written to. |
| binary_operator | Represents the binary operator being used. |
| binary_operator_loc | Represents the Location of the binary operator. |
| value | Represents the value being assigned. |
| PRISM_EXPORTED_FUNCTION pm_call_or_write_node_t * pm_call_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_location_t | message_loc, | ||
| pm_constant_id_t | read_name, | ||
| pm_constant_id_t | write_name, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new CallOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The object that the method is being called on. This can be either `nil` or any non-void expressions. |
| call_operator_loc | Represents the Location of the call operator. |
| message_loc | Represents the Location of the message. |
| read_name | Represents the name of the method being called. |
| write_name | Represents the name of the method being written to. |
| operator_loc | Represents the Location of the operator. |
| value | Represents the value being assigned. |
| PRISM_EXPORTED_FUNCTION pm_call_target_node_t * pm_call_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | message_loc | ||
| ) |
Allocate and initialize a new CallTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The object that the method is being called on. This can be any non-void expression. |
| call_operator_loc | Represents the Location of the call operator. |
| name | Represents the name of the method being called. |
| message_loc | Represents the Location of the message. |
| PRISM_EXPORTED_FUNCTION pm_capture_pattern_node_t * pm_capture_pattern_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | value, | ||
| struct pm_local_variable_target_node * | target, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new CapturePatternNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | Represents the value to capture. |
| target | Represents the target of the capture. |
| operator_loc | Represents the Location of the `=>` operator. |
| PRISM_EXPORTED_FUNCTION pm_case_match_node_t * pm_case_match_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | predicate, | ||
| pm_node_list_t | conditions, | ||
| struct pm_else_node * | else_clause, | ||
| pm_location_t | case_keyword_loc, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new CaseMatchNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| predicate | Represents the predicate of the case match. This can be either `nil` or any non-void expressions. |
| conditions | Represents the conditions of the case match. |
| else_clause | Represents the else clause of the case match. |
| case_keyword_loc | Represents the Location of the `case` keyword. |
| end_keyword_loc | Represents the Location of the `end` keyword. |
| PRISM_EXPORTED_FUNCTION pm_case_node_t * pm_case_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | predicate, | ||
| pm_node_list_t | conditions, | ||
| struct pm_else_node * | else_clause, | ||
| pm_location_t | case_keyword_loc, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new CaseNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| predicate | Represents the predicate of the case statement. This can be either `nil` or any non-void expressions. |
| conditions | Represents the conditions of the case statement. |
| else_clause | Represents the else clause of the case statement. |
| case_keyword_loc | Represents the Location of the `case` keyword. |
| end_keyword_loc | Represents the Location of the `end` keyword. |
| PRISM_EXPORTED_FUNCTION pm_class_node_t * pm_class_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_list_t | locals, | ||
| pm_location_t | class_keyword_loc, | ||
| struct pm_node * | constant_path, | ||
| pm_location_t | inheritance_operator_loc, | ||
| struct pm_node * | superclass, | ||
| struct pm_node * | body, | ||
| pm_location_t | end_keyword_loc, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new ClassNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| locals | The locals field. |
| class_keyword_loc | Represents the Location of the `class` keyword. |
| constant_path | The constant_path field. |
| inheritance_operator_loc | Represents the Location of the `<` operator. |
| superclass | Represents the superclass of the class. |
| body | Represents the body of the class. |
| end_keyword_loc | Represents the Location of the `end` keyword. |
| name | The name of the class. |
| PRISM_EXPORTED_FUNCTION pm_class_variable_and_write_node_t * pm_class_variable_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ClassVariableAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the class variable, which is a `@@` followed by an identifier. |
| name_loc | Represents the Location of the variable name. |
| operator_loc | Represents the Location of the `&&=` operator. |
| value | Represents the value being assigned. This can be any non-void expression. |
| PRISM_EXPORTED_FUNCTION pm_class_variable_operator_write_node_t * pm_class_variable_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | binary_operator | ||
| ) |
Allocate and initialize a new ClassVariableOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| binary_operator | The binary_operator field. |
| PRISM_EXPORTED_FUNCTION pm_class_variable_or_write_node_t * pm_class_variable_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ClassVariableOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_class_variable_read_node_t * pm_class_variable_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new ClassVariableReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the class variable, which is a `@@` followed by an identifier. |
| PRISM_EXPORTED_FUNCTION pm_class_variable_target_node_t * pm_class_variable_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new ClassVariableTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| PRISM_EXPORTED_FUNCTION pm_class_variable_write_node_t * pm_class_variable_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new ClassVariableWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the class variable, which is a `@@` followed by an identifier. |
| name_loc | The Location of the variable name. |
| value | The value to write to the class variable. This can be any non-void expression. |
| operator_loc | The Location of the `=` operator. |
| PRISM_EXPORTED_FUNCTION pm_constant_and_write_node_t * pm_constant_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ConstantAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_constant_operator_write_node_t * pm_constant_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | binary_operator | ||
| ) |
Allocate and initialize a new ConstantOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| binary_operator | The binary_operator field. |
| PRISM_EXPORTED_FUNCTION pm_constant_or_write_node_t * pm_constant_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ConstantOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_constant_path_and_write_node_t * pm_constant_path_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_constant_path_node * | target, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ConstantPathAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| target | The target field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_constant_path_node_t * pm_constant_path_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | parent, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | delimiter_loc, | ||
| pm_location_t | name_loc | ||
| ) |
Allocate and initialize a new ConstantPathNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| parent | The left-hand node of the path, if present. It can be `nil` or any non-void expression. It will be `nil` when the constant lookup is at the root of the module tree. |
| name | The name of the constant being accessed. This could be `nil` in the event of a syntax error. |
| delimiter_loc | The Location of the `::` delimiter. |
| name_loc | The Location of the name of the constant. |
| PRISM_EXPORTED_FUNCTION pm_constant_path_operator_write_node_t * pm_constant_path_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_constant_path_node * | target, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | binary_operator | ||
| ) |
Allocate and initialize a new ConstantPathOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| target | The target field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| binary_operator | The binary_operator field. |
| PRISM_EXPORTED_FUNCTION pm_constant_path_or_write_node_t * pm_constant_path_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_constant_path_node * | target, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ConstantPathOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| target | The target field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_constant_path_target_node_t * pm_constant_path_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | parent, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | delimiter_loc, | ||
| pm_location_t | name_loc | ||
| ) |
Allocate and initialize a new ConstantPathTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| parent | The parent field. |
| name | The name field. |
| delimiter_loc | The delimiter_loc field. |
| name_loc | The name_loc field. |
| PRISM_EXPORTED_FUNCTION pm_constant_path_write_node_t * pm_constant_path_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_constant_path_node * | target, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ConstantPathWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| target | A node representing the constant path being written to. |
| operator_loc | The Location of the `=` operator. |
| value | The value to write to the constant path. It can be any non-void expression. |
| PRISM_EXPORTED_FUNCTION pm_constant_read_node_t * pm_constant_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new ConstantReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the constant. |
| PRISM_EXPORTED_FUNCTION pm_constant_target_node_t * pm_constant_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new ConstantTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| PRISM_EXPORTED_FUNCTION pm_constant_write_node_t * pm_constant_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new ConstantWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the constant. |
| name_loc | The Location of the constant name. |
| value | The value to write to the constant. It can be any non-void expression. |
| operator_loc | The Location of the `=` operator. |
| PRISM_EXPORTED_FUNCTION pm_def_node_t * pm_def_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | receiver, | ||
| struct pm_parameters_node * | parameters, | ||
| struct pm_node * | body, | ||
| pm_constant_id_list_t | locals, | ||
| pm_location_t | def_keyword_loc, | ||
| pm_location_t | operator_loc, | ||
| pm_location_t | lparen_loc, | ||
| pm_location_t | rparen_loc, | ||
| pm_location_t | equal_loc, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new DefNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| receiver | The receiver field. |
| parameters | The parameters field. |
| body | The body field. |
| locals | The locals field. |
| def_keyword_loc | The def_keyword_loc field. |
| operator_loc | The operator_loc field. |
| lparen_loc | The lparen_loc field. |
| rparen_loc | The rparen_loc field. |
| equal_loc | The equal_loc field. |
| end_keyword_loc | The end_keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_defined_node_t * pm_defined_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | lparen_loc, | ||
| struct pm_node * | value, | ||
| pm_location_t | rparen_loc, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new DefinedNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| lparen_loc | The lparen_loc field. |
| value | The value field. |
| rparen_loc | The rparen_loc field. |
| keyword_loc | The keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_else_node_t * pm_else_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | else_keyword_loc, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new ElseNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| else_keyword_loc | The else_keyword_loc field. |
| statements | The statements field. |
| end_keyword_loc | The end_keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_embedded_statements_node_t * pm_embedded_statements_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new EmbeddedStatementsNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| statements | The statements field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_embedded_variable_node_t * pm_embedded_variable_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | variable | ||
| ) |
Allocate and initialize a new EmbeddedVariableNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| operator_loc | The operator_loc field. |
| variable | The variable field. |
| PRISM_EXPORTED_FUNCTION pm_ensure_node_t * pm_ensure_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | ensure_keyword_loc, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new EnsureNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| ensure_keyword_loc | The ensure_keyword_loc field. |
| statements | The statements field. |
| end_keyword_loc | The end_keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_false_node_t * pm_false_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new FalseNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_find_pattern_node_t * pm_find_pattern_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | constant, | ||
| struct pm_splat_node * | left, | ||
| pm_node_list_t | requireds, | ||
| struct pm_node * | right, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new FindPatternNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| constant | Represents the optional constant preceding the pattern |
| left | Represents the first wildcard node in the pattern. |
| requireds | Represents the nodes in between the wildcards. |
| right | Represents the second wildcard node in the pattern. |
| opening_loc | The Location of the opening brace. |
| closing_loc | The Location of the closing brace. |
| PRISM_EXPORTED_FUNCTION pm_flip_flop_node_t * pm_flip_flop_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | left, | ||
| struct pm_node * | right, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new FlipFlopNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| left | The left field. |
| right | The right field. |
| operator_loc | The operator_loc field. |
| PRISM_EXPORTED_FUNCTION pm_float_node_t * pm_float_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| double | value | ||
| ) |
Allocate and initialize a new FloatNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | The value of the floating point number as a Float. |
| PRISM_EXPORTED_FUNCTION pm_for_node_t * pm_for_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | index, | ||
| struct pm_node * | collection, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | for_keyword_loc, | ||
| pm_location_t | in_keyword_loc, | ||
| pm_location_t | do_keyword_loc, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new ForNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| index | The index expression for `for` loops. |
| collection | The collection to iterate over. |
| statements | Represents the body of statements to execute for each iteration of the loop. |
| for_keyword_loc | The Location of the `for` keyword. |
| in_keyword_loc | The Location of the `in` keyword. |
| do_keyword_loc | The Location of the `do` keyword, if present. |
| end_keyword_loc | The Location of the `end` keyword. |
| PRISM_EXPORTED_FUNCTION pm_forwarding_arguments_node_t * pm_forwarding_arguments_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new ForwardingArgumentsNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_forwarding_parameter_node_t * pm_forwarding_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new ForwardingParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_forwarding_super_node_t * pm_forwarding_super_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_block_node * | block | ||
| ) |
Allocate and initialize a new ForwardingSuperNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| block | All other arguments are forwarded as normal, except the original block is replaced with the new block. |
| PRISM_EXPORTED_FUNCTION pm_global_variable_and_write_node_t * pm_global_variable_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new GlobalVariableAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_global_variable_operator_write_node_t * pm_global_variable_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | binary_operator | ||
| ) |
Allocate and initialize a new GlobalVariableOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| binary_operator | The binary_operator field. |
| PRISM_EXPORTED_FUNCTION pm_global_variable_or_write_node_t * pm_global_variable_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new GlobalVariableOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_global_variable_read_node_t * pm_global_variable_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new GlobalVariableReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the global variable, which is a `$` followed by an identifier. Alternatively, it can be one of the special global variables designated by a symbol. |
| PRISM_EXPORTED_FUNCTION pm_global_variable_target_node_t * pm_global_variable_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new GlobalVariableTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| PRISM_EXPORTED_FUNCTION pm_global_variable_write_node_t * pm_global_variable_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new GlobalVariableWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the global variable, which is a `$` followed by an identifier. Alternatively, it can be one of the special global variables designated by a symbol. |
| name_loc | The Location of the global variable's name. |
| value | The value to write to the global variable. It can be any non-void expression. |
| operator_loc | The Location of the `=` operator. |
| PRISM_EXPORTED_FUNCTION pm_hash_node_t * pm_hash_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_node_list_t | elements, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new HashNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The Location of the opening brace. |
| elements | The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. |
| closing_loc | The Location of the closing brace. |
| PRISM_EXPORTED_FUNCTION pm_hash_pattern_node_t * pm_hash_pattern_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | constant, | ||
| pm_node_list_t | elements, | ||
| struct pm_node * | rest, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new HashPatternNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| constant | Represents the optional constant preceding the Hash. |
| elements | Represents the explicit named hash keys and values. |
| rest | 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`. |
| opening_loc | The Location of the opening brace. |
| closing_loc | The Location of the closing brace. |
| PRISM_EXPORTED_FUNCTION pm_if_node_t * pm_if_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | if_keyword_loc, | ||
| struct pm_node * | predicate, | ||
| pm_location_t | then_keyword_loc, | ||
| struct pm_statements_node * | statements, | ||
| struct pm_node * | subsequent, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new IfNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| if_keyword_loc | The Location of the `if` keyword if present. |
| predicate | The node for the condition the `IfNode` is testing. |
| then_keyword_loc | The Location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. |
| statements | Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. |
| subsequent | Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. |
| end_keyword_loc | The Location of the `end` keyword if present, `nil` otherwise. |
| PRISM_EXPORTED_FUNCTION pm_imaginary_node_t * pm_imaginary_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | numeric | ||
| ) |
Allocate and initialize a new ImaginaryNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| numeric | The numeric field. |
| PRISM_EXPORTED_FUNCTION pm_implicit_node_t * pm_implicit_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new ImplicitNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_implicit_rest_node_t * pm_implicit_rest_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new ImplicitRestNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_in_node_t * pm_in_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | pattern, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | in_loc, | ||
| pm_location_t | then_loc | ||
| ) |
Allocate and initialize a new InNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| pattern | The pattern field. |
| statements | The statements field. |
| in_loc | The in_loc field. |
| then_loc | The then_loc field. |
| PRISM_EXPORTED_FUNCTION pm_index_and_write_node_t * pm_index_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_location_t | opening_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | closing_loc, | ||
| struct pm_block_argument_node * | block, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new IndexAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The receiver field. |
| call_operator_loc | The call_operator_loc field. |
| opening_loc | The opening_loc field. |
| arguments | The arguments field. |
| closing_loc | The closing_loc field. |
| block | The block field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_index_operator_write_node_t * pm_index_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_location_t | opening_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | closing_loc, | ||
| struct pm_block_argument_node * | block, | ||
| pm_constant_id_t | binary_operator, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new IndexOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The receiver field. |
| call_operator_loc | The call_operator_loc field. |
| opening_loc | The opening_loc field. |
| arguments | The arguments field. |
| closing_loc | The closing_loc field. |
| block | The block field. |
| binary_operator | The binary_operator field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_index_or_write_node_t * pm_index_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | call_operator_loc, | ||
| pm_location_t | opening_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | closing_loc, | ||
| struct pm_block_argument_node * | block, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new IndexOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The receiver field. |
| call_operator_loc | The call_operator_loc field. |
| opening_loc | The opening_loc field. |
| arguments | The arguments field. |
| closing_loc | The closing_loc field. |
| block | The block field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_index_target_node_t * pm_index_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | receiver, | ||
| pm_location_t | opening_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | closing_loc, | ||
| struct pm_block_argument_node * | block | ||
| ) |
Allocate and initialize a new IndexTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| receiver | The receiver field. |
| opening_loc | The opening_loc field. |
| arguments | The arguments field. |
| closing_loc | The closing_loc field. |
| block | The block field. |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_and_write_node_t * pm_instance_variable_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new InstanceVariableAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_operator_write_node_t * pm_instance_variable_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | binary_operator | ||
| ) |
Allocate and initialize a new InstanceVariableOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| binary_operator | The binary_operator field. |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_or_write_node_t * pm_instance_variable_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new InstanceVariableOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_read_node_t * pm_instance_variable_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new InstanceVariableReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the instance variable, which is a `@` followed by an identifier. |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_target_node_t * pm_instance_variable_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new InstanceVariableTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| PRISM_EXPORTED_FUNCTION pm_instance_variable_write_node_t * pm_instance_variable_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new InstanceVariableWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the instance variable, which is a `@` followed by an identifier. |
| name_loc | The Location of the variable name. |
| value | The value to write to the instance variable. It can be any non-void expression. |
| operator_loc | The Location of the `=` operator. |
| PRISM_EXPORTED_FUNCTION pm_integer_node_t * pm_integer_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_integer_t | value | ||
| ) |
Allocate and initialize a new IntegerNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | The value of the integer literal as a number. |
| PRISM_EXPORTED_FUNCTION pm_interpolated_match_last_line_node_t * pm_interpolated_match_last_line_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_node_list_t | parts, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new InterpolatedMatchLastLineNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| parts | The parts field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_interpolated_regular_expression_node_t * pm_interpolated_regular_expression_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_node_list_t | parts, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new InterpolatedRegularExpressionNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| parts | The parts field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_interpolated_string_node_t * pm_interpolated_string_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_node_list_t | parts, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new InterpolatedStringNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| parts | The parts field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_interpolated_symbol_node_t * pm_interpolated_symbol_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_node_list_t | parts, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new InterpolatedSymbolNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| parts | The parts field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_interpolated_x_string_node_t * pm_interpolated_x_string_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_node_list_t | parts, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new InterpolatedXStringNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| parts | The parts field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_it_local_variable_read_node_t * pm_it_local_variable_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new ItLocalVariableReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_it_parameters_node_t * pm_it_parameters_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new ItParametersNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_keyword_hash_node_t * pm_keyword_hash_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | elements | ||
| ) |
Allocate and initialize a new KeywordHashNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| elements | The elements field. |
| PRISM_EXPORTED_FUNCTION pm_keyword_rest_parameter_node_t * pm_keyword_rest_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new KeywordRestParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| PRISM_EXPORTED_FUNCTION pm_lambda_node_t * pm_lambda_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_list_t | locals, | ||
| pm_location_t | operator_loc, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc, | ||
| struct pm_node * | parameters, | ||
| struct pm_node * | body | ||
| ) |
Allocate and initialize a new LambdaNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| locals | The locals field. |
| operator_loc | The operator_loc field. |
| opening_loc | The opening_loc field. |
| closing_loc | The closing_loc field. |
| parameters | The parameters field. |
| body | The body field. |
| PRISM_EXPORTED_FUNCTION pm_local_variable_and_write_node_t * pm_local_variable_and_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | name, | ||
| uint32_t | depth | ||
| ) |
Allocate and initialize a new LocalVariableAndWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| name | The name field. |
| depth | The depth field. |
| PRISM_EXPORTED_FUNCTION pm_local_variable_operator_write_node_t * pm_local_variable_operator_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | binary_operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | name, | ||
| pm_constant_id_t | binary_operator, | ||
| uint32_t | depth | ||
| ) |
Allocate and initialize a new LocalVariableOperatorWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name_loc | The name_loc field. |
| binary_operator_loc | The binary_operator_loc field. |
| value | The value field. |
| name | The name field. |
| binary_operator | The binary_operator field. |
| depth | The depth field. |
| PRISM_EXPORTED_FUNCTION pm_local_variable_or_write_node_t * pm_local_variable_or_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value, | ||
| pm_constant_id_t | name, | ||
| uint32_t | depth | ||
| ) |
Allocate and initialize a new LocalVariableOrWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| name | The name field. |
| depth | The depth field. |
| PRISM_EXPORTED_FUNCTION pm_local_variable_read_node_t * pm_local_variable_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| uint32_t | depth | ||
| ) |
Allocate and initialize a new LocalVariableReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the local variable, which is an identifier. |
| depth | The number of visible scopes that should be searched to find the origin of this local variable. |
| PRISM_EXPORTED_FUNCTION pm_local_variable_target_node_t * pm_local_variable_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| uint32_t | depth | ||
| ) |
Allocate and initialize a new LocalVariableTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| depth | The depth field. |
| PRISM_EXPORTED_FUNCTION pm_local_variable_write_node_t * pm_local_variable_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| uint32_t | depth, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | value, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new LocalVariableWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name of the local variable, which is an identifier. |
| depth | The number of semantic scopes we have to traverse to find the declaration of this variable. |
| name_loc | The Location of the variable name. |
| value | The value to write to the local variable. It can be any non-void expression. |
| operator_loc | The Location of the `=` operator. |
| PRISM_EXPORTED_FUNCTION pm_match_last_line_node_t * pm_match_last_line_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | content_loc, | ||
| pm_location_t | closing_loc, | ||
| pm_string_t | unescaped | ||
| ) |
Allocate and initialize a new MatchLastLineNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| content_loc | The content_loc field. |
| closing_loc | The closing_loc field. |
| unescaped | The unescaped field. |
| PRISM_EXPORTED_FUNCTION pm_match_predicate_node_t * pm_match_predicate_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | value, | ||
| struct pm_node * | pattern, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new MatchPredicateNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | The value field. |
| pattern | The pattern field. |
| operator_loc | The operator_loc field. |
| PRISM_EXPORTED_FUNCTION pm_match_required_node_t * pm_match_required_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | value, | ||
| struct pm_node * | pattern, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new MatchRequiredNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| value | Represents the left-hand side of the operator. |
| pattern | Represents the right-hand side of the operator. The type of the node depends on the expression. |
| operator_loc | The Location of the operator. |
| PRISM_EXPORTED_FUNCTION pm_match_write_node_t * pm_match_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_call_node * | call, | ||
| pm_node_list_t | targets | ||
| ) |
Allocate and initialize a new MatchWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| call | The call field. |
| targets | The targets field. |
| PRISM_EXPORTED_FUNCTION pm_missing_node_t * pm_missing_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new MissingNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_module_node_t * pm_module_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_list_t | locals, | ||
| pm_location_t | module_keyword_loc, | ||
| struct pm_node * | constant_path, | ||
| struct pm_node * | body, | ||
| pm_location_t | end_keyword_loc, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new ModuleNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| locals | The locals field. |
| module_keyword_loc | The module_keyword_loc field. |
| constant_path | The constant_path field. |
| body | The body field. |
| end_keyword_loc | The end_keyword_loc field. |
| name | The name field. |
| PRISM_EXPORTED_FUNCTION pm_multi_target_node_t * pm_multi_target_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | lefts, | ||
| struct pm_node * | rest, | ||
| pm_node_list_t | rights, | ||
| pm_location_t | lparen_loc, | ||
| pm_location_t | rparen_loc | ||
| ) |
Allocate and initialize a new MultiTargetNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| lefts | Represents the targets expressions before a splat node. |
| rest | Represents a splat node in the target expression. |
| rights | Represents the targets expressions after a splat node. |
| lparen_loc | The Location of the opening parenthesis. |
| rparen_loc | The Location of the closing parenthesis. |
| PRISM_EXPORTED_FUNCTION pm_multi_write_node_t * pm_multi_write_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | lefts, | ||
| struct pm_node * | rest, | ||
| pm_node_list_t | rights, | ||
| pm_location_t | lparen_loc, | ||
| pm_location_t | rparen_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new MultiWriteNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| lefts | Represents the targets expressions before a splat node. |
| rest | Represents a splat node in the target expression. |
| rights | Represents the targets expressions after a splat node. |
| lparen_loc | The Location of the opening parenthesis. |
| rparen_loc | The Location of the closing parenthesis. |
| operator_loc | The Location of the operator. |
| value | The value to write to the targets. It can be any non-void expression. |
| PRISM_EXPORTED_FUNCTION pm_next_node_t * pm_next_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new NextNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| arguments | The arguments field. |
| keyword_loc | The keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_nil_node_t * pm_nil_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new NilNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_no_block_parameter_node_t * pm_no_block_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | operator_loc, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new NoBlockParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| operator_loc | The operator_loc field. |
| keyword_loc | The keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_no_keywords_parameter_node_t * pm_no_keywords_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | operator_loc, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new NoKeywordsParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| operator_loc | The operator_loc field. |
| keyword_loc | The keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_numbered_parameters_node_t * pm_numbered_parameters_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| uint8_t | maximum | ||
| ) |
Allocate and initialize a new NumberedParametersNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| maximum | The maximum field. |
| PRISM_EXPORTED_FUNCTION pm_numbered_reference_read_node_t * pm_numbered_reference_read_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| uint32_t | number | ||
| ) |
Allocate and initialize a new NumberedReferenceReadNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| number | The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. |
| PRISM_EXPORTED_FUNCTION pm_optional_keyword_parameter_node_t * pm_optional_keyword_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new OptionalKeywordParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_optional_parameter_node_t * pm_optional_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | value | ||
| ) |
Allocate and initialize a new OptionalParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| value | The value field. |
| PRISM_EXPORTED_FUNCTION pm_or_node_t * pm_or_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | left, | ||
| struct pm_node * | right, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new OrNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| left | Represents the left side of the expression. It can be any non-void expression. |
| right | Represents the right side of the expression. |
| operator_loc | The Location of the `or` keyword or the `||` operator. |
| PRISM_EXPORTED_FUNCTION pm_parameters_node_t * pm_parameters_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | requireds, | ||
| pm_node_list_t | optionals, | ||
| struct pm_node * | rest, | ||
| pm_node_list_t | posts, | ||
| pm_node_list_t | keywords, | ||
| struct pm_node * | keyword_rest, | ||
| struct pm_node * | block | ||
| ) |
Allocate and initialize a new ParametersNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| requireds | The requireds field. |
| optionals | The optionals field. |
| rest | The rest field. |
| posts | The posts field. |
| keywords | The keywords field. |
| keyword_rest | The keyword_rest field. |
| block | The block field. |
| PRISM_EXPORTED_FUNCTION pm_parentheses_node_t * pm_parentheses_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | body, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new ParenthesesNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| body | The body field. |
| opening_loc | The opening_loc field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_pinned_expression_node_t * pm_pinned_expression_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | expression, | ||
| pm_location_t | operator_loc, | ||
| pm_location_t | lparen_loc, | ||
| pm_location_t | rparen_loc | ||
| ) |
Allocate and initialize a new PinnedExpressionNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| expression | The expression used in the pinned expression |
| operator_loc | The Location of the `^` operator |
| lparen_loc | The Location of the opening parenthesis. |
| rparen_loc | The Location of the closing parenthesis. |
| PRISM_EXPORTED_FUNCTION pm_pinned_variable_node_t * pm_pinned_variable_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | variable, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new PinnedVariableNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| variable | The variable used in the pinned expression |
| operator_loc | The Location of the `^` operator |
| PRISM_EXPORTED_FUNCTION pm_post_execution_node_t * pm_post_execution_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | keyword_loc, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new PostExecutionNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| statements | The statements field. |
| keyword_loc | The keyword_loc field. |
| opening_loc | The opening_loc field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_pre_execution_node_t * pm_pre_execution_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_statements_node * | statements, | ||
| pm_location_t | keyword_loc, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | closing_loc | ||
| ) |
Allocate and initialize a new PreExecutionNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| statements | The statements field. |
| keyword_loc | The keyword_loc field. |
| opening_loc | The opening_loc field. |
| closing_loc | The closing_loc field. |
| PRISM_EXPORTED_FUNCTION pm_program_node_t * pm_program_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_list_t | locals, | ||
| struct pm_statements_node * | statements | ||
| ) |
Allocate and initialize a new ProgramNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| locals | The locals field. |
| statements | The statements field. |
| PRISM_EXPORTED_FUNCTION pm_range_node_t * pm_range_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | left, | ||
| struct pm_node * | right, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new RangeNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| left | The left-hand side of the range, if present. It can be either `nil` or any non-void expression. |
| right | The right-hand side of the range, if present. It can be either `nil` or any non-void expression. |
| operator_loc | The Location of the `..` or `...` operator. |
| PRISM_EXPORTED_FUNCTION pm_rational_node_t * pm_rational_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_integer_t | numerator, | ||
| pm_integer_t | denominator | ||
| ) |
Allocate and initialize a new RationalNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| numerator | The numerator of the rational number. |
| denominator | The denominator of the rational number. |
| PRISM_EXPORTED_FUNCTION pm_redo_node_t * pm_redo_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new RedoNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_regular_expression_node_t * pm_regular_expression_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | content_loc, | ||
| pm_location_t | closing_loc, | ||
| pm_string_t | unescaped | ||
| ) |
Allocate and initialize a new RegularExpressionNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| content_loc | The content_loc field. |
| closing_loc | The closing_loc field. |
| unescaped | The unescaped field. |
| PRISM_EXPORTED_FUNCTION pm_required_keyword_parameter_node_t * pm_required_keyword_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc | ||
| ) |
Allocate and initialize a new RequiredKeywordParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| PRISM_EXPORTED_FUNCTION pm_required_parameter_node_t * pm_required_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name | ||
| ) |
Allocate and initialize a new RequiredParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| PRISM_EXPORTED_FUNCTION pm_rescue_modifier_node_t * pm_rescue_modifier_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | expression, | ||
| pm_location_t | keyword_loc, | ||
| struct pm_node * | rescue_expression | ||
| ) |
Allocate and initialize a new RescueModifierNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| expression | The expression field. |
| keyword_loc | The keyword_loc field. |
| rescue_expression | The rescue_expression field. |
| PRISM_EXPORTED_FUNCTION pm_rescue_node_t * pm_rescue_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| pm_node_list_t | exceptions, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | reference, | ||
| pm_location_t | then_keyword_loc, | ||
| struct pm_statements_node * | statements, | ||
| struct pm_rescue_node * | subsequent | ||
| ) |
Allocate and initialize a new RescueNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| exceptions | The exceptions field. |
| operator_loc | The operator_loc field. |
| reference | The reference field. |
| then_keyword_loc | The then_keyword_loc field. |
| statements | The statements field. |
| subsequent | The subsequent field. |
| PRISM_EXPORTED_FUNCTION pm_rest_parameter_node_t * pm_rest_parameter_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_t | name, | ||
| pm_location_t | name_loc, | ||
| pm_location_t | operator_loc | ||
| ) |
Allocate and initialize a new RestParameterNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| name | The name field. |
| name_loc | The name_loc field. |
| operator_loc | The operator_loc field. |
| PRISM_EXPORTED_FUNCTION pm_retry_node_t * pm_retry_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new RetryNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_return_node_t * pm_return_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| struct pm_arguments_node * | arguments | ||
| ) |
Allocate and initialize a new ReturnNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| arguments | The arguments field. |
| PRISM_EXPORTED_FUNCTION pm_self_node_t * pm_self_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new SelfNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_shareable_constant_node_t * pm_shareable_constant_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| struct pm_node * | write | ||
| ) |
Allocate and initialize a new ShareableConstantNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| write | The constant write that should be modified with the shareability state. |
| PRISM_EXPORTED_FUNCTION pm_singleton_class_node_t * pm_singleton_class_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_constant_id_list_t | locals, | ||
| pm_location_t | class_keyword_loc, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | expression, | ||
| struct pm_node * | body, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new SingletonClassNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| locals | The locals field. |
| class_keyword_loc | The class_keyword_loc field. |
| operator_loc | The operator_loc field. |
| expression | The expression field. |
| body | The body field. |
| end_keyword_loc | The end_keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_source_encoding_node_t * pm_source_encoding_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new SourceEncodingNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_source_file_node_t * pm_source_file_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_string_t | filepath | ||
| ) |
Allocate and initialize a new SourceFileNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| filepath | Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism.parse*` APIs. |
| PRISM_EXPORTED_FUNCTION pm_source_line_node_t * pm_source_line_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new SourceLineNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_splat_node_t * pm_splat_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | operator_loc, | ||
| struct pm_node * | expression | ||
| ) |
Allocate and initialize a new SplatNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| operator_loc | The operator_loc field. |
| expression | The expression field. |
| PRISM_EXPORTED_FUNCTION pm_statements_node_t * pm_statements_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | body | ||
| ) |
Allocate and initialize a new StatementsNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| body | The body field. |
| PRISM_EXPORTED_FUNCTION pm_string_node_t * pm_string_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | content_loc, | ||
| pm_location_t | closing_loc, | ||
| pm_string_t | unescaped | ||
| ) |
Allocate and initialize a new StringNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| content_loc | The content_loc field. |
| closing_loc | The closing_loc field. |
| unescaped | The unescaped field. |
| PRISM_EXPORTED_FUNCTION pm_super_node_t * pm_super_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| pm_location_t | lparen_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | rparen_loc, | ||
| struct pm_node * | block | ||
| ) |
Allocate and initialize a new SuperNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| lparen_loc | The lparen_loc field. |
| arguments | Can be only `nil` when there are empty parentheses, like `super()`. |
| rparen_loc | The rparen_loc field. |
| block | The block field. |
| PRISM_EXPORTED_FUNCTION pm_symbol_node_t * pm_symbol_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | value_loc, | ||
| pm_location_t | closing_loc, | ||
| pm_string_t | unescaped | ||
| ) |
Allocate and initialize a new SymbolNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| value_loc | The value_loc field. |
| closing_loc | The closing_loc field. |
| unescaped | The unescaped field. |
| PRISM_EXPORTED_FUNCTION pm_true_node_t * pm_true_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location | ||
| ) |
Allocate and initialize a new TrueNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| PRISM_EXPORTED_FUNCTION pm_undef_node_t * pm_undef_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_node_list_t | names, | ||
| pm_location_t | keyword_loc | ||
| ) |
Allocate and initialize a new UndefNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| names | The names field. |
| keyword_loc | The keyword_loc field. |
| PRISM_EXPORTED_FUNCTION pm_unless_node_t * pm_unless_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| struct pm_node * | predicate, | ||
| pm_location_t | then_keyword_loc, | ||
| struct pm_statements_node * | statements, | ||
| struct pm_else_node * | else_clause, | ||
| pm_location_t | end_keyword_loc | ||
| ) |
Allocate and initialize a new UnlessNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The Location of the `unless` keyword. |
| predicate | The condition to be evaluated for the unless expression. It can be any non-void expression. |
| then_keyword_loc | The Location of the `then` keyword, if present. |
| statements | The body of statements that will executed if the unless condition is |
| else_clause | The else clause of the unless expression, if present. |
| end_keyword_loc | The Location of the `end` keyword, if present. |
| PRISM_EXPORTED_FUNCTION pm_until_node_t * pm_until_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| pm_location_t | do_keyword_loc, | ||
| pm_location_t | closing_loc, | ||
| struct pm_node * | predicate, | ||
| struct pm_statements_node * | statements | ||
| ) |
Allocate and initialize a new UntilNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| do_keyword_loc | The do_keyword_loc field. |
| closing_loc | The closing_loc field. |
| predicate | The predicate field. |
| statements | The statements field. |
| PRISM_EXPORTED_FUNCTION pm_when_node_t * pm_when_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| pm_node_list_t | conditions, | ||
| pm_location_t | then_keyword_loc, | ||
| struct pm_statements_node * | statements | ||
| ) |
Allocate and initialize a new WhenNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| conditions | The conditions field. |
| then_keyword_loc | The then_keyword_loc field. |
| statements | The statements field. |
| PRISM_EXPORTED_FUNCTION pm_while_node_t * pm_while_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| pm_location_t | do_keyword_loc, | ||
| pm_location_t | closing_loc, | ||
| struct pm_node * | predicate, | ||
| struct pm_statements_node * | statements | ||
| ) |
Allocate and initialize a new WhileNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| do_keyword_loc | The do_keyword_loc field. |
| closing_loc | The closing_loc field. |
| predicate | The predicate field. |
| statements | The statements field. |
| PRISM_EXPORTED_FUNCTION pm_x_string_node_t * pm_x_string_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | opening_loc, | ||
| pm_location_t | content_loc, | ||
| pm_location_t | closing_loc, | ||
| pm_string_t | unescaped | ||
| ) |
Allocate and initialize a new XStringNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| opening_loc | The opening_loc field. |
| content_loc | The content_loc field. |
| closing_loc | The closing_loc field. |
| unescaped | The unescaped field. |
| PRISM_EXPORTED_FUNCTION pm_yield_node_t * pm_yield_node_new | ( | pm_arena_t * | arena, |
| uint32_t | node_id, | ||
| pm_node_flags_t | flags, | ||
| pm_location_t | location, | ||
| pm_location_t | keyword_loc, | ||
| pm_location_t | lparen_loc, | ||
| struct pm_arguments_node * | arguments, | ||
| pm_location_t | rparen_loc | ||
| ) |
Allocate and initialize a new YieldNode node.
| arena | The arena to allocate from. |
| node_id | The unique identifier for this node. |
| flags | The flags for this node. |
| location | The location of this node in the source. |
| keyword_loc | The keyword_loc field. |
| lparen_loc | The lparen_loc field. |
| arguments | The arguments field. |
| rparen_loc | The rparen_loc field. |