Ruby  3.4.0dev (2024-11-05 revision e440268d51fe02b303e3817a7a733a0dac1c5091)
Data Structures | Macros | Typedefs | Enumerations | Variables
ast.h File Reference

The abstract syntax tree. More...

#include "prism/defines.h"
#include "prism/util/pm_constant_pool.h"
#include "prism/util/pm_integer.h"
#include "prism/util/pm_string.h"
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for ast.h:
This graph shows which files directly or indirectly include this file:

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 represents a range of bytes in the source string to which a node or token corresponds. 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_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_TYPE(node)   ((enum pm_node_type) (node)->type)
 Cast the type to an enum to allow the compiler to provide exhaustiveness checking. More...
 
#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. More...
 
#define PM_NODE_FLAG_P(node, flag)   ((((pm_node_t *)(node))->flags & (flag)) != 0)
 Return true if the given flag is set on the given node. More...
 
#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. More...
 

Typedefs

typedef enum pm_token_type pm_token_type_t
 This enum represents every type of token in the Ruby source. More...
 
typedef struct pm_node_list pm_node_list_t
 A list of nodes in the source, most often used for lists of children. More...
 
typedef uint16_t pm_node_type_t
 This is the type of node embedded in the node struct. More...
 
typedef uint16_t pm_node_flags_t
 These are the flags embedded in the node struct. More...
 
typedef struct pm_node pm_node_t
 This is the base structure that represents a node in the syntax tree. More...
 
typedef struct pm_alias_global_variable_node pm_alias_global_variable_node_t
 AliasGlobalVariableNode. More...
 
typedef struct pm_alias_method_node pm_alias_method_node_t
 AliasMethodNode. More...
 
typedef struct pm_alternation_pattern_node pm_alternation_pattern_node_t
 AlternationPatternNode. More...
 
typedef struct pm_and_node pm_and_node_t
 AndNode. More...
 
typedef struct pm_arguments_node pm_arguments_node_t
 ArgumentsNode. More...
 
typedef struct pm_array_node pm_array_node_t
 ArrayNode. More...
 
typedef struct pm_array_pattern_node pm_array_pattern_node_t
 ArrayPatternNode. More...
 
typedef struct pm_assoc_node pm_assoc_node_t
 AssocNode. More...
 
typedef struct pm_assoc_splat_node pm_assoc_splat_node_t
 AssocSplatNode. More...
 
typedef struct pm_back_reference_read_node pm_back_reference_read_node_t
 BackReferenceReadNode. More...
 
typedef struct pm_begin_node pm_begin_node_t
 BeginNode. More...
 
typedef struct pm_block_argument_node pm_block_argument_node_t
 BlockArgumentNode. More...
 
typedef struct pm_block_local_variable_node pm_block_local_variable_node_t
 BlockLocalVariableNode. More...
 
typedef struct pm_block_node pm_block_node_t
 BlockNode. More...
 
typedef struct pm_block_parameter_node pm_block_parameter_node_t
 BlockParameterNode. More...
 
typedef struct pm_block_parameters_node pm_block_parameters_node_t
 BlockParametersNode. More...
 
typedef struct pm_break_node pm_break_node_t
 BreakNode. More...
 
typedef struct pm_call_and_write_node pm_call_and_write_node_t
 CallAndWriteNode. More...
 
typedef struct pm_call_node pm_call_node_t
 CallNode. More...
 
typedef struct pm_call_operator_write_node pm_call_operator_write_node_t
 CallOperatorWriteNode. More...
 
typedef struct pm_call_or_write_node pm_call_or_write_node_t
 CallOrWriteNode. More...
 
typedef struct pm_call_target_node pm_call_target_node_t
 CallTargetNode. More...
 
typedef struct pm_capture_pattern_node pm_capture_pattern_node_t
 CapturePatternNode. More...
 
typedef struct pm_case_match_node pm_case_match_node_t
 CaseMatchNode. More...
 
typedef struct pm_case_node pm_case_node_t
 CaseNode. More...
 
typedef struct pm_class_node pm_class_node_t
 ClassNode. More...
 
typedef struct pm_class_variable_and_write_node pm_class_variable_and_write_node_t
 ClassVariableAndWriteNode. More...
 
typedef struct pm_class_variable_operator_write_node pm_class_variable_operator_write_node_t
 ClassVariableOperatorWriteNode. More...
 
typedef struct pm_class_variable_or_write_node pm_class_variable_or_write_node_t
 ClassVariableOrWriteNode. More...
 
typedef struct pm_class_variable_read_node pm_class_variable_read_node_t
 ClassVariableReadNode. More...
 
typedef struct pm_class_variable_target_node pm_class_variable_target_node_t
 ClassVariableTargetNode. More...
 
typedef struct pm_class_variable_write_node pm_class_variable_write_node_t
 ClassVariableWriteNode. More...
 
typedef struct pm_constant_and_write_node pm_constant_and_write_node_t
 ConstantAndWriteNode. More...
 
typedef struct pm_constant_operator_write_node pm_constant_operator_write_node_t
 ConstantOperatorWriteNode. More...
 
typedef struct pm_constant_or_write_node pm_constant_or_write_node_t
 ConstantOrWriteNode. More...
 
typedef struct pm_constant_path_and_write_node pm_constant_path_and_write_node_t
 ConstantPathAndWriteNode. More...
 
typedef struct pm_constant_path_node pm_constant_path_node_t
 ConstantPathNode. More...
 
typedef struct pm_constant_path_operator_write_node pm_constant_path_operator_write_node_t
 ConstantPathOperatorWriteNode. More...
 
typedef struct pm_constant_path_or_write_node pm_constant_path_or_write_node_t
 ConstantPathOrWriteNode. More...
 
typedef struct pm_constant_path_target_node pm_constant_path_target_node_t
 ConstantPathTargetNode. More...
 
typedef struct pm_constant_path_write_node pm_constant_path_write_node_t
 ConstantPathWriteNode. More...
 
typedef struct pm_constant_read_node pm_constant_read_node_t
 ConstantReadNode. More...
 
typedef struct pm_constant_target_node pm_constant_target_node_t
 ConstantTargetNode. More...
 
typedef struct pm_constant_write_node pm_constant_write_node_t
 ConstantWriteNode. More...
 
typedef struct pm_def_node pm_def_node_t
 DefNode. More...
 
typedef struct pm_defined_node pm_defined_node_t
 DefinedNode. More...
 
typedef struct pm_else_node pm_else_node_t
 ElseNode. More...
 
typedef struct pm_embedded_statements_node pm_embedded_statements_node_t
 EmbeddedStatementsNode. More...
 
typedef struct pm_embedded_variable_node pm_embedded_variable_node_t
 EmbeddedVariableNode. More...
 
typedef struct pm_ensure_node pm_ensure_node_t
 EnsureNode. More...
 
typedef struct pm_false_node pm_false_node_t
 FalseNode. More...
 
typedef struct pm_find_pattern_node pm_find_pattern_node_t
 FindPatternNode. More...
 
typedef struct pm_flip_flop_node pm_flip_flop_node_t
 FlipFlopNode. More...
 
typedef struct pm_float_node pm_float_node_t
 FloatNode. More...
 
typedef struct pm_for_node pm_for_node_t
 ForNode. More...
 
typedef struct pm_forwarding_arguments_node pm_forwarding_arguments_node_t
 ForwardingArgumentsNode. More...
 
typedef struct pm_forwarding_parameter_node pm_forwarding_parameter_node_t
 ForwardingParameterNode. More...
 
typedef struct pm_forwarding_super_node pm_forwarding_super_node_t
 ForwardingSuperNode. More...
 
typedef struct pm_global_variable_and_write_node pm_global_variable_and_write_node_t
 GlobalVariableAndWriteNode. More...
 
typedef struct pm_global_variable_operator_write_node pm_global_variable_operator_write_node_t
 GlobalVariableOperatorWriteNode. More...
 
typedef struct pm_global_variable_or_write_node pm_global_variable_or_write_node_t
 GlobalVariableOrWriteNode. More...
 
typedef struct pm_global_variable_read_node pm_global_variable_read_node_t
 GlobalVariableReadNode. More...
 
typedef struct pm_global_variable_target_node pm_global_variable_target_node_t
 GlobalVariableTargetNode. More...
 
typedef struct pm_global_variable_write_node pm_global_variable_write_node_t
 GlobalVariableWriteNode. More...
 
typedef struct pm_hash_node pm_hash_node_t
 HashNode. More...
 
typedef struct pm_hash_pattern_node pm_hash_pattern_node_t
 HashPatternNode. More...
 
typedef struct pm_if_node pm_if_node_t
 IfNode. More...
 
typedef struct pm_imaginary_node pm_imaginary_node_t
 ImaginaryNode. More...
 
typedef struct pm_implicit_node pm_implicit_node_t
 ImplicitNode. More...
 
typedef struct pm_implicit_rest_node pm_implicit_rest_node_t
 ImplicitRestNode. More...
 
typedef struct pm_in_node pm_in_node_t
 InNode. More...
 
typedef struct pm_index_and_write_node pm_index_and_write_node_t
 IndexAndWriteNode. More...
 
typedef struct pm_index_operator_write_node pm_index_operator_write_node_t
 IndexOperatorWriteNode. More...
 
typedef struct pm_index_or_write_node pm_index_or_write_node_t
 IndexOrWriteNode. More...
 
typedef struct pm_index_target_node pm_index_target_node_t
 IndexTargetNode. More...
 
typedef struct pm_instance_variable_and_write_node pm_instance_variable_and_write_node_t
 InstanceVariableAndWriteNode. More...
 
typedef struct pm_instance_variable_operator_write_node pm_instance_variable_operator_write_node_t
 InstanceVariableOperatorWriteNode. More...
 
typedef struct pm_instance_variable_or_write_node pm_instance_variable_or_write_node_t
 InstanceVariableOrWriteNode. More...
 
typedef struct pm_instance_variable_read_node pm_instance_variable_read_node_t
 InstanceVariableReadNode. More...
 
typedef struct pm_instance_variable_target_node pm_instance_variable_target_node_t
 InstanceVariableTargetNode. More...
 
typedef struct pm_instance_variable_write_node pm_instance_variable_write_node_t
 InstanceVariableWriteNode. More...
 
typedef struct pm_integer_node pm_integer_node_t
 IntegerNode. More...
 
typedef struct pm_interpolated_match_last_line_node pm_interpolated_match_last_line_node_t
 InterpolatedMatchLastLineNode. More...
 
typedef struct pm_interpolated_regular_expression_node pm_interpolated_regular_expression_node_t
 InterpolatedRegularExpressionNode. More...
 
typedef struct pm_interpolated_string_node pm_interpolated_string_node_t
 InterpolatedStringNode. More...
 
typedef struct pm_interpolated_symbol_node pm_interpolated_symbol_node_t
 InterpolatedSymbolNode. More...
 
typedef struct pm_interpolated_x_string_node pm_interpolated_x_string_node_t
 InterpolatedXStringNode. More...
 
typedef struct pm_it_local_variable_read_node pm_it_local_variable_read_node_t
 ItLocalVariableReadNode. More...
 
typedef struct pm_it_parameters_node pm_it_parameters_node_t
 ItParametersNode. More...
 
typedef struct pm_keyword_hash_node pm_keyword_hash_node_t
 KeywordHashNode. More...
 
typedef struct pm_keyword_rest_parameter_node pm_keyword_rest_parameter_node_t
 KeywordRestParameterNode. More...
 
typedef struct pm_lambda_node pm_lambda_node_t
 LambdaNode. More...
 
typedef struct pm_local_variable_and_write_node pm_local_variable_and_write_node_t
 LocalVariableAndWriteNode. More...
 
typedef struct pm_local_variable_operator_write_node pm_local_variable_operator_write_node_t
 LocalVariableOperatorWriteNode. More...
 
typedef struct pm_local_variable_or_write_node pm_local_variable_or_write_node_t
 LocalVariableOrWriteNode. More...
 
typedef struct pm_local_variable_read_node pm_local_variable_read_node_t
 LocalVariableReadNode. More...
 
typedef struct pm_local_variable_target_node pm_local_variable_target_node_t
 LocalVariableTargetNode. More...
 
typedef struct pm_local_variable_write_node pm_local_variable_write_node_t
 LocalVariableWriteNode. More...
 
typedef struct pm_match_last_line_node pm_match_last_line_node_t
 MatchLastLineNode. More...
 
typedef struct pm_match_predicate_node pm_match_predicate_node_t
 MatchPredicateNode. More...
 
typedef struct pm_match_required_node pm_match_required_node_t
 MatchRequiredNode. More...
 
typedef struct pm_match_write_node pm_match_write_node_t
 MatchWriteNode. More...
 
typedef struct pm_missing_node pm_missing_node_t
 MissingNode. More...
 
typedef struct pm_module_node pm_module_node_t
 ModuleNode. More...
 
typedef struct pm_multi_target_node pm_multi_target_node_t
 MultiTargetNode. More...
 
typedef struct pm_multi_write_node pm_multi_write_node_t
 MultiWriteNode. More...
 
typedef struct pm_next_node pm_next_node_t
 NextNode. More...
 
typedef struct pm_nil_node pm_nil_node_t
 NilNode. More...
 
typedef struct pm_no_keywords_parameter_node pm_no_keywords_parameter_node_t
 NoKeywordsParameterNode. More...
 
typedef struct pm_numbered_parameters_node pm_numbered_parameters_node_t
 NumberedParametersNode. More...
 
typedef struct pm_numbered_reference_read_node pm_numbered_reference_read_node_t
 NumberedReferenceReadNode. More...
 
typedef struct pm_optional_keyword_parameter_node pm_optional_keyword_parameter_node_t
 OptionalKeywordParameterNode. More...
 
typedef struct pm_optional_parameter_node pm_optional_parameter_node_t
 OptionalParameterNode. More...
 
typedef struct pm_or_node pm_or_node_t
 OrNode. More...
 
typedef struct pm_parameters_node pm_parameters_node_t
 ParametersNode. More...
 
typedef struct pm_parentheses_node pm_parentheses_node_t
 ParenthesesNode. More...
 
typedef struct pm_pinned_expression_node pm_pinned_expression_node_t
 PinnedExpressionNode. More...
 
typedef struct pm_pinned_variable_node pm_pinned_variable_node_t
 PinnedVariableNode. More...
 
typedef struct pm_post_execution_node pm_post_execution_node_t
 PostExecutionNode. More...
 
typedef struct pm_pre_execution_node pm_pre_execution_node_t
 PreExecutionNode. More...
 
typedef struct pm_program_node pm_program_node_t
 ProgramNode. More...
 
typedef struct pm_range_node pm_range_node_t
 RangeNode. More...
 
typedef struct pm_rational_node pm_rational_node_t
 RationalNode. More...
 
typedef struct pm_redo_node pm_redo_node_t
 RedoNode. More...
 
typedef struct pm_regular_expression_node pm_regular_expression_node_t
 RegularExpressionNode. More...
 
typedef struct pm_required_keyword_parameter_node pm_required_keyword_parameter_node_t
 RequiredKeywordParameterNode. More...
 
typedef struct pm_required_parameter_node pm_required_parameter_node_t
 RequiredParameterNode. More...
 
typedef struct pm_rescue_modifier_node pm_rescue_modifier_node_t
 RescueModifierNode. More...
 
typedef struct pm_rescue_node pm_rescue_node_t
 RescueNode. More...
 
typedef struct pm_rest_parameter_node pm_rest_parameter_node_t
 RestParameterNode. More...
 
typedef struct pm_retry_node pm_retry_node_t
 RetryNode. More...
 
typedef struct pm_return_node pm_return_node_t
 ReturnNode. More...
 
typedef struct pm_self_node pm_self_node_t
 SelfNode. More...
 
typedef struct pm_shareable_constant_node pm_shareable_constant_node_t
 ShareableConstantNode. More...
 
typedef struct pm_singleton_class_node pm_singleton_class_node_t
 SingletonClassNode. More...
 
typedef struct pm_source_encoding_node pm_source_encoding_node_t
 SourceEncodingNode. More...
 
typedef struct pm_source_file_node pm_source_file_node_t
 SourceFileNode. More...
 
typedef struct pm_source_line_node pm_source_line_node_t
 SourceLineNode. More...
 
typedef struct pm_splat_node pm_splat_node_t
 SplatNode. More...
 
typedef struct pm_statements_node pm_statements_node_t
 StatementsNode. More...
 
typedef struct pm_string_node pm_string_node_t
 StringNode. More...
 
typedef struct pm_super_node pm_super_node_t
 SuperNode. More...
 
typedef struct pm_symbol_node pm_symbol_node_t
 SymbolNode. More...
 
typedef struct pm_true_node pm_true_node_t
 TrueNode. More...
 
typedef struct pm_undef_node pm_undef_node_t
 UndefNode. More...
 
typedef struct pm_unless_node pm_unless_node_t
 UnlessNode. More...
 
typedef struct pm_until_node pm_until_node_t
 UntilNode. More...
 
typedef struct pm_when_node pm_when_node_t
 WhenNode. More...
 
typedef struct pm_while_node pm_while_node_t
 WhileNode. More...
 
typedef struct pm_x_string_node pm_x_string_node_t
 XStringNode. More...
 
typedef struct pm_yield_node pm_yield_node_t
 YieldNode. More...
 
typedef enum pm_arguments_node_flags pm_arguments_node_flags_t
 Flags for arguments nodes. More...
 
typedef enum pm_array_node_flags pm_array_node_flags_t
 Flags for array nodes. More...
 
typedef enum pm_call_node_flags pm_call_node_flags_t
 Flags for call nodes. More...
 
typedef enum pm_encoding_flags pm_encoding_flags_t
 Flags for nodes that have unescaped content. More...
 
typedef enum pm_integer_base_flags pm_integer_base_flags_t
 Flags for integer nodes that correspond to the base of the integer. More...
 
typedef enum pm_interpolated_string_node_flags pm_interpolated_string_node_flags_t
 Flags for interpolated string nodes that indicated mutability if they are also marked as literals. More...
 
typedef enum pm_keyword_hash_node_flags pm_keyword_hash_node_flags_t
 Flags for keyword hash nodes. More...
 
typedef enum pm_loop_flags pm_loop_flags_t
 Flags for while and until loop nodes. More...
 
typedef enum pm_parameter_flags pm_parameter_flags_t
 Flags for parameter nodes. More...
 
typedef enum pm_range_flags pm_range_flags_t
 Flags for range and flip-flop nodes. More...
 
typedef enum pm_regular_expression_flags pm_regular_expression_flags_t
 Flags for regular expression and match last line nodes. More...
 
typedef enum pm_shareable_constant_node_flags pm_shareable_constant_node_flags_t
 Flags for shareable constant nodes. More...
 
typedef enum pm_string_flags pm_string_flags_t
 Flags for string nodes. More...
 
typedef enum pm_symbol_flags pm_symbol_flags_t
 Flags for symbol nodes. More...
 

Enumerations

enum  pm_token_type {
  PM_TOKEN_EOF = 1 , PM_TOKEN_MISSING , PM_TOKEN_NOT_PROVIDED , PM_TOKEN_AMPERSAND ,
  PM_TOKEN_AMPERSAND_AMPERSAND , PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL , PM_TOKEN_AMPERSAND_DOT , PM_TOKEN_AMPERSAND_EQUAL ,
  PM_TOKEN_BACKTICK , PM_TOKEN_BACK_REFERENCE , PM_TOKEN_BANG , PM_TOKEN_BANG_EQUAL ,
  PM_TOKEN_BANG_TILDE , PM_TOKEN_BRACE_LEFT , PM_TOKEN_BRACE_RIGHT , PM_TOKEN_BRACKET_LEFT ,
  PM_TOKEN_BRACKET_LEFT_ARRAY , PM_TOKEN_BRACKET_LEFT_RIGHT , PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL , PM_TOKEN_BRACKET_RIGHT ,
  PM_TOKEN_CARET , PM_TOKEN_CARET_EQUAL , PM_TOKEN_CHARACTER_LITERAL , PM_TOKEN_CLASS_VARIABLE ,
  PM_TOKEN_COLON , PM_TOKEN_COLON_COLON , PM_TOKEN_COMMA , PM_TOKEN_COMMENT ,
  PM_TOKEN_CONSTANT , PM_TOKEN_DOT , PM_TOKEN_DOT_DOT , PM_TOKEN_DOT_DOT_DOT ,
  PM_TOKEN_EMBDOC_BEGIN , PM_TOKEN_EMBDOC_END , PM_TOKEN_EMBDOC_LINE , PM_TOKEN_EMBEXPR_BEGIN ,
  PM_TOKEN_EMBEXPR_END , PM_TOKEN_EMBVAR , PM_TOKEN_EQUAL , PM_TOKEN_EQUAL_EQUAL ,
  PM_TOKEN_EQUAL_EQUAL_EQUAL , PM_TOKEN_EQUAL_GREATER , PM_TOKEN_EQUAL_TILDE , PM_TOKEN_FLOAT ,
  PM_TOKEN_FLOAT_IMAGINARY , PM_TOKEN_FLOAT_RATIONAL , PM_TOKEN_FLOAT_RATIONAL_IMAGINARY , PM_TOKEN_GLOBAL_VARIABLE ,
  PM_TOKEN_GREATER , PM_TOKEN_GREATER_EQUAL , PM_TOKEN_GREATER_GREATER , PM_TOKEN_GREATER_GREATER_EQUAL ,
  PM_TOKEN_HEREDOC_END , PM_TOKEN_HEREDOC_START , PM_TOKEN_IDENTIFIER , PM_TOKEN_IGNORED_NEWLINE ,
  PM_TOKEN_INSTANCE_VARIABLE , PM_TOKEN_INTEGER , PM_TOKEN_INTEGER_IMAGINARY , PM_TOKEN_INTEGER_RATIONAL ,
  PM_TOKEN_INTEGER_RATIONAL_IMAGINARY , PM_TOKEN_KEYWORD_ALIAS , PM_TOKEN_KEYWORD_AND , PM_TOKEN_KEYWORD_BEGIN ,
  PM_TOKEN_KEYWORD_BEGIN_UPCASE , PM_TOKEN_KEYWORD_BREAK , PM_TOKEN_KEYWORD_CASE , PM_TOKEN_KEYWORD_CLASS ,
  PM_TOKEN_KEYWORD_DEF , PM_TOKEN_KEYWORD_DEFINED , PM_TOKEN_KEYWORD_DO , PM_TOKEN_KEYWORD_DO_LOOP ,
  PM_TOKEN_KEYWORD_ELSE , PM_TOKEN_KEYWORD_ELSIF , PM_TOKEN_KEYWORD_END , PM_TOKEN_KEYWORD_END_UPCASE ,
  PM_TOKEN_KEYWORD_ENSURE , PM_TOKEN_KEYWORD_FALSE , PM_TOKEN_KEYWORD_FOR , PM_TOKEN_KEYWORD_IF ,
  PM_TOKEN_KEYWORD_IF_MODIFIER , PM_TOKEN_KEYWORD_IN , PM_TOKEN_KEYWORD_MODULE , PM_TOKEN_KEYWORD_NEXT ,
  PM_TOKEN_KEYWORD_NIL , PM_TOKEN_KEYWORD_NOT , PM_TOKEN_KEYWORD_OR , PM_TOKEN_KEYWORD_REDO ,
  PM_TOKEN_KEYWORD_RESCUE , PM_TOKEN_KEYWORD_RESCUE_MODIFIER , PM_TOKEN_KEYWORD_RETRY , PM_TOKEN_KEYWORD_RETURN ,
  PM_TOKEN_KEYWORD_SELF , PM_TOKEN_KEYWORD_SUPER , PM_TOKEN_KEYWORD_THEN , PM_TOKEN_KEYWORD_TRUE ,
  PM_TOKEN_KEYWORD_UNDEF , PM_TOKEN_KEYWORD_UNLESS , PM_TOKEN_KEYWORD_UNLESS_MODIFIER , PM_TOKEN_KEYWORD_UNTIL ,
  PM_TOKEN_KEYWORD_UNTIL_MODIFIER , PM_TOKEN_KEYWORD_WHEN , PM_TOKEN_KEYWORD_WHILE , PM_TOKEN_KEYWORD_WHILE_MODIFIER ,
  PM_TOKEN_KEYWORD_YIELD , PM_TOKEN_KEYWORD___ENCODING__ , PM_TOKEN_KEYWORD___FILE__ , PM_TOKEN_KEYWORD___LINE__ ,
  PM_TOKEN_LABEL , PM_TOKEN_LABEL_END , PM_TOKEN_LAMBDA_BEGIN , PM_TOKEN_LESS ,
  PM_TOKEN_LESS_EQUAL , PM_TOKEN_LESS_EQUAL_GREATER , PM_TOKEN_LESS_LESS , PM_TOKEN_LESS_LESS_EQUAL ,
  PM_TOKEN_METHOD_NAME , PM_TOKEN_MINUS , PM_TOKEN_MINUS_EQUAL , PM_TOKEN_MINUS_GREATER ,
  PM_TOKEN_NEWLINE , PM_TOKEN_NUMBERED_REFERENCE , PM_TOKEN_PARENTHESIS_LEFT , PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES ,
  PM_TOKEN_PARENTHESIS_RIGHT , PM_TOKEN_PERCENT , PM_TOKEN_PERCENT_EQUAL , PM_TOKEN_PERCENT_LOWER_I ,
  PM_TOKEN_PERCENT_LOWER_W , PM_TOKEN_PERCENT_LOWER_X , PM_TOKEN_PERCENT_UPPER_I , PM_TOKEN_PERCENT_UPPER_W ,
  PM_TOKEN_PIPE , PM_TOKEN_PIPE_EQUAL , PM_TOKEN_PIPE_PIPE , PM_TOKEN_PIPE_PIPE_EQUAL ,
  PM_TOKEN_PLUS , PM_TOKEN_PLUS_EQUAL , PM_TOKEN_QUESTION_MARK , PM_TOKEN_REGEXP_BEGIN ,
  PM_TOKEN_REGEXP_END , PM_TOKEN_SEMICOLON , PM_TOKEN_SLASH , PM_TOKEN_SLASH_EQUAL ,
  PM_TOKEN_STAR , PM_TOKEN_STAR_EQUAL , PM_TOKEN_STAR_STAR , PM_TOKEN_STAR_STAR_EQUAL ,
  PM_TOKEN_STRING_BEGIN , PM_TOKEN_STRING_CONTENT , PM_TOKEN_STRING_END , PM_TOKEN_SYMBOL_BEGIN ,
  PM_TOKEN_TILDE , PM_TOKEN_UAMPERSAND , PM_TOKEN_UCOLON_COLON , PM_TOKEN_UDOT_DOT ,
  PM_TOKEN_UDOT_DOT_DOT , PM_TOKEN_UMINUS , PM_TOKEN_UMINUS_NUM , PM_TOKEN_UPLUS ,
  PM_TOKEN_USTAR , PM_TOKEN_USTAR_STAR , PM_TOKEN_WORDS_SEP , PM_TOKEN___END__ ,
  PM_TOKEN_MAXIMUM
}
 This enum represents every type of token in the Ruby source. More...
 
enum  pm_node_type {
  PM_ALIAS_GLOBAL_VARIABLE_NODE = 1 , PM_ALIAS_METHOD_NODE = 2 , PM_ALTERNATION_PATTERN_NODE = 3 , PM_AND_NODE = 4 ,
  PM_ARGUMENTS_NODE = 5 , PM_ARRAY_NODE = 6 , PM_ARRAY_PATTERN_NODE = 7 , PM_ASSOC_NODE = 8 ,
  PM_ASSOC_SPLAT_NODE = 9 , PM_BACK_REFERENCE_READ_NODE = 10 , PM_BEGIN_NODE = 11 , PM_BLOCK_ARGUMENT_NODE = 12 ,
  PM_BLOCK_LOCAL_VARIABLE_NODE = 13 , PM_BLOCK_NODE = 14 , PM_BLOCK_PARAMETER_NODE = 15 , PM_BLOCK_PARAMETERS_NODE = 16 ,
  PM_BREAK_NODE = 17 , PM_CALL_AND_WRITE_NODE = 18 , PM_CALL_NODE = 19 , PM_CALL_OPERATOR_WRITE_NODE = 20 ,
  PM_CALL_OR_WRITE_NODE = 21 , PM_CALL_TARGET_NODE = 22 , PM_CAPTURE_PATTERN_NODE = 23 , PM_CASE_MATCH_NODE = 24 ,
  PM_CASE_NODE = 25 , PM_CLASS_NODE = 26 , PM_CLASS_VARIABLE_AND_WRITE_NODE = 27 , PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE = 28 ,
  PM_CLASS_VARIABLE_OR_WRITE_NODE = 29 , PM_CLASS_VARIABLE_READ_NODE = 30 , PM_CLASS_VARIABLE_TARGET_NODE = 31 , PM_CLASS_VARIABLE_WRITE_NODE = 32 ,
  PM_CONSTANT_AND_WRITE_NODE = 33 , PM_CONSTANT_OPERATOR_WRITE_NODE = 34 , PM_CONSTANT_OR_WRITE_NODE = 35 , PM_CONSTANT_PATH_AND_WRITE_NODE = 36 ,
  PM_CONSTANT_PATH_NODE = 37 , PM_CONSTANT_PATH_OPERATOR_WRITE_NODE = 38 , PM_CONSTANT_PATH_OR_WRITE_NODE = 39 , PM_CONSTANT_PATH_TARGET_NODE = 40 ,
  PM_CONSTANT_PATH_WRITE_NODE = 41 , PM_CONSTANT_READ_NODE = 42 , PM_CONSTANT_TARGET_NODE = 43 , PM_CONSTANT_WRITE_NODE = 44 ,
  PM_DEF_NODE = 45 , PM_DEFINED_NODE = 46 , PM_ELSE_NODE = 47 , PM_EMBEDDED_STATEMENTS_NODE = 48 ,
  PM_EMBEDDED_VARIABLE_NODE = 49 , PM_ENSURE_NODE = 50 , PM_FALSE_NODE = 51 , PM_FIND_PATTERN_NODE = 52 ,
  PM_FLIP_FLOP_NODE = 53 , PM_FLOAT_NODE = 54 , PM_FOR_NODE = 55 , PM_FORWARDING_ARGUMENTS_NODE = 56 ,
  PM_FORWARDING_PARAMETER_NODE = 57 , PM_FORWARDING_SUPER_NODE = 58 , PM_GLOBAL_VARIABLE_AND_WRITE_NODE = 59 , PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE = 60 ,
  PM_GLOBAL_VARIABLE_OR_WRITE_NODE = 61 , PM_GLOBAL_VARIABLE_READ_NODE = 62 , PM_GLOBAL_VARIABLE_TARGET_NODE = 63 , PM_GLOBAL_VARIABLE_WRITE_NODE = 64 ,
  PM_HASH_NODE = 65 , PM_HASH_PATTERN_NODE = 66 , PM_IF_NODE = 67 , PM_IMAGINARY_NODE = 68 ,
  PM_IMPLICIT_NODE = 69 , PM_IMPLICIT_REST_NODE = 70 , PM_IN_NODE = 71 , PM_INDEX_AND_WRITE_NODE = 72 ,
  PM_INDEX_OPERATOR_WRITE_NODE = 73 , PM_INDEX_OR_WRITE_NODE = 74 , PM_INDEX_TARGET_NODE = 75 , PM_INSTANCE_VARIABLE_AND_WRITE_NODE = 76 ,
  PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE = 77 , PM_INSTANCE_VARIABLE_OR_WRITE_NODE = 78 , PM_INSTANCE_VARIABLE_READ_NODE = 79 , PM_INSTANCE_VARIABLE_TARGET_NODE = 80 ,
  PM_INSTANCE_VARIABLE_WRITE_NODE = 81 , PM_INTEGER_NODE = 82 , PM_INTERPOLATED_MATCH_LAST_LINE_NODE = 83 , PM_INTERPOLATED_REGULAR_EXPRESSION_NODE = 84 ,
  PM_INTERPOLATED_STRING_NODE = 85 , PM_INTERPOLATED_SYMBOL_NODE = 86 , PM_INTERPOLATED_X_STRING_NODE = 87 , PM_IT_LOCAL_VARIABLE_READ_NODE = 88 ,
  PM_IT_PARAMETERS_NODE = 89 , PM_KEYWORD_HASH_NODE = 90 , PM_KEYWORD_REST_PARAMETER_NODE = 91 , PM_LAMBDA_NODE = 92 ,
  PM_LOCAL_VARIABLE_AND_WRITE_NODE = 93 , PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE = 94 , PM_LOCAL_VARIABLE_OR_WRITE_NODE = 95 , PM_LOCAL_VARIABLE_READ_NODE = 96 ,
  PM_LOCAL_VARIABLE_TARGET_NODE = 97 , PM_LOCAL_VARIABLE_WRITE_NODE = 98 , PM_MATCH_LAST_LINE_NODE = 99 , PM_MATCH_PREDICATE_NODE = 100 ,
  PM_MATCH_REQUIRED_NODE = 101 , PM_MATCH_WRITE_NODE = 102 , PM_MISSING_NODE = 103 , PM_MODULE_NODE = 104 ,
  PM_MULTI_TARGET_NODE = 105 , PM_MULTI_WRITE_NODE = 106 , PM_NEXT_NODE = 107 , PM_NIL_NODE = 108 ,
  PM_NO_KEYWORDS_PARAMETER_NODE = 109 , PM_NUMBERED_PARAMETERS_NODE = 110 , PM_NUMBERED_REFERENCE_READ_NODE = 111 , PM_OPTIONAL_KEYWORD_PARAMETER_NODE = 112 ,
  PM_OPTIONAL_PARAMETER_NODE = 113 , PM_OR_NODE = 114 , PM_PARAMETERS_NODE = 115 , PM_PARENTHESES_NODE = 116 ,
  PM_PINNED_EXPRESSION_NODE = 117 , PM_PINNED_VARIABLE_NODE = 118 , PM_POST_EXECUTION_NODE = 119 , PM_PRE_EXECUTION_NODE = 120 ,
  PM_PROGRAM_NODE = 121 , PM_RANGE_NODE = 122 , PM_RATIONAL_NODE = 123 , PM_REDO_NODE = 124 ,
  PM_REGULAR_EXPRESSION_NODE = 125 , PM_REQUIRED_KEYWORD_PARAMETER_NODE = 126 , PM_REQUIRED_PARAMETER_NODE = 127 , PM_RESCUE_MODIFIER_NODE = 128 ,
  PM_RESCUE_NODE = 129 , PM_REST_PARAMETER_NODE = 130 , PM_RETRY_NODE = 131 , PM_RETURN_NODE = 132 ,
  PM_SELF_NODE = 133 , PM_SHAREABLE_CONSTANT_NODE = 134 , PM_SINGLETON_CLASS_NODE = 135 , PM_SOURCE_ENCODING_NODE = 136 ,
  PM_SOURCE_FILE_NODE = 137 , PM_SOURCE_LINE_NODE = 138 , PM_SPLAT_NODE = 139 , PM_STATEMENTS_NODE = 140 ,
  PM_STRING_NODE = 141 , PM_SUPER_NODE = 142 , PM_SYMBOL_NODE = 143 , PM_TRUE_NODE = 144 ,
  PM_UNDEF_NODE = 145 , PM_UNLESS_NODE = 146 , PM_UNTIL_NODE = 147 , PM_WHEN_NODE = 148 ,
  PM_WHILE_NODE = 149 , PM_X_STRING_NODE = 150 , PM_YIELD_NODE = 151 , PM_SCOPE_NODE
}
 This enum represents every type of node in the Ruby syntax tree. More...
 
enum  pm_arguments_node_flags {
  PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING = 4 , PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS = 8 , PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT = 16 , PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT = 32 ,
  PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS = 64
}
 Flags for arguments nodes. More...
 
enum  pm_array_node_flags { PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT = 4 }
 Flags for array nodes. More...
 
enum  pm_call_node_flags { PM_CALL_NODE_FLAGS_SAFE_NAVIGATION = 4 , PM_CALL_NODE_FLAGS_VARIABLE_CALL = 8 , PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE = 16 , PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY = 32 }
 Flags for call nodes. More...
 
enum  pm_encoding_flags { PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING = 4 , PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING = 8 }
 Flags for nodes that have unescaped content. More...
 
enum  pm_integer_base_flags { PM_INTEGER_BASE_FLAGS_BINARY = 4 , PM_INTEGER_BASE_FLAGS_DECIMAL = 8 , PM_INTEGER_BASE_FLAGS_OCTAL = 16 , PM_INTEGER_BASE_FLAGS_HEXADECIMAL = 32 }
 Flags for integer nodes that correspond to the base of the integer. More...
 
enum  pm_interpolated_string_node_flags { PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN = 4 , PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE = 8 }
 Flags for interpolated string nodes that indicated mutability if they are also marked as literals. More...
 
enum  pm_keyword_hash_node_flags { PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS = 4 }
 Flags for keyword hash nodes. More...
 
enum  pm_loop_flags { PM_LOOP_FLAGS_BEGIN_MODIFIER = 4 }
 Flags for while and until loop nodes. More...
 
enum  pm_parameter_flags { PM_PARAMETER_FLAGS_REPEATED_PARAMETER = 4 }
 Flags for parameter nodes. More...
 
enum  pm_range_flags { PM_RANGE_FLAGS_EXCLUDE_END = 4 }
 Flags for range and flip-flop nodes. More...
 
enum  pm_regular_expression_flags {
  PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE = 4 , PM_REGULAR_EXPRESSION_FLAGS_EXTENDED = 8 , PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE = 16 , PM_REGULAR_EXPRESSION_FLAGS_ONCE = 32 ,
  PM_REGULAR_EXPRESSION_FLAGS_EUC_JP = 64 , PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT = 128 , PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J = 256 , PM_REGULAR_EXPRESSION_FLAGS_UTF_8 = 512 ,
  PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING = 1024 , PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING = 2048 , PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING = 4096
}
 Flags for regular expression and match last line nodes. More...
 
enum  pm_shareable_constant_node_flags { PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL = 4 , PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING = 8 , PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY = 16 }
 Flags for shareable constant nodes. More...
 
enum  pm_string_flags { PM_STRING_FLAGS_FORCED_UTF8_ENCODING = 4 , PM_STRING_FLAGS_FORCED_BINARY_ENCODING = 8 , PM_STRING_FLAGS_FROZEN = 16 , PM_STRING_FLAGS_MUTABLE = 32 }
 Flags for string nodes. More...
 
enum  pm_symbol_flags { PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING = 4 , PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING = 8 , PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING = 16 }
 Flags for symbol nodes. More...
 

Variables

static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = 0x1
 We store the flags enum in every node in the tree. More...
 
static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = 0x2
 

Detailed Description

The abstract syntax tree.

Definition in file ast.h.

Macro Definition Documentation

◆ PM_NODE_FLAG_P

#define PM_NODE_FLAG_P (   node,
  flag 
)    ((((pm_node_t *)(node))->flags & (flag)) != 0)

Return true if the given flag is set on the given node.

Definition at line 1063 of file ast.h.

◆ PM_NODE_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.

Definition at line 1053 of file ast.h.

◆ PM_NODE_TYPE_P

#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.

Definition at line 1058 of file ast.h.

◆ PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS

#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.

Definition at line 7522 of file ast.h.

Typedef Documentation

◆ pm_alias_global_variable_node_t

AliasGlobalVariableNode.

Represents the use of the alias keyword to alias a global variable.

alias $foo $bar
^^^^^^^^^^^^^^^

Type: PM_ALIAS_GLOBAL_VARIABLE_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

◆ pm_alternation_pattern_node_t

AlternationPatternNode.

Represents an alternation pattern in pattern matching.

foo => bar | baz
       ^^^^^^^^^

Type: PM_ALTERNATION_PATTERN_NODE

◆ pm_and_node_t

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

◆ pm_arguments_node_flags_t

Flags for arguments nodes.

◆ pm_arguments_node_t

◆ pm_array_node_flags_t

Flags for array nodes.

◆ 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):

◆ pm_array_pattern_node_t

ArrayPatternNode.

Represents an array pattern in pattern matching.

foo in 1, 2
^^^^^^^^^^^

foo in [1, 2]
^^^^^^^^^^^^^

foo in *1
^^^^^^^^^

foo in Bar[]
^^^^^^^^^^^^

foo in Bar[1, 2, 3]
^^^^^^^^^^^^^^^^^^^

Type: PM_ARRAY_PATTERN_NODE

◆ pm_assoc_node_t

AssocNode.

Represents a hash key/value pair.

{ a => b }
  ^^^^^^

Type: PM_ASSOC_NODE

◆ pm_assoc_splat_node_t

AssocSplatNode.

Represents a splat in a hash literal.

{ **foo }
  ^^^^^

Type: PM_ASSOC_SPLAT_NODE

◆ pm_back_reference_read_node_t

BackReferenceReadNode.

Represents reading a reference to a field in the previous match.

$'
^^

Type: PM_BACK_REFERENCE_READ_NODE

◆ pm_begin_node_t

BeginNode.

Represents a begin statement.

begin
  foo
end
^^^^^

Type: PM_BEGIN_NODE

◆ pm_block_argument_node_t

BlockArgumentNode.

Represents a block argument using &.

bar(&args)
^^^^^^^^^^

Type: PM_BLOCK_ARGUMENT_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):

◆ pm_block_node_t

BlockNode.

Represents a block of ruby code.

[1, 2, 3].each { |i| puts x }
               ^^^^^^^^^^^^^^

Type: PM_BLOCK_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):

◆ 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

◆ pm_break_node_t

BreakNode.

Represents the use of the break keyword.

break foo
^^^^^^^^^

Type: PM_BREAK_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):

◆ pm_call_node_flags_t

Flags for call nodes.

◆ pm_call_node_t

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):

◆ 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):

◆ 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):

◆ 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):

◆ pm_capture_pattern_node_t

CapturePatternNode.

Represents assigning to a local variable in pattern matching.

foo => [bar => baz]
       ^^^^^^^^^^^^

Type: PM_CAPTURE_PATTERN_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

◆ pm_case_node_t

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

◆ pm_class_node_t

ClassNode.

Represents a class declaration involving the class keyword.

class Foo end
^^^^^^^^^^^^^

Type: PM_CLASS_NODE

◆ pm_class_variable_and_write_node_t

ClassVariableAndWriteNode.

Represents the use of the &&= operator for assignment to a class variable.

@@target &&= value
^^^^^^^^^^^^^^^^^^

Type: PM_CLASS_VARIABLE_AND_WRITE_NODE

◆ pm_class_variable_operator_write_node_t

ClassVariableOperatorWriteNode.

Represents assigning to a class variable using an operator that isn't =.

@@target += value
^^^^^^^^^^^^^^^^^

Type: PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE

◆ pm_class_variable_or_write_node_t

ClassVariableOrWriteNode.

Represents the use of the ||= operator for assignment to a class variable.

@@target ||= value
^^^^^^^^^^^^^^^^^^

Type: PM_CLASS_VARIABLE_OR_WRITE_NODE

◆ pm_class_variable_read_node_t

ClassVariableReadNode.

Represents referencing a class variable.

@@foo
^^^^^

Type: PM_CLASS_VARIABLE_READ_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
^^^^^  ^^^^^

Type: PM_CLASS_VARIABLE_TARGET_NODE

◆ pm_class_variable_write_node_t

ClassVariableWriteNode.

Represents writing to a class variable.

@@foo = 1
^^^^^^^^^

Type: PM_CLASS_VARIABLE_WRITE_NODE

◆ pm_constant_and_write_node_t

ConstantAndWriteNode.

Represents the use of the &&= operator for assignment to a constant.

Target &&= value
^^^^^^^^^^^^^^^^

Type: PM_CONSTANT_AND_WRITE_NODE

◆ pm_constant_operator_write_node_t

ConstantOperatorWriteNode.

Represents assigning to a constant using an operator that isn't =.

Target += value
^^^^^^^^^^^^^^^

Type: PM_CONSTANT_OPERATOR_WRITE_NODE

◆ pm_constant_or_write_node_t

ConstantOrWriteNode.

Represents the use of the ||= operator for assignment to a constant.

Target ||= value
^^^^^^^^^^^^^^^^

Type: PM_CONSTANT_OR_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
^^^^^^^^^^^^^^^^^^^^^^^

Type: PM_CONSTANT_PATH_AND_WRITE_NODE

◆ pm_constant_path_node_t

ConstantPathNode.

Represents accessing a constant through a path of :: operators.

Foo::Bar
^^^^^^^^

Type: PM_CONSTANT_PATH_NODE

◆ pm_constant_path_operator_write_node_t

ConstantPathOperatorWriteNode.

Represents assigning to a constant path using an operator that isn't =.

Parent::Child += value
^^^^^^^^^^^^^^^^^^^^^^

Type: PM_CONSTANT_PATH_OPERATOR_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
^^^^^^^^^^^^^^^^^^^^^^^

Type: PM_CONSTANT_PATH_OR_WRITE_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
^^^^^^^^  ^^^^^^^^

Type: PM_CONSTANT_PATH_TARGET_NODE

◆ pm_constant_path_write_node_t

ConstantPathWriteNode.

Represents writing to a constant path.

::Foo = 1
^^^^^^^^^

Foo::Bar = 1
^^^^^^^^^^^^

::Foo::Bar = 1
^^^^^^^^^^^^^^

Type: PM_CONSTANT_PATH_WRITE_NODE

◆ pm_constant_read_node_t

ConstantReadNode.

Represents referencing a constant.

Foo
^^^

Type: PM_CONSTANT_READ_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

◆ pm_constant_write_node_t

ConstantWriteNode.

Represents writing to a constant.

Foo = 1
^^^^^^^

Type: PM_CONSTANT_WRITE_NODE

◆ pm_def_node_t

typedef struct pm_def_node pm_def_node_t

DefNode.

Represents a method definition.

def method
end
^^^^^^^^^^

Type: PM_DEF_NODE

◆ pm_defined_node_t

DefinedNode.

Represents the use of the defined? keyword.

defined?(a)
^^^^^^^^^^^

Type: PM_DEFINED_NODE

◆ pm_else_node_t

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

◆ pm_embedded_statements_node_t

EmbeddedStatementsNode.

Represents an interpolated set of statements.

"foo #{bar}"
     ^^^^^^

Type: PM_EMBEDDED_STATEMENTS_NODE

◆ pm_embedded_variable_node_t

EmbeddedVariableNode.

Represents an interpolated variable.

"foo #@bar"
     ^^^^^

Type: PM_EMBEDDED_VARIABLE_NODE

◆ pm_encoding_flags_t

Flags for nodes that have unescaped content.

◆ pm_ensure_node_t

EnsureNode.

Represents an ensure clause in a begin statement.

begin
  foo
ensure
^^^^^^
  bar
end

Type: PM_ENSURE_NODE

◆ pm_false_node_t

FalseNode.

Represents the use of the literal false keyword.

false
^^^^^

Type: PM_FALSE_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)
       ^^^^^^^^^^^^^^^^^^^^

Type: PM_FIND_PATTERN_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):

◆ pm_float_node_t

FloatNode.

Represents a floating point number literal.

1.0
^^^

Type: PM_FLOAT_NODE

◆ pm_for_node_t

typedef struct pm_for_node pm_for_node_t

ForNode.

Represents the use of the for keyword.

for i in a end
^^^^^^^^^^^^^^

Type: PM_FOR_NODE

◆ pm_forwarding_arguments_node_t

ForwardingArgumentsNode.

Represents forwarding all arguments to this method to another method.

def foo(...)
  bar(...)
      ^^^
end

Type: PM_FORWARDING_ARGUMENTS_NODE

◆ pm_forwarding_parameter_node_t

ForwardingParameterNode.

Represents the use of the forwarding parameter in a method, block, or lambda declaration.

def foo(...)
        ^^^
end

Type: PM_FORWARDING_PARAMETER_NODE

◆ pm_forwarding_super_node_t

ForwardingSuperNode.

Represents the use of the super keyword without parentheses or arguments.

super
^^^^^

Type: PM_FORWARDING_SUPER_NODE

◆ pm_global_variable_and_write_node_t

GlobalVariableAndWriteNode.

Represents the use of the &&= operator for assignment to a global variable.

$target &&= value
^^^^^^^^^^^^^^^^^

Type: PM_GLOBAL_VARIABLE_AND_WRITE_NODE

◆ pm_global_variable_operator_write_node_t

GlobalVariableOperatorWriteNode.

Represents assigning to a global variable using an operator that isn't =.

$target += value
^^^^^^^^^^^^^^^^

Type: PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE

◆ pm_global_variable_or_write_node_t

GlobalVariableOrWriteNode.

Represents the use of the ||= operator for assignment to a global variable.

$target ||= value
^^^^^^^^^^^^^^^^^

Type: PM_GLOBAL_VARIABLE_OR_WRITE_NODE

◆ pm_global_variable_read_node_t

GlobalVariableReadNode.

Represents referencing a global variable.

$foo
^^^^

Type: PM_GLOBAL_VARIABLE_READ_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
^^^^  ^^^^

Type: PM_GLOBAL_VARIABLE_TARGET_NODE

◆ pm_global_variable_write_node_t

GlobalVariableWriteNode.

Represents writing to a global variable.

$foo = 1
^^^^^^^^

Type: PM_GLOBAL_VARIABLE_WRITE_NODE

◆ pm_hash_node_t

typedef struct pm_hash_node pm_hash_node_t

HashNode.

Represents a hash literal.

{ a => b }
^^^^^^^^^^

Type: PM_HASH_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 }
       ^^^^^^^^^^^^^^^^^^^

Type: PM_HASH_PATTERN_NODE

◆ pm_if_node_t

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

◆ pm_imaginary_node_t

ImaginaryNode.

Represents an imaginary number literal.

1.0i
^^^^

Type: PM_IMAGINARY_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

◆ 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

◆ pm_in_node_t

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

◆ 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):

◆ 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):

◆ 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):

◆ 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):

◆ pm_instance_variable_and_write_node_t

InstanceVariableAndWriteNode.

Represents the use of the &&= operator for assignment to an instance variable.

@target &&= value
^^^^^^^^^^^^^^^^^

Type: PM_INSTANCE_VARIABLE_AND_WRITE_NODE

◆ pm_instance_variable_operator_write_node_t

InstanceVariableOperatorWriteNode.

Represents assigning to an instance variable using an operator that isn't =.

@target += value
^^^^^^^^^^^^^^^^

Type: PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE

◆ pm_instance_variable_or_write_node_t

InstanceVariableOrWriteNode.

Represents the use of the ||= operator for assignment to an instance variable.

@target ||= value
^^^^^^^^^^^^^^^^^

Type: PM_INSTANCE_VARIABLE_OR_WRITE_NODE

◆ pm_instance_variable_read_node_t

InstanceVariableReadNode.

Represents referencing an instance variable.

@foo
^^^^

Type: PM_INSTANCE_VARIABLE_READ_NODE

◆ pm_instance_variable_target_node_t

InstanceVariableTargetNode.

Represents writing to an instance variable in a context that doesn't have an explicit value.

@foo, @bar = baz
^^^^  ^^^^

Type: PM_INSTANCE_VARIABLE_TARGET_NODE

◆ pm_instance_variable_write_node_t

InstanceVariableWriteNode.

Represents writing to an instance variable.

@foo = 1
^^^^^^^^

Type: PM_INSTANCE_VARIABLE_WRITE_NODE

◆ pm_integer_base_flags_t

Flags for integer nodes that correspond to the base of the integer.

◆ pm_integer_node_t

◆ pm_interpolated_match_last_line_node_t

◆ pm_interpolated_regular_expression_node_t

◆ pm_interpolated_string_node_flags_t

Flags for interpolated string nodes that indicated mutability if they are also marked as literals.

◆ 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):

◆ pm_interpolated_symbol_node_t

InterpolatedSymbolNode.

Represents a symbol literal that contains interpolation.

:"foo #{bar} baz"
^^^^^^^^^^^^^^^^^

Type: PM_INTERPOLATED_SYMBOL_NODE

◆ pm_interpolated_x_string_node_t

InterpolatedXStringNode.

Represents an xstring literal that contains interpolation.

`foo #{bar} baz`
^^^^^^^^^^^^^^^^

Type: PM_INTERPOLATED_X_STRING_NODE

◆ pm_it_local_variable_read_node_t

ItLocalVariableReadNode.

Represents reading from the implicit it local variable.

-> { it }
     ^^

Type: PM_IT_LOCAL_VARIABLE_READ_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

◆ pm_keyword_hash_node_flags_t

Flags for keyword hash nodes.

◆ 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):

◆ 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):

◆ pm_lambda_node_t

LambdaNode.

Represents using a lambda literal (not the lambda method call).

->(value) { value * 2 }
^^^^^^^^^^^^^^^^^^^^^^^

Type: PM_LAMBDA_NODE

◆ pm_local_variable_and_write_node_t

LocalVariableAndWriteNode.

Represents the use of the &&= operator for assignment to a local variable.

target &&= value
^^^^^^^^^^^^^^^^

Type: PM_LOCAL_VARIABLE_AND_WRITE_NODE

◆ pm_local_variable_operator_write_node_t

LocalVariableOperatorWriteNode.

Represents assigning to a local variable using an operator that isn't =.

target += value
^^^^^^^^^^^^^^^

Type: PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE

◆ pm_local_variable_or_write_node_t

LocalVariableOrWriteNode.

Represents the use of the ||= operator for assignment to a local variable.

target ||= value
^^^^^^^^^^^^^^^^

Type: PM_LOCAL_VARIABLE_OR_WRITE_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
^^^

Type: PM_LOCAL_VARIABLE_READ_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
^^^  ^^^

Type: PM_LOCAL_VARIABLE_TARGET_NODE

◆ pm_local_variable_write_node_t

LocalVariableWriteNode.

Represents writing to a local variable.

foo = 1
^^^^^^^

Type: PM_LOCAL_VARIABLE_WRITE_NODE

◆ pm_loop_flags_t

Flags for while and until loop nodes.

◆ pm_match_last_line_node_t

◆ pm_match_predicate_node_t

MatchPredicateNode.

Represents the use of the modifier in operator.

foo in bar
^^^^^^^^^^

Type: PM_MATCH_PREDICATE_NODE

◆ pm_match_required_node_t

MatchRequiredNode.

Represents the use of the => operator.

foo => bar
^^^^^^^^^^

Type: PM_MATCH_REQUIRED_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

◆ pm_missing_node_t

MissingNode.

Represents a node that is missing from the source and results in a syntax error.

Type: PM_MISSING_NODE

◆ pm_module_node_t

ModuleNode.

Represents a module declaration involving the module keyword.

module Foo end
^^^^^^^^^^^^^^

Type: PM_MODULE_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

◆ 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

◆ pm_next_node_t

typedef struct pm_next_node pm_next_node_t

NextNode.

Represents the use of the next keyword.

next 1
^^^^^^

Type: PM_NEXT_NODE

◆ pm_nil_node_t

typedef struct pm_nil_node pm_nil_node_t

NilNode.

Represents the use of the nil keyword.

nil
^^^

Type: PM_NIL_NODE

◆ pm_no_keywords_parameter_node_t

NoKeywordsParameterNode.

Represents the use of **nil inside method arguments.

def a(**nil)
      ^^^^^
end

Type: PM_NO_KEYWORDS_PARAMETER_NODE

◆ pm_node_flags_t

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.

Definition at line 1040 of file ast.h.

◆ pm_node_list_t

typedef struct pm_node_list pm_node_list_t

A list of nodes in the source, most often used for lists of children.

◆ pm_node_t

typedef struct pm_node pm_node_t

This is the base structure that represents a node in the syntax tree.

It is embedded into every node type.

◆ pm_node_type_t

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.

Definition at line 1034 of file ast.h.

◆ 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 }
^^^^^^^^^^^^^^

Type: PM_NUMBERED_PARAMETERS_NODE

◆ pm_numbered_reference_read_node_t

NumberedReferenceReadNode.

Represents reading a numbered reference to a capture in the previous match.

$1
^^

Type: PM_NUMBERED_REFERENCE_READ_NODE

◆ pm_optional_keyword_parameter_node_t

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):

◆ 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):

◆ pm_or_node_t

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

◆ pm_parameter_flags_t

Flags for parameter nodes.

◆ 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

◆ pm_parentheses_node_t

ParenthesesNode.

Represents a parenthesized expression

(10 + 34)
^^^^^^^^^

Type: PM_PARENTHESES_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)
       ^^^^^^

Type: PM_PINNED_EXPRESSION_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

◆ pm_post_execution_node_t

PostExecutionNode.

Represents the use of the END keyword.

END { foo }
^^^^^^^^^^^

Type: PM_POST_EXECUTION_NODE

◆ pm_pre_execution_node_t

PreExecutionNode.

Represents the use of the BEGIN keyword.

BEGIN { foo }
^^^^^^^^^^^^^

Type: PM_PRE_EXECUTION_NODE

◆ pm_program_node_t

ProgramNode.

The top level node of any parse tree.

Type: PM_PROGRAM_NODE

◆ pm_range_flags_t

Flags for range and flip-flop nodes.

◆ 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):

◆ pm_rational_node_t

◆ pm_redo_node_t

typedef struct pm_redo_node pm_redo_node_t

RedoNode.

Represents the use of the redo keyword.

redo
^^^^

Type: PM_REDO_NODE

◆ pm_regular_expression_flags_t

Flags for regular expression and match last line nodes.

◆ pm_regular_expression_node_t

◆ pm_required_keyword_parameter_node_t

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):

◆ 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):

◆ pm_rescue_modifier_node_t

RescueModifierNode.

Represents an expression modified with a rescue.

foo rescue nil
^^^^^^^^^^^^^^

Type: PM_RESCUE_MODIFIER_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

◆ 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):

◆ pm_retry_node_t

RetryNode.

Represents the use of the retry keyword.

retry
^^^^^

Type: PM_RETRY_NODE

◆ pm_return_node_t

ReturnNode.

Represents the use of the return keyword.

return 1
^^^^^^^^

Type: PM_RETURN_NODE

◆ pm_self_node_t

typedef struct pm_self_node pm_self_node_t

SelfNode.

Represents the self keyword.

self
^^^^

Type: PM_SELF_NODE

◆ pm_shareable_constant_node_flags_t

Flags for shareable constant nodes.

◆ 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):

◆ pm_singleton_class_node_t

SingletonClassNode.

Represents a singleton class declaration involving the class keyword.

class << self end
^^^^^^^^^^^^^^^^^

Type: PM_SINGLETON_CLASS_NODE

◆ pm_source_encoding_node_t

SourceEncodingNode.

Represents the use of the __ENCODING__ keyword.

__ENCODING__
^^^^^^^^^^^^

Type: PM_SOURCE_ENCODING_NODE

◆ pm_source_file_node_t

◆ pm_source_line_node_t

SourceLineNode.

Represents the use of the __LINE__ keyword.

__LINE__
^^^^^^^^

Type: PM_SOURCE_LINE_NODE

◆ pm_splat_node_t

SplatNode.

Represents the use of the splat operator.

[*a]
 ^^

Type: PM_SPLAT_NODE

◆ pm_statements_node_t

StatementsNode.

Represents a set of statements contained within some scope.

foo; bar; baz
^^^^^^^^^^^^^

Type: PM_STATEMENTS_NODE

◆ pm_string_flags_t

Flags for string nodes.

◆ 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):

◆ pm_super_node_t

SuperNode.

Represents the use of the super keyword with parentheses or arguments.

super()
^^^^^^^

super foo, bar
^^^^^^^^^^^^^^

Type: PM_SUPER_NODE

◆ pm_symbol_flags_t

Flags for symbol nodes.

◆ 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):

◆ pm_token_type_t

This enum represents every type of token in the Ruby source.

◆ pm_true_node_t

typedef struct pm_true_node pm_true_node_t

TrueNode.

Represents the use of the literal true keyword.

true
^^^^

Type: PM_TRUE_NODE

◆ pm_undef_node_t

UndefNode.

Represents the use of the undef keyword.

undef :foo, :bar, :baz
^^^^^^^^^^^^^^^^^^^^^^

Type: PM_UNDEF_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

◆ 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):

◆ pm_when_node_t

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

◆ 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):

◆ pm_x_string_node_t

XStringNode.

Represents an xstring literal with no interpolation.

`foo`
^^^^^

Type: PM_X_STRING_NODE

Flags (pm_encoding_flags):

◆ pm_yield_node_t

YieldNode.

Represents the use of the yield keyword.

yield 1
^^^^^^^

Type: PM_YIELD_NODE

Enumeration Type Documentation

◆ pm_arguments_node_flags

Flags for arguments nodes.

Enumerator
PM_ARGUMENTS_NODE_FLAGS_CONTAINS_FORWARDING 

if the arguments contain forwarding

PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS 

if the arguments contain keywords

PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORD_SPLAT 

if the arguments contain a keyword splat

PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT 

if the arguments contain a splat

PM_ARGUMENTS_NODE_FLAGS_CONTAINS_MULTIPLE_SPLATS 

if the arguments contain multiple splats

Definition at line 7320 of file ast.h.

◆ pm_array_node_flags

Flags for array nodes.

Enumerator
PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT 

if array contains splat nodes

Definition at line 7340 of file ast.h.

◆ pm_call_node_flags

Flags for call nodes.

Enumerator
PM_CALL_NODE_FLAGS_SAFE_NAVIGATION 

&.

operator

PM_CALL_NODE_FLAGS_VARIABLE_CALL 

a call that could have been a local variable

PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE 

a call that is an attribute write, so the value being written should be returned

PM_CALL_NODE_FLAGS_IGNORE_VISIBILITY 

a call that ignores method visibility

Definition at line 7348 of file ast.h.

◆ pm_encoding_flags

Flags for nodes that have unescaped content.

Enumerator
PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING 

internal bytes forced the encoding to UTF-8

PM_ENCODING_FLAGS_FORCED_BINARY_ENCODING 

internal bytes forced the encoding to binary

Definition at line 7365 of file ast.h.

◆ pm_integer_base_flags

Flags for integer nodes that correspond to the base of the integer.

Enumerator
PM_INTEGER_BASE_FLAGS_BINARY 

0b prefix

PM_INTEGER_BASE_FLAGS_DECIMAL 

0d or no prefix

PM_INTEGER_BASE_FLAGS_OCTAL 

0o or 0 prefix

PM_INTEGER_BASE_FLAGS_HEXADECIMAL 

0x prefix

Definition at line 7376 of file ast.h.

◆ pm_interpolated_string_node_flags

Flags for interpolated string nodes that indicated mutability if they are also marked as literals.

Enumerator
PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN 

frozen by virtue of a frozen_string_literal: true comment or --enable-frozen-string-literal; only for adjacent string literals like ‘'a’ 'b'`

PM_INTERPOLATED_STRING_NODE_FLAGS_MUTABLE 

mutable by virtue of a frozen_string_literal: false comment or --disable-frozen-string-literal; only for adjacent string literals like ‘'a’ 'b'`

Definition at line 7393 of file ast.h.

◆ pm_keyword_hash_node_flags

Flags for keyword hash nodes.

Enumerator
PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS 

a keyword hash which only has AssocNode elements all with symbol keys, which means the elements can be treated as keyword arguments

Definition at line 7404 of file ast.h.

◆ pm_loop_flags

Flags for while and until loop nodes.

Enumerator
PM_LOOP_FLAGS_BEGIN_MODIFIER 

a loop after a begin statement, so the body is executed first before the condition

Definition at line 7412 of file ast.h.

◆ pm_node_type

This enum represents every type of node in the Ruby syntax tree.

Enumerator
PM_ALIAS_GLOBAL_VARIABLE_NODE 

AliasGlobalVariableNode.

PM_ALIAS_METHOD_NODE 

AliasMethodNode.

PM_ALTERNATION_PATTERN_NODE 

AlternationPatternNode.

PM_AND_NODE 

AndNode.

PM_ARGUMENTS_NODE 

ArgumentsNode.

PM_ARRAY_NODE 

ArrayNode.

PM_ARRAY_PATTERN_NODE 

ArrayPatternNode.

PM_ASSOC_NODE 

AssocNode.

PM_ASSOC_SPLAT_NODE 

AssocSplatNode.

PM_BACK_REFERENCE_READ_NODE 

BackReferenceReadNode.

PM_BEGIN_NODE 

BeginNode.

PM_BLOCK_ARGUMENT_NODE 

BlockArgumentNode.

PM_BLOCK_LOCAL_VARIABLE_NODE 

BlockLocalVariableNode.

PM_BLOCK_NODE 

BlockNode.

PM_BLOCK_PARAMETER_NODE 

BlockParameterNode.

PM_BLOCK_PARAMETERS_NODE 

BlockParametersNode.

PM_BREAK_NODE 

BreakNode.

PM_CALL_AND_WRITE_NODE 

CallAndWriteNode.

PM_CALL_NODE 

CallNode.

PM_CALL_OPERATOR_WRITE_NODE 

CallOperatorWriteNode.

PM_CALL_OR_WRITE_NODE 

CallOrWriteNode.

PM_CALL_TARGET_NODE 

CallTargetNode.

PM_CAPTURE_PATTERN_NODE 

CapturePatternNode.

PM_CASE_MATCH_NODE 

CaseMatchNode.

PM_CASE_NODE 

CaseNode.

PM_CLASS_NODE 

ClassNode.

PM_CLASS_VARIABLE_AND_WRITE_NODE 

ClassVariableAndWriteNode.

PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE 

ClassVariableOperatorWriteNode.

PM_CLASS_VARIABLE_OR_WRITE_NODE 

ClassVariableOrWriteNode.

PM_CLASS_VARIABLE_READ_NODE 

ClassVariableReadNode.

PM_CLASS_VARIABLE_TARGET_NODE 

ClassVariableTargetNode.

PM_CLASS_VARIABLE_WRITE_NODE 

ClassVariableWriteNode.

PM_CONSTANT_AND_WRITE_NODE 

ConstantAndWriteNode.

PM_CONSTANT_OPERATOR_WRITE_NODE 

ConstantOperatorWriteNode.

PM_CONSTANT_OR_WRITE_NODE 

ConstantOrWriteNode.

PM_CONSTANT_PATH_AND_WRITE_NODE 

ConstantPathAndWriteNode.

PM_CONSTANT_PATH_NODE 

ConstantPathNode.

PM_CONSTANT_PATH_OPERATOR_WRITE_NODE 

ConstantPathOperatorWriteNode.

PM_CONSTANT_PATH_OR_WRITE_NODE 

ConstantPathOrWriteNode.

PM_CONSTANT_PATH_TARGET_NODE 

ConstantPathTargetNode.

PM_CONSTANT_PATH_WRITE_NODE 

ConstantPathWriteNode.

PM_CONSTANT_READ_NODE 

ConstantReadNode.

PM_CONSTANT_TARGET_NODE 

ConstantTargetNode.

PM_CONSTANT_WRITE_NODE 

ConstantWriteNode.

PM_DEF_NODE 

DefNode.

PM_DEFINED_NODE 

DefinedNode.

PM_ELSE_NODE 

ElseNode.

PM_EMBEDDED_STATEMENTS_NODE 

EmbeddedStatementsNode.

PM_EMBEDDED_VARIABLE_NODE 

EmbeddedVariableNode.

PM_ENSURE_NODE 

EnsureNode.

PM_FALSE_NODE 

FalseNode.

PM_FIND_PATTERN_NODE 

FindPatternNode.

PM_FLIP_FLOP_NODE 

FlipFlopNode.

PM_FLOAT_NODE 

FloatNode.

PM_FOR_NODE 

ForNode.

PM_FORWARDING_ARGUMENTS_NODE 

ForwardingArgumentsNode.

PM_FORWARDING_PARAMETER_NODE 

ForwardingParameterNode.

PM_FORWARDING_SUPER_NODE 

ForwardingSuperNode.

PM_GLOBAL_VARIABLE_AND_WRITE_NODE 

GlobalVariableAndWriteNode.

PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE 

GlobalVariableOperatorWriteNode.

PM_GLOBAL_VARIABLE_OR_WRITE_NODE 

GlobalVariableOrWriteNode.

PM_GLOBAL_VARIABLE_READ_NODE 

GlobalVariableReadNode.

PM_GLOBAL_VARIABLE_TARGET_NODE 

GlobalVariableTargetNode.

PM_GLOBAL_VARIABLE_WRITE_NODE 

GlobalVariableWriteNode.

PM_HASH_NODE 

HashNode.

PM_HASH_PATTERN_NODE 

HashPatternNode.

PM_IF_NODE 

IfNode.

PM_IMAGINARY_NODE 

ImaginaryNode.

PM_IMPLICIT_NODE 

ImplicitNode.

PM_IMPLICIT_REST_NODE 

ImplicitRestNode.

PM_IN_NODE 

InNode.

PM_INDEX_AND_WRITE_NODE 

IndexAndWriteNode.

PM_INDEX_OPERATOR_WRITE_NODE 

IndexOperatorWriteNode.

PM_INDEX_OR_WRITE_NODE 

IndexOrWriteNode.

PM_INDEX_TARGET_NODE 

IndexTargetNode.

PM_INSTANCE_VARIABLE_AND_WRITE_NODE 

InstanceVariableAndWriteNode.

PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE 

InstanceVariableOperatorWriteNode.

PM_INSTANCE_VARIABLE_OR_WRITE_NODE 

InstanceVariableOrWriteNode.

PM_INSTANCE_VARIABLE_READ_NODE 

InstanceVariableReadNode.

PM_INSTANCE_VARIABLE_TARGET_NODE 

InstanceVariableTargetNode.

PM_INSTANCE_VARIABLE_WRITE_NODE 

InstanceVariableWriteNode.

PM_INTEGER_NODE 

IntegerNode.

PM_INTERPOLATED_MATCH_LAST_LINE_NODE 

InterpolatedMatchLastLineNode.

PM_INTERPOLATED_REGULAR_EXPRESSION_NODE 

InterpolatedRegularExpressionNode.

PM_INTERPOLATED_STRING_NODE 

InterpolatedStringNode.

PM_INTERPOLATED_SYMBOL_NODE 

InterpolatedSymbolNode.

PM_INTERPOLATED_X_STRING_NODE 

InterpolatedXStringNode.

PM_IT_LOCAL_VARIABLE_READ_NODE 

ItLocalVariableReadNode.

PM_IT_PARAMETERS_NODE 

ItParametersNode.

PM_KEYWORD_HASH_NODE 

KeywordHashNode.

PM_KEYWORD_REST_PARAMETER_NODE 

KeywordRestParameterNode.

PM_LAMBDA_NODE 

LambdaNode.

PM_LOCAL_VARIABLE_AND_WRITE_NODE 

LocalVariableAndWriteNode.

PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE 

LocalVariableOperatorWriteNode.

PM_LOCAL_VARIABLE_OR_WRITE_NODE 

LocalVariableOrWriteNode.

PM_LOCAL_VARIABLE_READ_NODE 

LocalVariableReadNode.

PM_LOCAL_VARIABLE_TARGET_NODE 

LocalVariableTargetNode.

PM_LOCAL_VARIABLE_WRITE_NODE 

LocalVariableWriteNode.

PM_MATCH_LAST_LINE_NODE 

MatchLastLineNode.

PM_MATCH_PREDICATE_NODE 

MatchPredicateNode.

PM_MATCH_REQUIRED_NODE 

MatchRequiredNode.

PM_MATCH_WRITE_NODE 

MatchWriteNode.

PM_MISSING_NODE 

MissingNode.

PM_MODULE_NODE 

ModuleNode.

PM_MULTI_TARGET_NODE 

MultiTargetNode.

PM_MULTI_WRITE_NODE 

MultiWriteNode.

PM_NEXT_NODE 

NextNode.

PM_NIL_NODE 

NilNode.

PM_NO_KEYWORDS_PARAMETER_NODE 

NoKeywordsParameterNode.

PM_NUMBERED_PARAMETERS_NODE 

NumberedParametersNode.

PM_NUMBERED_REFERENCE_READ_NODE 

NumberedReferenceReadNode.

PM_OPTIONAL_KEYWORD_PARAMETER_NODE 

OptionalKeywordParameterNode.

PM_OPTIONAL_PARAMETER_NODE 

OptionalParameterNode.

PM_OR_NODE 

OrNode.

PM_PARAMETERS_NODE 

ParametersNode.

PM_PARENTHESES_NODE 

ParenthesesNode.

PM_PINNED_EXPRESSION_NODE 

PinnedExpressionNode.

PM_PINNED_VARIABLE_NODE 

PinnedVariableNode.

PM_POST_EXECUTION_NODE 

PostExecutionNode.

PM_PRE_EXECUTION_NODE 

PreExecutionNode.

PM_PROGRAM_NODE 

ProgramNode.

PM_RANGE_NODE 

RangeNode.

PM_RATIONAL_NODE 

RationalNode.

PM_REDO_NODE 

RedoNode.

PM_REGULAR_EXPRESSION_NODE 

RegularExpressionNode.

PM_REQUIRED_KEYWORD_PARAMETER_NODE 

RequiredKeywordParameterNode.

PM_REQUIRED_PARAMETER_NODE 

RequiredParameterNode.

PM_RESCUE_MODIFIER_NODE 

RescueModifierNode.

PM_RESCUE_NODE 

RescueNode.

PM_REST_PARAMETER_NODE 

RestParameterNode.

PM_RETRY_NODE 

RetryNode.

PM_RETURN_NODE 

ReturnNode.

PM_SELF_NODE 

SelfNode.

PM_SHAREABLE_CONSTANT_NODE 

ShareableConstantNode.

PM_SINGLETON_CLASS_NODE 

SingletonClassNode.

PM_SOURCE_ENCODING_NODE 

SourceEncodingNode.

PM_SOURCE_FILE_NODE 

SourceFileNode.

PM_SOURCE_LINE_NODE 

SourceLineNode.

PM_SPLAT_NODE 

SplatNode.

PM_STATEMENTS_NODE 

StatementsNode.

PM_STRING_NODE 

StringNode.

PM_SUPER_NODE 

SuperNode.

PM_SYMBOL_NODE 

SymbolNode.

PM_TRUE_NODE 

TrueNode.

PM_UNDEF_NODE 

UndefNode.

PM_UNLESS_NODE 

UnlessNode.

PM_UNTIL_NODE 

UntilNode.

PM_WHEN_NODE 

WhenNode.

PM_WHILE_NODE 

WhileNode.

PM_X_STRING_NODE 

XStringNode.

PM_YIELD_NODE 

YieldNode.

PM_SCOPE_NODE 

A special kind of node used for compilation.

Definition at line 572 of file ast.h.

◆ pm_parameter_flags

Flags for parameter nodes.

Enumerator
PM_PARAMETER_FLAGS_REPEATED_PARAMETER 

a parameter name that has been repeated in the method signature

Definition at line 7420 of file ast.h.

◆ pm_range_flags

Flags for range and flip-flop nodes.

Enumerator
PM_RANGE_FLAGS_EXCLUDE_END 

...

operator

Definition at line 7428 of file ast.h.

◆ pm_regular_expression_flags

Flags for regular expression and match last line nodes.

Enumerator
PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE 

i - ignores the case of characters when matching

PM_REGULAR_EXPRESSION_FLAGS_EXTENDED 

x - ignores whitespace and allows comments in regular expressions

PM_REGULAR_EXPRESSION_FLAGS_MULTI_LINE 

m - allows $ to match the end of lines within strings

PM_REGULAR_EXPRESSION_FLAGS_ONCE 

o - only interpolates values into the regular expression once

PM_REGULAR_EXPRESSION_FLAGS_EUC_JP 

e - forces the EUC-JP encoding

PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT 

n - forces the ASCII-8BIT encoding

PM_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J 

s - forces the Windows-31J encoding

PM_REGULAR_EXPRESSION_FLAGS_UTF_8 

u - forces the UTF-8 encoding

PM_REGULAR_EXPRESSION_FLAGS_FORCED_UTF8_ENCODING 

internal bytes forced the encoding to UTF-8

PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING 

internal bytes forced the encoding to binary

PM_REGULAR_EXPRESSION_FLAGS_FORCED_US_ASCII_ENCODING 

internal bytes forced the encoding to US-ASCII

Definition at line 7436 of file ast.h.

◆ pm_shareable_constant_node_flags

Flags for shareable constant nodes.

Enumerator
PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL 

constant writes that should be modified with shareable constant value literal

PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_EVERYTHING 

constant writes that should be modified with shareable constant value experimental everything

PM_SHAREABLE_CONSTANT_NODE_FLAGS_EXPERIMENTAL_COPY 

constant writes that should be modified with shareable constant value experimental copy

Definition at line 7474 of file ast.h.

◆ pm_string_flags

Flags for string nodes.

Enumerator
PM_STRING_FLAGS_FORCED_UTF8_ENCODING 

internal bytes forced the encoding to UTF-8

PM_STRING_FLAGS_FORCED_BINARY_ENCODING 

internal bytes forced the encoding to binary

PM_STRING_FLAGS_FROZEN 

frozen by virtue of a frozen_string_literal: true comment or --enable-frozen-string-literal

PM_STRING_FLAGS_MUTABLE 

mutable by virtue of a frozen_string_literal: false comment or --disable-frozen-string-literal

Definition at line 7488 of file ast.h.

◆ pm_symbol_flags

Flags for symbol nodes.

Enumerator
PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING 

internal bytes forced the encoding to UTF-8

PM_SYMBOL_FLAGS_FORCED_BINARY_ENCODING 

internal bytes forced the encoding to binary

PM_SYMBOL_FLAGS_FORCED_US_ASCII_ENCODING 

internal bytes forced the encoding to US-ASCII

Definition at line 7505 of file ast.h.

◆ pm_token_type

This enum represents every type of token in the Ruby source.

Enumerator
PM_TOKEN_EOF 

final token in the file

PM_TOKEN_MISSING 

a token that was expected but not found

PM_TOKEN_NOT_PROVIDED 

a token that was not present but it is okay

PM_TOKEN_AMPERSAND 

&

PM_TOKEN_AMPERSAND_AMPERSAND 

&&

PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL 

&&=

PM_TOKEN_AMPERSAND_DOT 

&.

PM_TOKEN_AMPERSAND_EQUAL 

&=

PM_TOKEN_BACKTICK 

`

PM_TOKEN_BACK_REFERENCE 

a back reference

PM_TOKEN_BANG 

! or !@

PM_TOKEN_BANG_EQUAL 

!=

PM_TOKEN_BANG_TILDE 

!~

PM_TOKEN_BRACE_LEFT 

{

PM_TOKEN_BRACE_RIGHT 

}

PM_TOKEN_BRACKET_LEFT 

[

PM_TOKEN_BRACKET_LEFT_ARRAY 

[ for the beginning of an array

PM_TOKEN_BRACKET_LEFT_RIGHT 

[]

PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL 

[]=

PM_TOKEN_BRACKET_RIGHT 

]

PM_TOKEN_CARET 

^

PM_TOKEN_CARET_EQUAL 

^=

PM_TOKEN_CHARACTER_LITERAL 

a character literal

PM_TOKEN_CLASS_VARIABLE 

a class variable

PM_TOKEN_COLON 

:

PM_TOKEN_COLON_COLON 

::

PM_TOKEN_COMMA 

,

PM_TOKEN_COMMENT 

a comment

PM_TOKEN_CONSTANT 

a constant

PM_TOKEN_DOT 

the .

call operator

PM_TOKEN_DOT_DOT 

the .

. range operator

PM_TOKEN_DOT_DOT_DOT 

the ...

range operator or forwarding parameter

PM_TOKEN_EMBDOC_BEGIN 

=begin

PM_TOKEN_EMBDOC_END 

=end

PM_TOKEN_EMBDOC_LINE 

a line inside of embedded documentation

PM_TOKEN_EMBEXPR_BEGIN 

#{

PM_TOKEN_EMBEXPR_END 

}

PM_TOKEN_EMBVAR 

autotoc_md15

PM_TOKEN_EQUAL 

=

PM_TOKEN_EQUAL_EQUAL 

==

PM_TOKEN_EQUAL_EQUAL_EQUAL 

===

PM_TOKEN_EQUAL_GREATER 

=>

PM_TOKEN_EQUAL_TILDE 

=~

PM_TOKEN_FLOAT 

a floating point number

PM_TOKEN_FLOAT_IMAGINARY 

a floating pointer number with an imaginary suffix

PM_TOKEN_FLOAT_RATIONAL 

a floating pointer number with a rational suffix

PM_TOKEN_FLOAT_RATIONAL_IMAGINARY 

a floating pointer number with a rational and imaginary suffix

PM_TOKEN_GLOBAL_VARIABLE 

a global variable

PM_TOKEN_GREATER 

PM_TOKEN_GREATER_EQUAL 

>=

PM_TOKEN_GREATER_GREATER 

PM_TOKEN_GREATER_GREATER_EQUAL 

>>=

PM_TOKEN_HEREDOC_END 

the end of a heredoc

PM_TOKEN_HEREDOC_START 

the start of a heredoc

PM_TOKEN_IDENTIFIER 

an identifier

PM_TOKEN_IGNORED_NEWLINE 

an ignored newline

PM_TOKEN_INSTANCE_VARIABLE 

an instance variable

PM_TOKEN_INTEGER 

an integer (any base)

PM_TOKEN_INTEGER_IMAGINARY 

an integer with an imaginary suffix

PM_TOKEN_INTEGER_RATIONAL 

an integer with a rational suffix

PM_TOKEN_INTEGER_RATIONAL_IMAGINARY 

an integer with a rational and imaginary suffix

PM_TOKEN_KEYWORD_ALIAS 

alias

PM_TOKEN_KEYWORD_AND 

and

PM_TOKEN_KEYWORD_BEGIN 

begin

PM_TOKEN_KEYWORD_BEGIN_UPCASE 

BEGIN.

PM_TOKEN_KEYWORD_BREAK 

break

PM_TOKEN_KEYWORD_CASE 

case

PM_TOKEN_KEYWORD_CLASS 

class

PM_TOKEN_KEYWORD_DEF 

def

PM_TOKEN_KEYWORD_DEFINED 

defined?

PM_TOKEN_KEYWORD_DO 

do

PM_TOKEN_KEYWORD_DO_LOOP 

do keyword for a predicate in a while, until, or for loop

PM_TOKEN_KEYWORD_ELSE 

else

PM_TOKEN_KEYWORD_ELSIF 

elsif

PM_TOKEN_KEYWORD_END 

end

PM_TOKEN_KEYWORD_END_UPCASE 

END.

PM_TOKEN_KEYWORD_ENSURE 

ensure

PM_TOKEN_KEYWORD_FALSE 

false

PM_TOKEN_KEYWORD_FOR 

for

PM_TOKEN_KEYWORD_IF 

if

PM_TOKEN_KEYWORD_IF_MODIFIER 

if in the modifier form

PM_TOKEN_KEYWORD_IN 

in

PM_TOKEN_KEYWORD_MODULE 

module

PM_TOKEN_KEYWORD_NEXT 

next

PM_TOKEN_KEYWORD_NIL 

nil

PM_TOKEN_KEYWORD_NOT 

not

PM_TOKEN_KEYWORD_OR 

or

PM_TOKEN_KEYWORD_REDO 

redo

PM_TOKEN_KEYWORD_RESCUE 

rescue

PM_TOKEN_KEYWORD_RESCUE_MODIFIER 

rescue in the modifier form

PM_TOKEN_KEYWORD_RETRY 

retry

PM_TOKEN_KEYWORD_RETURN 

return

PM_TOKEN_KEYWORD_SELF 

self

PM_TOKEN_KEYWORD_SUPER 

super

PM_TOKEN_KEYWORD_THEN 

then

PM_TOKEN_KEYWORD_TRUE 

true

PM_TOKEN_KEYWORD_UNDEF 

undef

PM_TOKEN_KEYWORD_UNLESS 

unless

PM_TOKEN_KEYWORD_UNLESS_MODIFIER 

unless in the modifier form

PM_TOKEN_KEYWORD_UNTIL 

until

PM_TOKEN_KEYWORD_UNTIL_MODIFIER 

until in the modifier form

PM_TOKEN_KEYWORD_WHEN 

when

PM_TOKEN_KEYWORD_WHILE 

while

PM_TOKEN_KEYWORD_WHILE_MODIFIER 

while in the modifier form

PM_TOKEN_KEYWORD_YIELD 

yield

PM_TOKEN_KEYWORD___ENCODING__ 

ENCODING

PM_TOKEN_KEYWORD___FILE__ 

FILE

PM_TOKEN_KEYWORD___LINE__ 

LINE

PM_TOKEN_LABEL 

a label

PM_TOKEN_LABEL_END 

the end of a label

PM_TOKEN_LAMBDA_BEGIN 

{

PM_TOKEN_LESS 

<

PM_TOKEN_LESS_EQUAL 

<=

PM_TOKEN_LESS_EQUAL_GREATER 

<=>

PM_TOKEN_LESS_LESS 

<<

PM_TOKEN_LESS_LESS_EQUAL 

<<=

PM_TOKEN_METHOD_NAME 

a method name

PM_TOKEN_MINUS 
PM_TOKEN_MINUS_EQUAL 

-=

PM_TOKEN_MINUS_GREATER 

->

PM_TOKEN_NEWLINE 

a newline character outside of other tokens

PM_TOKEN_NUMBERED_REFERENCE 

a numbered reference to a capture group in the previous regular expression match

PM_TOKEN_PARENTHESIS_LEFT 

(

PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES 

( for a parentheses node

PM_TOKEN_PARENTHESIS_RIGHT 

)

PM_TOKEN_PERCENT 

%

PM_TOKEN_PERCENT_EQUAL 

%=

PM_TOKEN_PERCENT_LOWER_I 

i

PM_TOKEN_PERCENT_LOWER_W 

w

PM_TOKEN_PERCENT_LOWER_X 

x

PM_TOKEN_PERCENT_UPPER_I 

I

PM_TOKEN_PERCENT_UPPER_W 

W

PM_TOKEN_PIPE 

|

PM_TOKEN_PIPE_EQUAL 

|=

PM_TOKEN_PIPE_PIPE 

||

PM_TOKEN_PIPE_PIPE_EQUAL 

||=

PM_TOKEN_PLUS 
PM_TOKEN_PLUS_EQUAL 

+=

PM_TOKEN_QUESTION_MARK 

?

PM_TOKEN_REGEXP_BEGIN 

the beginning of a regular expression

PM_TOKEN_REGEXP_END 

the end of a regular expression

PM_TOKEN_SEMICOLON 

;

PM_TOKEN_SLASH 

/

PM_TOKEN_SLASH_EQUAL 

/=

PM_TOKEN_STAR 
PM_TOKEN_STAR_EQUAL 

*=

PM_TOKEN_STAR_STAR 

**

PM_TOKEN_STAR_STAR_EQUAL 

**=

PM_TOKEN_STRING_BEGIN 

the beginning of a string

PM_TOKEN_STRING_CONTENT 

the contents of a string

PM_TOKEN_STRING_END 

the end of a string

PM_TOKEN_SYMBOL_BEGIN 

the beginning of a symbol

PM_TOKEN_TILDE 

~ or ~@

PM_TOKEN_UAMPERSAND 

unary &

PM_TOKEN_UCOLON_COLON 

unary ::

PM_TOKEN_UDOT_DOT 

unary .

. operator

PM_TOKEN_UDOT_DOT_DOT 

unary ...

operator

PM_TOKEN_UMINUS 

-@

PM_TOKEN_UMINUS_NUM 

-@ for a number

PM_TOKEN_UPLUS 

+@

PM_TOKEN_USTAR 

unary *

PM_TOKEN_USTAR_STAR 

unary **

PM_TOKEN_WORDS_SEP 

a separator between words in a list

PM_TOKEN___END__ 

marker for the point in the file at which the parser should stop

PM_TOKEN_MAXIMUM 

The maximum token value.

Definition at line 29 of file ast.h.

Variable Documentation

◆ PM_NODE_FLAG_NEWLINE

const pm_node_flags_t PM_NODE_FLAG_NEWLINE = 0x1
static

We store the flags enum in every node in the tree.

Some flags are common to all nodes (the ones listed below). Others are specific to certain node types.

Definition at line 1046 of file ast.h.