/*----------------------------------------------------------------------------*/ /* This file is generated by the templates/template.rb script and should not */ /* be modified manually. See */ /* templates/ext/prism/api_node.c.erb */ /* if you are looking to modify the */ /* template */ /*----------------------------------------------------------------------------*/ #line 2 "prism/templates/ext/prism/api_node.c.erb" #include "prism/extension.h" extern VALUE rb_cPrism; extern VALUE rb_cPrismNode; extern VALUE rb_cPrismSource; extern VALUE rb_cPrismToken; extern VALUE rb_cPrismLocation; static VALUE rb_cPrismAliasGlobalVariableNode; static VALUE rb_cPrismAliasMethodNode; static VALUE rb_cPrismAlternationPatternNode; static VALUE rb_cPrismAndNode; static VALUE rb_cPrismArgumentsNode; static VALUE rb_cPrismArrayNode; static VALUE rb_cPrismArrayPatternNode; static VALUE rb_cPrismAssocNode; static VALUE rb_cPrismAssocSplatNode; static VALUE rb_cPrismBackReferenceReadNode; static VALUE rb_cPrismBeginNode; static VALUE rb_cPrismBlockArgumentNode; static VALUE rb_cPrismBlockLocalVariableNode; static VALUE rb_cPrismBlockNode; static VALUE rb_cPrismBlockParameterNode; static VALUE rb_cPrismBlockParametersNode; static VALUE rb_cPrismBreakNode; static VALUE rb_cPrismCallAndWriteNode; static VALUE rb_cPrismCallNode; static VALUE rb_cPrismCallOperatorWriteNode; static VALUE rb_cPrismCallOrWriteNode; static VALUE rb_cPrismCallTargetNode; static VALUE rb_cPrismCapturePatternNode; static VALUE rb_cPrismCaseMatchNode; static VALUE rb_cPrismCaseNode; static VALUE rb_cPrismClassNode; static VALUE rb_cPrismClassVariableAndWriteNode; static VALUE rb_cPrismClassVariableOperatorWriteNode; static VALUE rb_cPrismClassVariableOrWriteNode; static VALUE rb_cPrismClassVariableReadNode; static VALUE rb_cPrismClassVariableTargetNode; static VALUE rb_cPrismClassVariableWriteNode; static VALUE rb_cPrismConstantAndWriteNode; static VALUE rb_cPrismConstantOperatorWriteNode; static VALUE rb_cPrismConstantOrWriteNode; static VALUE rb_cPrismConstantPathAndWriteNode; static VALUE rb_cPrismConstantPathNode; static VALUE rb_cPrismConstantPathOperatorWriteNode; static VALUE rb_cPrismConstantPathOrWriteNode; static VALUE rb_cPrismConstantPathTargetNode; static VALUE rb_cPrismConstantPathWriteNode; static VALUE rb_cPrismConstantReadNode; static VALUE rb_cPrismConstantTargetNode; static VALUE rb_cPrismConstantWriteNode; static VALUE rb_cPrismDefNode; static VALUE rb_cPrismDefinedNode; static VALUE rb_cPrismElseNode; static VALUE rb_cPrismEmbeddedStatementsNode; static VALUE rb_cPrismEmbeddedVariableNode; static VALUE rb_cPrismEnsureNode; static VALUE rb_cPrismFalseNode; static VALUE rb_cPrismFindPatternNode; static VALUE rb_cPrismFlipFlopNode; static VALUE rb_cPrismFloatNode; static VALUE rb_cPrismForNode; static VALUE rb_cPrismForwardingArgumentsNode; static VALUE rb_cPrismForwardingParameterNode; static VALUE rb_cPrismForwardingSuperNode; static VALUE rb_cPrismGlobalVariableAndWriteNode; static VALUE rb_cPrismGlobalVariableOperatorWriteNode; static VALUE rb_cPrismGlobalVariableOrWriteNode; static VALUE rb_cPrismGlobalVariableReadNode; static VALUE rb_cPrismGlobalVariableTargetNode; static VALUE rb_cPrismGlobalVariableWriteNode; static VALUE rb_cPrismHashNode; static VALUE rb_cPrismHashPatternNode; static VALUE rb_cPrismIfNode; static VALUE rb_cPrismImaginaryNode; static VALUE rb_cPrismImplicitNode; static VALUE rb_cPrismImplicitRestNode; static VALUE rb_cPrismInNode; static VALUE rb_cPrismIndexAndWriteNode; static VALUE rb_cPrismIndexOperatorWriteNode; static VALUE rb_cPrismIndexOrWriteNode; static VALUE rb_cPrismIndexTargetNode; static VALUE rb_cPrismInstanceVariableAndWriteNode; static VALUE rb_cPrismInstanceVariableOperatorWriteNode; static VALUE rb_cPrismInstanceVariableOrWriteNode; static VALUE rb_cPrismInstanceVariableReadNode; static VALUE rb_cPrismInstanceVariableTargetNode; static VALUE rb_cPrismInstanceVariableWriteNode; static VALUE rb_cPrismIntegerNode; static VALUE rb_cPrismInterpolatedMatchLastLineNode; static VALUE rb_cPrismInterpolatedRegularExpressionNode; static VALUE rb_cPrismInterpolatedStringNode; static VALUE rb_cPrismInterpolatedSymbolNode; static VALUE rb_cPrismInterpolatedXStringNode; static VALUE rb_cPrismItLocalVariableReadNode; static VALUE rb_cPrismItParametersNode; static VALUE rb_cPrismKeywordHashNode; static VALUE rb_cPrismKeywordRestParameterNode; static VALUE rb_cPrismLambdaNode; static VALUE rb_cPrismLocalVariableAndWriteNode; static VALUE rb_cPrismLocalVariableOperatorWriteNode; static VALUE rb_cPrismLocalVariableOrWriteNode; static VALUE rb_cPrismLocalVariableReadNode; static VALUE rb_cPrismLocalVariableTargetNode; static VALUE rb_cPrismLocalVariableWriteNode; static VALUE rb_cPrismMatchLastLineNode; static VALUE rb_cPrismMatchPredicateNode; static VALUE rb_cPrismMatchRequiredNode; static VALUE rb_cPrismMatchWriteNode; static VALUE rb_cPrismMissingNode; static VALUE rb_cPrismModuleNode; static VALUE rb_cPrismMultiTargetNode; static VALUE rb_cPrismMultiWriteNode; static VALUE rb_cPrismNextNode; static VALUE rb_cPrismNilNode; static VALUE rb_cPrismNoKeywordsParameterNode; static VALUE rb_cPrismNumberedParametersNode; static VALUE rb_cPrismNumberedReferenceReadNode; static VALUE rb_cPrismOptionalKeywordParameterNode; static VALUE rb_cPrismOptionalParameterNode; static VALUE rb_cPrismOrNode; static VALUE rb_cPrismParametersNode; static VALUE rb_cPrismParenthesesNode; static VALUE rb_cPrismPinnedExpressionNode; static VALUE rb_cPrismPinnedVariableNode; static VALUE rb_cPrismPostExecutionNode; static VALUE rb_cPrismPreExecutionNode; static VALUE rb_cPrismProgramNode; static VALUE rb_cPrismRangeNode; static VALUE rb_cPrismRationalNode; static VALUE rb_cPrismRedoNode; static VALUE rb_cPrismRegularExpressionNode; static VALUE rb_cPrismRequiredKeywordParameterNode; static VALUE rb_cPrismRequiredParameterNode; static VALUE rb_cPrismRescueModifierNode; static VALUE rb_cPrismRescueNode; static VALUE rb_cPrismRestParameterNode; static VALUE rb_cPrismRetryNode; static VALUE rb_cPrismReturnNode; static VALUE rb_cPrismSelfNode; static VALUE rb_cPrismShareableConstantNode; static VALUE rb_cPrismSingletonClassNode; static VALUE rb_cPrismSourceEncodingNode; static VALUE rb_cPrismSourceFileNode; static VALUE rb_cPrismSourceLineNode; static VALUE rb_cPrismSplatNode; static VALUE rb_cPrismStatementsNode; static VALUE rb_cPrismStringNode; static VALUE rb_cPrismSuperNode; static VALUE rb_cPrismSymbolNode; static VALUE rb_cPrismTrueNode; static VALUE rb_cPrismUndefNode; static VALUE rb_cPrismUnlessNode; static VALUE rb_cPrismUntilNode; static VALUE rb_cPrismWhenNode; static VALUE rb_cPrismWhileNode; static VALUE rb_cPrismXStringNode; static VALUE rb_cPrismYieldNode; static VALUE pm_location_new(const pm_parser_t *parser, const uint8_t *start, const uint8_t *end) { uint64_t value = ((((uint64_t) (start - parser->start)) << 32) | ((uint32_t) (end - start))); return ULL2NUM(value); } VALUE pm_token_new(const pm_parser_t *parser, const pm_token_t *token, rb_encoding *encoding, VALUE source) { ID type = rb_intern(pm_token_type_name(token->type)); VALUE location = pm_location_new(parser, token->start, token->end); VALUE argv[] = { source, ID2SYM(type), rb_enc_str_new((const char *) token->start, token->end - token->start, encoding), location }; return rb_class_new_instance(4, argv, rb_cPrismToken); } static VALUE pm_string_new(const pm_string_t *string, rb_encoding *encoding) { return rb_enc_str_new((const char *) pm_string_source(string), pm_string_length(string), encoding); } VALUE pm_integer_new(const pm_integer_t *integer) { VALUE result; if (integer->values == NULL) { result = UINT2NUM(integer->value); } else { VALUE string = rb_str_new(NULL, integer->length * 8); unsigned char *bytes = (unsigned char *) RSTRING_PTR(string); size_t offset = integer->length * 8; for (size_t value_index = 0; value_index < integer->length; value_index++) { uint32_t value = integer->values[value_index]; for (int index = 0; index < 8; index++) { int byte = (value >> (4 * index)) & 0xf; bytes[--offset] = byte < 10 ? byte + '0' : byte - 10 + 'a'; } } result = rb_funcall(string, rb_intern("to_i"), 1, UINT2NUM(16)); } if (integer->negative) { result = rb_funcall(result, rb_intern("-@"), 0); } return result; } // Create a Prism::Source object from the given parser, after pm_parse() was called. VALUE pm_source_new(const pm_parser_t *parser, rb_encoding *encoding) { VALUE source_string = rb_enc_str_new((const char *) parser->start, parser->end - parser->start, encoding); VALUE offsets = rb_ary_new_capa(parser->newline_list.size); for (size_t index = 0; index < parser->newline_list.size; index++) { rb_ary_push(offsets, ULONG2NUM(parser->newline_list.offsets[index])); } return rb_funcall(rb_cPrismSource, rb_intern("for"), 3, source_string, LONG2NUM(parser->start_line), offsets); } typedef struct pm_node_stack_node { struct pm_node_stack_node *prev; const pm_node_t *visit; bool visited; } pm_node_stack_node_t; static void pm_node_stack_push(pm_node_stack_node_t **stack, const pm_node_t *visit) { pm_node_stack_node_t *node = xmalloc(sizeof(pm_node_stack_node_t)); node->prev = *stack; node->visit = visit; node->visited = false; *stack = node; } static const pm_node_t * pm_node_stack_pop(pm_node_stack_node_t **stack) { pm_node_stack_node_t *current = *stack; const pm_node_t *visit = current->visit; *stack = current->prev; xfree(current); return visit; } VALUE pm_ast_new(const pm_parser_t *parser, const pm_node_t *node, rb_encoding *encoding, VALUE source) { VALUE constants = rb_ary_new_capa(parser->constant_pool.size); for (uint32_t index = 0; index < parser->constant_pool.size; index++) { pm_constant_t *constant = &parser->constant_pool.constants[index]; int state = 0; VALUE string = rb_enc_str_new((const char *) constant->start, constant->length, encoding); VALUE value = rb_protect(rb_str_intern, string, &state); if (state != 0) { value = ID2SYM(rb_intern_const("?")); rb_set_errinfo(Qnil); } rb_ary_push(constants, value); } pm_node_stack_node_t *node_stack = NULL; pm_node_stack_push(&node_stack, node); VALUE value_stack = rb_ary_new(); while (node_stack != NULL) { if (!node_stack->visited) { if (node_stack->visit == NULL) { pm_node_stack_pop(&node_stack); rb_ary_push(value_stack, Qnil); continue; } const pm_node_t *node = node_stack->visit; node_stack->visited = true; switch (PM_NODE_TYPE(node)) { #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ALIAS_GLOBAL_VARIABLE_NODE: { pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->new_name); pm_node_stack_push(&node_stack, (pm_node_t *) cast->old_name); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ALIAS_METHOD_NODE: { pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->new_name); pm_node_stack_push(&node_stack, (pm_node_t *) cast->old_name); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ALTERNATION_PATTERN_NODE: { pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->left); pm_node_stack_push(&node_stack, (pm_node_t *) cast->right); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_AND_NODE: { pm_and_node_t *cast = (pm_and_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->left); pm_node_stack_push(&node_stack, (pm_node_t *) cast->right); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ARGUMENTS_NODE: { pm_arguments_node_t *cast = (pm_arguments_node_t *) node; for (size_t index = 0; index < cast->arguments.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ARRAY_NODE: { pm_array_node_t *cast = (pm_array_node_t *) node; for (size_t index = 0; index < cast->elements.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ARRAY_PATTERN_NODE: { pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant); for (size_t index = 0; index < cast->requireds.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest); for (size_t index = 0; index < cast->posts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->posts.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ASSOC_NODE: { pm_assoc_node_t *cast = (pm_assoc_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->key); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ASSOC_SPLAT_NODE: { pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_BEGIN_NODE: { pm_begin_node_t *cast = (pm_begin_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); pm_node_stack_push(&node_stack, (pm_node_t *) cast->rescue_clause); pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause); pm_node_stack_push(&node_stack, (pm_node_t *) cast->ensure_clause); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_ARGUMENT_NODE: { pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_NODE: { pm_block_node_t *cast = (pm_block_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters); pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_PARAMETERS_NODE: { pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters); for (size_t index = 0; index < cast->locals.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->locals.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_BREAK_NODE: { pm_break_node_t *cast = (pm_break_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_AND_WRITE_NODE: { pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_NODE: { pm_call_node_t *cast = (pm_call_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_OPERATOR_WRITE_NODE: { pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_OR_WRITE_NODE: { pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_TARGET_NODE: { pm_call_target_node_t *cast = (pm_call_target_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CAPTURE_PATTERN_NODE: { pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); pm_node_stack_push(&node_stack, (pm_node_t *) cast->target); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CASE_MATCH_NODE: { pm_case_match_node_t *cast = (pm_case_match_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate); for (size_t index = 0; index < cast->conditions.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CASE_NODE: { pm_case_node_t *cast = (pm_case_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate); for (size_t index = 0; index < cast->conditions.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_NODE: { pm_class_node_t *cast = (pm_class_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant_path); pm_node_stack_push(&node_stack, (pm_node_t *) cast->superclass); pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_AND_WRITE_NODE: { pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: { pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_OR_WRITE_NODE: { pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_WRITE_NODE: { pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_AND_WRITE_NODE: { pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_OPERATOR_WRITE_NODE: { pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_OR_WRITE_NODE: { pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_AND_WRITE_NODE: { pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->target); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_NODE: { pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->parent); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: { pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->target); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_OR_WRITE_NODE: { pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->target); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_TARGET_NODE: { pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->parent); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_WRITE_NODE: { pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->target); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_WRITE_NODE: { pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_DEF_NODE: { pm_def_node_t *cast = (pm_def_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters); pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_DEFINED_NODE: { pm_defined_node_t *cast = (pm_defined_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ELSE_NODE: { pm_else_node_t *cast = (pm_else_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_EMBEDDED_STATEMENTS_NODE: { pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_EMBEDDED_VARIABLE_NODE: { pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->variable); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_ENSURE_NODE: { pm_ensure_node_t *cast = (pm_ensure_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_FIND_PATTERN_NODE: { pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant); pm_node_stack_push(&node_stack, (pm_node_t *) cast->left); for (size_t index = 0; index < cast->requireds.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->right); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_FLIP_FLOP_NODE: { pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->left); pm_node_stack_push(&node_stack, (pm_node_t *) cast->right); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_FOR_NODE: { pm_for_node_t *cast = (pm_for_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->index); pm_node_stack_push(&node_stack, (pm_node_t *) cast->collection); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_FORWARDING_SUPER_NODE: { pm_forwarding_super_node_t *cast = (pm_forwarding_super_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: { pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: { pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: { pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_WRITE_NODE: { pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_HASH_NODE: { pm_hash_node_t *cast = (pm_hash_node_t *) node; for (size_t index = 0; index < cast->elements.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_HASH_PATTERN_NODE: { pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant); for (size_t index = 0; index < cast->elements.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_IF_NODE: { pm_if_node_t *cast = (pm_if_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); pm_node_stack_push(&node_stack, (pm_node_t *) cast->subsequent); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_IMAGINARY_NODE: { pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->numeric); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_IMPLICIT_NODE: { pm_implicit_node_t *cast = (pm_implicit_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_IN_NODE: { pm_in_node_t *cast = (pm_in_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_AND_WRITE_NODE: { pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_OPERATOR_WRITE_NODE: { pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_OR_WRITE_NODE: { pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_TARGET_NODE: { pm_index_target_node_t *cast = (pm_index_target_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver); pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: { pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: { pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: { pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_WRITE_NODE: { pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: { pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node; for (size_t index = 0; index < cast->parts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: { pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node; for (size_t index = 0; index < cast->parts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_STRING_NODE: { pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node; for (size_t index = 0; index < cast->parts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_SYMBOL_NODE: { pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node; for (size_t index = 0; index < cast->parts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_X_STRING_NODE: { pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node; for (size_t index = 0; index < cast->parts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_KEYWORD_HASH_NODE: { pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node; for (size_t index = 0; index < cast->elements.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_LAMBDA_NODE: { pm_lambda_node_t *cast = (pm_lambda_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters); pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_AND_WRITE_NODE: { pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: { pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_OR_WRITE_NODE: { pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_WRITE_NODE: { pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_PREDICATE_NODE: { pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_REQUIRED_NODE: { pm_match_required_node_t *cast = (pm_match_required_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_WRITE_NODE: { pm_match_write_node_t *cast = (pm_match_write_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->call); for (size_t index = 0; index < cast->targets.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->targets.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_MODULE_NODE: { pm_module_node_t *cast = (pm_module_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant_path); pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_MULTI_TARGET_NODE: { pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node; for (size_t index = 0; index < cast->lefts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->lefts.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest); for (size_t index = 0; index < cast->rights.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->rights.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_MULTI_WRITE_NODE: { pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node; for (size_t index = 0; index < cast->lefts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->lefts.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest); for (size_t index = 0; index < cast->rights.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->rights.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_NEXT_NODE: { pm_next_node_t *cast = (pm_next_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: { pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_OPTIONAL_PARAMETER_NODE: { pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->value); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_OR_NODE: { pm_or_node_t *cast = (pm_or_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->left); pm_node_stack_push(&node_stack, (pm_node_t *) cast->right); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_PARAMETERS_NODE: { pm_parameters_node_t *cast = (pm_parameters_node_t *) node; for (size_t index = 0; index < cast->requireds.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]); } for (size_t index = 0; index < cast->optionals.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->optionals.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest); for (size_t index = 0; index < cast->posts.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->posts.nodes[index]); } for (size_t index = 0; index < cast->keywords.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->keywords.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->keyword_rest); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_PARENTHESES_NODE: { pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_PINNED_EXPRESSION_NODE: { pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_PINNED_VARIABLE_NODE: { pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->variable); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_POST_EXECUTION_NODE: { pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_PRE_EXECUTION_NODE: { pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_PROGRAM_NODE: { pm_program_node_t *cast = (pm_program_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_RANGE_NODE: { pm_range_node_t *cast = (pm_range_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->left); pm_node_stack_push(&node_stack, (pm_node_t *) cast->right); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_RESCUE_MODIFIER_NODE: { pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression); pm_node_stack_push(&node_stack, (pm_node_t *) cast->rescue_expression); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_RESCUE_NODE: { pm_rescue_node_t *cast = (pm_rescue_node_t *) node; for (size_t index = 0; index < cast->exceptions.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->exceptions.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->reference); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); pm_node_stack_push(&node_stack, (pm_node_t *) cast->subsequent); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_RETURN_NODE: { pm_return_node_t *cast = (pm_return_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_SHAREABLE_CONSTANT_NODE: { pm_shareable_constant_node_t *cast = (pm_shareable_constant_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->write); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_SINGLETON_CLASS_NODE: { pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression); pm_node_stack_push(&node_stack, (pm_node_t *) cast->body); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_SPLAT_NODE: { pm_splat_node_t *cast = (pm_splat_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_STATEMENTS_NODE: { pm_statements_node_t *cast = (pm_statements_node_t *) node; for (size_t index = 0; index < cast->body.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->body.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_SUPER_NODE: { pm_super_node_t *cast = (pm_super_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); pm_node_stack_push(&node_stack, (pm_node_t *) cast->block); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_UNDEF_NODE: { pm_undef_node_t *cast = (pm_undef_node_t *) node; for (size_t index = 0; index < cast->names.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->names.nodes[index]); } break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_UNLESS_NODE: { pm_unless_node_t *cast = (pm_unless_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_UNTIL_NODE: { pm_until_node_t *cast = (pm_until_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_WHEN_NODE: { pm_when_node_t *cast = (pm_when_node_t *) node; for (size_t index = 0; index < cast->conditions.size; index++) { pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]); } pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_WHILE_NODE: { pm_while_node_t *cast = (pm_while_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate); pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements); break; } #line 146 "prism/templates/ext/prism/api_node.c.erb" case PM_YIELD_NODE: { pm_yield_node_t *cast = (pm_yield_node_t *) node; pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments); break; } default: break; } #line 166 "prism/templates/ext/prism/api_node.c.erb" } else { const pm_node_t *node = pm_node_stack_pop(&node_stack); switch (PM_NODE_TYPE(node)) { #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ALIAS_GLOBAL_VARIABLE_NODE: { pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // new_name #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // old_name #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismAliasGlobalVariableNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ALIAS_METHOD_NODE: { pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // new_name #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // old_name #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismAliasMethodNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ALTERNATION_PATTERN_NODE: { pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // left #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // right #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismAlternationPatternNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_AND_NODE: { pm_and_node_t *cast = (pm_and_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // left #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // right #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismAndNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ARGUMENTS_NODE: { pm_arguments_node_t *cast = (pm_arguments_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // arguments #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->arguments.size); for (size_t index = 0; index < cast->arguments.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismArgumentsNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ARRAY_NODE: { pm_array_node_t *cast = (pm_array_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // elements #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->elements.size); for (size_t index = 0; index < cast->elements.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismArrayNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ARRAY_PATTERN_NODE: { pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // constant #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // requireds #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->requireds.size); for (size_t index = 0; index < cast->requireds.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // rest #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // posts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_new_capa(cast->posts.size); for (size_t index = 0; index < cast->posts.size; index++) { rb_ary_push(argv[7], rb_ary_pop(value_stack)); } // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[8] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[9] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismArrayPatternNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ASSOC_NODE: { pm_assoc_node_t *cast = (pm_assoc_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // key #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismAssocNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ASSOC_SPLAT_NODE: { pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismAssocSplatNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BACK_REFERENCE_READ_NODE: { pm_back_reference_read_node_t *cast = (pm_back_reference_read_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismBackReferenceReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BEGIN_NODE: { pm_begin_node_t *cast = (pm_begin_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // begin_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->begin_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->begin_keyword_loc.start, cast->begin_keyword_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // rescue_clause #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // else_clause #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // ensure_clause #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // end_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[9] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismBeginNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_ARGUMENT_NODE: { pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // expression #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismBlockArgumentNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_LOCAL_VARIABLE_NODE: { pm_block_local_variable_node_t *cast = (pm_block_local_variable_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismBlockLocalVariableNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_NODE: { pm_block_node_t *cast = (pm_block_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // parameters #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismBlockNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_PARAMETER_NODE: { pm_block_parameter_node_t *cast = (pm_block_parameter_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name argv[4] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1); // name_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismBlockParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BLOCK_PARAMETERS_NODE: { pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // parameters #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // locals #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismBlockParametersNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_BREAK_NODE: { pm_break_node_t *cast = (pm_break_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismBreakNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_AND_WRITE_NODE: { pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node; VALUE argv[11]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // message_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end); // read_name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->read_name != 0); argv[7] = RARRAY_AREF(constants, cast->read_name - 1); // write_name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->write_name != 0); argv[8] = RARRAY_AREF(constants, cast->write_name - 1); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[9] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[10] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(11, argv, rb_cPrismCallAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_NODE: { pm_call_node_t *cast = (pm_call_node_t *) node; VALUE argv[12]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[6] = RARRAY_AREF(constants, cast->name - 1); // message_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[8] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[10] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[11] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(12, argv, rb_cPrismCallNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_OPERATOR_WRITE_NODE: { pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node; VALUE argv[12]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // message_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end); // read_name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->read_name != 0); argv[7] = RARRAY_AREF(constants, cast->read_name - 1); // write_name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->write_name != 0); argv[8] = RARRAY_AREF(constants, cast->write_name - 1); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[9] = RARRAY_AREF(constants, cast->binary_operator - 1); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[10] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[11] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(12, argv, rb_cPrismCallOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_OR_WRITE_NODE: { pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node; VALUE argv[11]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // message_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end); // read_name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->read_name != 0); argv[7] = RARRAY_AREF(constants, cast->read_name - 1); // write_name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->write_name != 0); argv[8] = RARRAY_AREF(constants, cast->write_name - 1); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[9] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[10] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(11, argv, rb_cPrismCallOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CALL_TARGET_NODE: { pm_call_target_node_t *cast = (pm_call_target_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[6] = RARRAY_AREF(constants, cast->name - 1); // message_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->message_loc.start, cast->message_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismCallTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CAPTURE_PATTERN_NODE: { pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // target #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismCapturePatternNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CASE_MATCH_NODE: { pm_case_match_node_t *cast = (pm_case_match_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // predicate #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // conditions #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->conditions.size); for (size_t index = 0; index < cast->conditions.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // else_clause #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // case_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismCaseMatchNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CASE_NODE: { pm_case_node_t *cast = (pm_case_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // predicate #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // conditions #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->conditions.size); for (size_t index = 0; index < cast->conditions.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // else_clause #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // case_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismCaseNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_NODE: { pm_class_node_t *cast = (pm_class_node_t *) node; VALUE argv[12]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // class_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end); // constant_path #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // inheritance_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->inheritance_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->inheritance_operator_loc.start, cast->inheritance_operator_loc.end); // superclass #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[10] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[11] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(12, argv, rb_cPrismClassNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_AND_WRITE_NODE: { pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismClassVariableAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: { pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismClassVariableOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_OR_WRITE_NODE: { pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismClassVariableOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_READ_NODE: { pm_class_variable_read_node_t *cast = (pm_class_variable_read_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismClassVariableReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_TARGET_NODE: { pm_class_variable_target_node_t *cast = (pm_class_variable_target_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismClassVariableTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CLASS_VARIABLE_WRITE_NODE: { pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismClassVariableWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_AND_WRITE_NODE: { pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismConstantAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_OPERATOR_WRITE_NODE: { pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismConstantOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_OR_WRITE_NODE: { pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismConstantOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_AND_WRITE_NODE: { pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // target #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismConstantPathAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_NODE: { pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // parent #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // name argv[5] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1); // delimiter_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismConstantPathNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: { pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // target #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[7] = RARRAY_AREF(constants, cast->binary_operator - 1); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismConstantPathOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_OR_WRITE_NODE: { pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // target #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismConstantPathOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_TARGET_NODE: { pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // parent #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // name argv[5] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1); // delimiter_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismConstantPathTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_PATH_WRITE_NODE: { pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // target #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismConstantPathWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_READ_NODE: { pm_constant_read_node_t *cast = (pm_constant_read_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismConstantReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_TARGET_NODE: { pm_constant_target_node_t *cast = (pm_constant_target_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismConstantTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_CONSTANT_WRITE_NODE: { pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismConstantWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_DEF_NODE: { pm_def_node_t *cast = (pm_def_node_t *) node; VALUE argv[16]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // parameters #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[9], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // def_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[10] = pm_location_new(parser, cast->def_keyword_loc.start, cast->def_keyword_loc.end); // operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[11] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // lparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[12] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // rparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[13] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); // equal_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[14] = cast->equal_loc.start == NULL ? Qnil : pm_location_new(parser, cast->equal_loc.start, cast->equal_loc.end); // end_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[15] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(16, argv, rb_cPrismDefNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_DEFINED_NODE: { pm_defined_node_t *cast = (pm_defined_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // lparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // rparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismDefinedNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ELSE_NODE: { pm_else_node_t *cast = (pm_else_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // else_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->else_keyword_loc.start, cast->else_keyword_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // end_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismElseNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_EMBEDDED_STATEMENTS_NODE: { pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismEmbeddedStatementsNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_EMBEDDED_VARIABLE_NODE: { pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // variable #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismEmbeddedVariableNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_ENSURE_NODE: { pm_ensure_node_t *cast = (pm_ensure_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // ensure_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->ensure_keyword_loc.start, cast->ensure_keyword_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismEnsureNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FALSE_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismFalseNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FIND_PATTERN_NODE: { pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // constant #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // left #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // requireds #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_new_capa(cast->requireds.size); for (size_t index = 0; index < cast->requireds.size; index++) { rb_ary_push(argv[6], rb_ary_pop(value_stack)); } // right #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[8] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[9] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismFindPatternNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FLIP_FLOP_NODE: { pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // left #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // right #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismFlipFlopNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FLOAT_NODE: { pm_float_node_t *cast = (pm_float_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 235 "prism/templates/ext/prism/api_node.c.erb" argv[4] = DBL2NUM(cast->value); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismFloatNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FOR_NODE: { pm_for_node_t *cast = (pm_for_node_t *) node; VALUE argv[11]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // index #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // collection #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // for_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->for_keyword_loc.start, cast->for_keyword_loc.end); // in_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->in_keyword_loc.start, cast->in_keyword_loc.end); // do_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[9] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[10] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(11, argv, rb_cPrismForNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FORWARDING_ARGUMENTS_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismForwardingArgumentsNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FORWARDING_PARAMETER_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismForwardingParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_FORWARDING_SUPER_NODE: { VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismForwardingSuperNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: { pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismGlobalVariableAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: { pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismGlobalVariableOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: { pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismGlobalVariableOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_READ_NODE: { pm_global_variable_read_node_t *cast = (pm_global_variable_read_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismGlobalVariableReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_TARGET_NODE: { pm_global_variable_target_node_t *cast = (pm_global_variable_target_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismGlobalVariableTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_GLOBAL_VARIABLE_WRITE_NODE: { pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismGlobalVariableWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_HASH_NODE: { pm_hash_node_t *cast = (pm_hash_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // elements #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->elements.size); for (size_t index = 0; index < cast->elements.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismHashNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_HASH_PATTERN_NODE: { pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // constant #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // elements #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->elements.size); for (size_t index = 0; index < cast->elements.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // rest #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[8] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismHashPatternNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IF_NODE: { pm_if_node_t *cast = (pm_if_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // if_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->if_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->if_keyword_loc.start, cast->if_keyword_loc.end); // predicate #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // then_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // subsequent #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // end_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[9] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismIfNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IMAGINARY_NODE: { VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // numeric #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismImaginaryNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IMPLICIT_NODE: { VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismImplicitNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IMPLICIT_REST_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismImplicitRestNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IN_NODE: { pm_in_node_t *cast = (pm_in_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // pattern #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // in_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->in_loc.start, cast->in_loc.end); // then_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->then_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_loc.start, cast->then_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismInNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_AND_WRITE_NODE: { pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node; VALUE argv[12]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[10] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[11] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(12, argv, rb_cPrismIndexAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_OPERATOR_WRITE_NODE: { pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node; VALUE argv[13]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[10] = RARRAY_AREF(constants, cast->binary_operator - 1); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[11] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[12] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(13, argv, rb_cPrismIndexOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_OR_WRITE_NODE: { pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node; VALUE argv[12]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // call_operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[10] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[11] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(12, argv, rb_cPrismIndexOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INDEX_TARGET_NODE: { pm_index_target_node_t *cast = (pm_index_target_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // receiver #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismIndexTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: { pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismInstanceVariableAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: { pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismInstanceVariableOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: { pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismInstanceVariableOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_READ_NODE: { pm_instance_variable_read_node_t *cast = (pm_instance_variable_read_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInstanceVariableReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_TARGET_NODE: { pm_instance_variable_target_node_t *cast = (pm_instance_variable_target_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInstanceVariableTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INSTANCE_VARIABLE_WRITE_NODE: { pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismInstanceVariableWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INTEGER_NODE: { pm_integer_node_t *cast = (pm_integer_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 232 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_integer_new(&cast->value); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismIntegerNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: { pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // parts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->parts.size); for (size_t index = 0; index < cast->parts.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismInterpolatedMatchLastLineNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: { pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // parts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->parts.size); for (size_t index = 0; index < cast->parts.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismInterpolatedRegularExpressionNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_STRING_NODE: { pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // parts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->parts.size); for (size_t index = 0; index < cast->parts.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismInterpolatedStringNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_SYMBOL_NODE: { pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // parts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->parts.size); for (size_t index = 0; index < cast->parts.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismInterpolatedSymbolNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_INTERPOLATED_X_STRING_NODE: { pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // parts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->parts.size); for (size_t index = 0; index < cast->parts.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismInterpolatedXStringNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IT_LOCAL_VARIABLE_READ_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismItLocalVariableReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_IT_PARAMETERS_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismItParametersNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_KEYWORD_HASH_NODE: { pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // elements #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->elements.size); for (size_t index = 0; index < cast->elements.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismKeywordHashNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_KEYWORD_REST_PARAMETER_NODE: { pm_keyword_rest_parameter_node_t *cast = (pm_keyword_rest_parameter_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name argv[4] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1); // name_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismKeywordRestParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LAMBDA_NODE: { pm_lambda_node_t *cast = (pm_lambda_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // parameters #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismLambdaNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_AND_WRITE_NODE: { pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[7] = RARRAY_AREF(constants, cast->name - 1); // depth #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[8] = ULONG2NUM(cast->depth); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismLocalVariableAndWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: { pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // binary_operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[7] = RARRAY_AREF(constants, cast->name - 1); // binary_operator #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->binary_operator != 0); argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1); // depth #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[9] = ULONG2NUM(cast->depth); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismLocalVariableOperatorWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_OR_WRITE_NODE: { pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[7] = RARRAY_AREF(constants, cast->name - 1); // depth #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[8] = ULONG2NUM(cast->depth); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismLocalVariableOrWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_READ_NODE: { pm_local_variable_read_node_t *cast = (pm_local_variable_read_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // depth #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[5] = ULONG2NUM(cast->depth); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismLocalVariableReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_TARGET_NODE: { pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // depth #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[5] = ULONG2NUM(cast->depth); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismLocalVariableTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_LOCAL_VARIABLE_WRITE_NODE: { pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // depth #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[5] = ULONG2NUM(cast->depth); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismLocalVariableWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_LAST_LINE_NODE: { pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // content_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // unescaped #line 204 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_string_new(&cast->unescaped, encoding); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismMatchLastLineNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_PREDICATE_NODE: { pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // pattern #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismMatchPredicateNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_REQUIRED_NODE: { pm_match_required_node_t *cast = (pm_match_required_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // pattern #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismMatchRequiredNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MATCH_WRITE_NODE: { pm_match_write_node_t *cast = (pm_match_write_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // call #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // targets #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->targets.size); for (size_t index = 0; index < cast->targets.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismMatchWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MISSING_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismMissingNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MODULE_NODE: { pm_module_node_t *cast = (pm_module_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // module_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->module_keyword_loc.start, cast->module_keyword_loc.end); // constant_path #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[8] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[9] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismModuleNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MULTI_TARGET_NODE: { pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // lefts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->lefts.size); for (size_t index = 0; index < cast->lefts.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } // rest #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // rights #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_new_capa(cast->rights.size); for (size_t index = 0; index < cast->rights.size; index++) { rb_ary_push(argv[6], rb_ary_pop(value_stack)); } // lparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // rparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[8] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismMultiTargetNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_MULTI_WRITE_NODE: { pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node; VALUE argv[11]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // lefts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->lefts.size); for (size_t index = 0; index < cast->lefts.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } // rest #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // rights #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_new_capa(cast->rights.size); for (size_t index = 0; index < cast->rights.size; index++) { rb_ary_push(argv[6], rb_ary_pop(value_stack)); } // lparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // rparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[8] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[9] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[10] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(11, argv, rb_cPrismMultiWriteNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_NEXT_NODE: { pm_next_node_t *cast = (pm_next_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismNextNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_NIL_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismNilNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_NO_KEYWORDS_PARAMETER_NODE: { pm_no_keywords_parameter_node_t *cast = (pm_no_keywords_parameter_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismNoKeywordsParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_NUMBERED_PARAMETERS_NODE: { pm_numbered_parameters_node_t *cast = (pm_numbered_parameters_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // maximum #line 226 "prism/templates/ext/prism/api_node.c.erb" argv[4] = UINT2NUM(cast->maximum); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismNumberedParametersNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_NUMBERED_REFERENCE_READ_NODE: { pm_numbered_reference_read_node_t *cast = (pm_numbered_reference_read_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // number #line 229 "prism/templates/ext/prism/api_node.c.erb" argv[4] = ULONG2NUM(cast->number); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismNumberedReferenceReadNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: { pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismOptionalKeywordParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_OPTIONAL_PARAMETER_NODE: { pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // value #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismOptionalParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_OR_NODE: { pm_or_node_t *cast = (pm_or_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // left #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // right #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismOrNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_PARAMETERS_NODE: { pm_parameters_node_t *cast = (pm_parameters_node_t *) node; VALUE argv[11]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // requireds #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->requireds.size); for (size_t index = 0; index < cast->requireds.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } // optionals #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->optionals.size); for (size_t index = 0; index < cast->optionals.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // rest #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // posts #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_new_capa(cast->posts.size); for (size_t index = 0; index < cast->posts.size; index++) { rb_ary_push(argv[7], rb_ary_pop(value_stack)); } // keywords #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_new_capa(cast->keywords.size); for (size_t index = 0; index < cast->keywords.size; index++) { rb_ary_push(argv[8], rb_ary_pop(value_stack)); } // keyword_rest #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[10] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(11, argv, rb_cPrismParametersNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_PARENTHESES_NODE: { pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismParenthesesNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_PINNED_EXPRESSION_NODE: { pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // expression #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // lparen_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // rparen_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismPinnedExpressionNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_PINNED_VARIABLE_NODE: { pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // variable #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismPinnedVariableNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_POST_EXECUTION_NODE: { pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismPostExecutionNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_PRE_EXECUTION_NODE: { pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismPreExecutionNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_PROGRAM_NODE: { pm_program_node_t *cast = (pm_program_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismProgramNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_RANGE_NODE: { pm_range_node_t *cast = (pm_range_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // left #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // right #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismRangeNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_RATIONAL_NODE: { pm_rational_node_t *cast = (pm_rational_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // numerator #line 232 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_integer_new(&cast->numerator); // denominator #line 232 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_integer_new(&cast->denominator); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismRationalNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_REDO_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismRedoNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_REGULAR_EXPRESSION_NODE: { pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // content_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // unescaped #line 204 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_string_new(&cast->unescaped, encoding); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismRegularExpressionNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_REQUIRED_KEYWORD_PARAMETER_NODE: { pm_required_keyword_parameter_node_t *cast = (pm_required_keyword_parameter_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); // name_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismRequiredKeywordParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_REQUIRED_PARAMETER_NODE: { pm_required_parameter_node_t *cast = (pm_required_parameter_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name #line 207 "prism/templates/ext/prism/api_node.c.erb" assert(cast->name != 0); argv[4] = RARRAY_AREF(constants, cast->name - 1); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismRequiredParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_RESCUE_MODIFIER_NODE: { pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // expression #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // rescue_expression #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismRescueModifierNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_RESCUE_NODE: { pm_rescue_node_t *cast = (pm_rescue_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // exceptions #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->exceptions.size); for (size_t index = 0; index < cast->exceptions.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // operator_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // reference #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // subsequent #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[9] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismRescueNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_REST_PARAMETER_NODE: { pm_rest_parameter_node_t *cast = (pm_rest_parameter_node_t *) node; VALUE argv[7]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // name argv[4] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1); // name_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismRestParameterNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_RETRY_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismRetryNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_RETURN_NODE: { pm_return_node_t *cast = (pm_return_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismReturnNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SELF_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismSelfNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SHAREABLE_CONSTANT_NODE: { VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // write #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismShareableConstantNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SINGLETON_CLASS_NODE: { pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // locals #line 213 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->locals.size); for (size_t index = 0; index < cast->locals.size; index++) { assert(cast->locals.ids[index] != 0); rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1)); } // class_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // expression #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // body #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // end_keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[9] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismSingletonClassNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SOURCE_ENCODING_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismSourceEncodingNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SOURCE_FILE_NODE: { pm_source_file_node_t *cast = (pm_source_file_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // filepath #line 204 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_string_new(&cast->filepath, encoding); rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismSourceFileNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SOURCE_LINE_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismSourceLineNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SPLAT_NODE: { pm_splat_node_t *cast = (pm_splat_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // operator_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end); // expression #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismSplatNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_STATEMENTS_NODE: { pm_statements_node_t *cast = (pm_statements_node_t *) node; VALUE argv[5]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // body #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->body.size); for (size_t index = 0; index < cast->body.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismStatementsNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_STRING_NODE: { pm_string_node_t *cast = (pm_string_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // content_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // unescaped #line 204 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_string_new(&cast->unescaped, encoding); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismStringNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SUPER_NODE: { pm_super_node_t *cast = (pm_super_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // lparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // rparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); // block #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismSuperNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_SYMBOL_NODE: { pm_symbol_node_t *cast = (pm_symbol_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // value_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->value_loc.start == NULL ? Qnil : pm_location_new(parser, cast->value_loc.start, cast->value_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // unescaped #line 204 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_string_new(&cast->unescaped, encoding); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismSymbolNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_TRUE_NODE: { VALUE argv[4]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismTrueNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_UNDEF_NODE: { pm_undef_node_t *cast = (pm_undef_node_t *) node; VALUE argv[6]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // names #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[4] = rb_ary_new_capa(cast->names.size); for (size_t index = 0; index < cast->names.size; index++) { rb_ary_push(argv[4], rb_ary_pop(value_stack)); } // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismUndefNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_UNLESS_NODE: { pm_unless_node_t *cast = (pm_unless_node_t *) node; VALUE argv[10]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // predicate #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_pop(value_stack); // then_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // else_clause #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); // end_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[9] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end); rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismUnlessNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_UNTIL_NODE: { pm_until_node_t *cast = (pm_until_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // do_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // predicate #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismUntilNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_WHEN_NODE: { pm_when_node_t *cast = (pm_when_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // conditions #line 198 "prism/templates/ext/prism/api_node.c.erb" argv[5] = rb_ary_new_capa(cast->conditions.size); for (size_t index = 0; index < cast->conditions.size; index++) { rb_ary_push(argv[5], rb_ary_pop(value_stack)); } // then_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismWhenNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_WHILE_NODE: { pm_while_node_t *cast = (pm_while_node_t *) node; VALUE argv[9]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // do_keyword_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end); // closing_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // predicate #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[7] = rb_ary_pop(value_stack); // statements #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[8] = rb_ary_pop(value_stack); rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismWhileNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_X_STRING_NODE: { pm_x_string_node_t *cast = (pm_x_string_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // opening_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end); // content_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end); // closing_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end); // unescaped #line 204 "prism/templates/ext/prism/api_node.c.erb" argv[7] = pm_string_new(&cast->unescaped, encoding); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismXStringNode)); break; } #line 172 "prism/templates/ext/prism/api_node.c.erb" case PM_YIELD_NODE: { pm_yield_node_t *cast = (pm_yield_node_t *) node; VALUE argv[8]; // source argv[0] = source; // node_id argv[1] = ULONG2NUM(node->node_id); // location argv[2] = pm_location_new(parser, node->location.start, node->location.end); // flags argv[3] = ULONG2NUM(node->flags); // keyword_loc #line 220 "prism/templates/ext/prism/api_node.c.erb" argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end); // lparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[5] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end); // arguments #line 195 "prism/templates/ext/prism/api_node.c.erb" argv[6] = rb_ary_pop(value_stack); // rparen_loc #line 223 "prism/templates/ext/prism/api_node.c.erb" argv[7] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end); rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismYieldNode)); break; } default: rb_raise(rb_eRuntimeError, "unknown node type: %d", PM_NODE_TYPE(node)); } } } return rb_ary_pop(value_stack); } void Init_prism_api_node(void) { rb_cPrismAliasGlobalVariableNode = rb_define_class_under(rb_cPrism, "AliasGlobalVariableNode", rb_cPrismNode); rb_cPrismAliasMethodNode = rb_define_class_under(rb_cPrism, "AliasMethodNode", rb_cPrismNode); rb_cPrismAlternationPatternNode = rb_define_class_under(rb_cPrism, "AlternationPatternNode", rb_cPrismNode); rb_cPrismAndNode = rb_define_class_under(rb_cPrism, "AndNode", rb_cPrismNode); rb_cPrismArgumentsNode = rb_define_class_under(rb_cPrism, "ArgumentsNode", rb_cPrismNode); rb_cPrismArrayNode = rb_define_class_under(rb_cPrism, "ArrayNode", rb_cPrismNode); rb_cPrismArrayPatternNode = rb_define_class_under(rb_cPrism, "ArrayPatternNode", rb_cPrismNode); rb_cPrismAssocNode = rb_define_class_under(rb_cPrism, "AssocNode", rb_cPrismNode); rb_cPrismAssocSplatNode = rb_define_class_under(rb_cPrism, "AssocSplatNode", rb_cPrismNode); rb_cPrismBackReferenceReadNode = rb_define_class_under(rb_cPrism, "BackReferenceReadNode", rb_cPrismNode); rb_cPrismBeginNode = rb_define_class_under(rb_cPrism, "BeginNode", rb_cPrismNode); rb_cPrismBlockArgumentNode = rb_define_class_under(rb_cPrism, "BlockArgumentNode", rb_cPrismNode); rb_cPrismBlockLocalVariableNode = rb_define_class_under(rb_cPrism, "BlockLocalVariableNode", rb_cPrismNode); rb_cPrismBlockNode = rb_define_class_under(rb_cPrism, "BlockNode", rb_cPrismNode); rb_cPrismBlockParameterNode = rb_define_class_under(rb_cPrism, "BlockParameterNode", rb_cPrismNode); rb_cPrismBlockParametersNode = rb_define_class_under(rb_cPrism, "BlockParametersNode", rb_cPrismNode); rb_cPrismBreakNode = rb_define_class_under(rb_cPrism, "BreakNode", rb_cPrismNode); rb_cPrismCallAndWriteNode = rb_define_class_under(rb_cPrism, "CallAndWriteNode", rb_cPrismNode); rb_cPrismCallNode = rb_define_class_under(rb_cPrism, "CallNode", rb_cPrismNode); rb_cPrismCallOperatorWriteNode = rb_define_class_under(rb_cPrism, "CallOperatorWriteNode", rb_cPrismNode); rb_cPrismCallOrWriteNode = rb_define_class_under(rb_cPrism, "CallOrWriteNode", rb_cPrismNode); rb_cPrismCallTargetNode = rb_define_class_under(rb_cPrism, "CallTargetNode", rb_cPrismNode); rb_cPrismCapturePatternNode = rb_define_class_under(rb_cPrism, "CapturePatternNode", rb_cPrismNode); rb_cPrismCaseMatchNode = rb_define_class_under(rb_cPrism, "CaseMatchNode", rb_cPrismNode); rb_cPrismCaseNode = rb_define_class_under(rb_cPrism, "CaseNode", rb_cPrismNode); rb_cPrismClassNode = rb_define_class_under(rb_cPrism, "ClassNode", rb_cPrismNode); rb_cPrismClassVariableAndWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableAndWriteNode", rb_cPrismNode); rb_cPrismClassVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableOperatorWriteNode", rb_cPrismNode); rb_cPrismClassVariableOrWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableOrWriteNode", rb_cPrismNode); rb_cPrismClassVariableReadNode = rb_define_class_under(rb_cPrism, "ClassVariableReadNode", rb_cPrismNode); rb_cPrismClassVariableTargetNode = rb_define_class_under(rb_cPrism, "ClassVariableTargetNode", rb_cPrismNode); rb_cPrismClassVariableWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableWriteNode", rb_cPrismNode); rb_cPrismConstantAndWriteNode = rb_define_class_under(rb_cPrism, "ConstantAndWriteNode", rb_cPrismNode); rb_cPrismConstantOperatorWriteNode = rb_define_class_under(rb_cPrism, "ConstantOperatorWriteNode", rb_cPrismNode); rb_cPrismConstantOrWriteNode = rb_define_class_under(rb_cPrism, "ConstantOrWriteNode", rb_cPrismNode); rb_cPrismConstantPathAndWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathAndWriteNode", rb_cPrismNode); rb_cPrismConstantPathNode = rb_define_class_under(rb_cPrism, "ConstantPathNode", rb_cPrismNode); rb_cPrismConstantPathOperatorWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathOperatorWriteNode", rb_cPrismNode); rb_cPrismConstantPathOrWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathOrWriteNode", rb_cPrismNode); rb_cPrismConstantPathTargetNode = rb_define_class_under(rb_cPrism, "ConstantPathTargetNode", rb_cPrismNode); rb_cPrismConstantPathWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathWriteNode", rb_cPrismNode); rb_cPrismConstantReadNode = rb_define_class_under(rb_cPrism, "ConstantReadNode", rb_cPrismNode); rb_cPrismConstantTargetNode = rb_define_class_under(rb_cPrism, "ConstantTargetNode", rb_cPrismNode); rb_cPrismConstantWriteNode = rb_define_class_under(rb_cPrism, "ConstantWriteNode", rb_cPrismNode); rb_cPrismDefNode = rb_define_class_under(rb_cPrism, "DefNode", rb_cPrismNode); rb_cPrismDefinedNode = rb_define_class_under(rb_cPrism, "DefinedNode", rb_cPrismNode); rb_cPrismElseNode = rb_define_class_under(rb_cPrism, "ElseNode", rb_cPrismNode); rb_cPrismEmbeddedStatementsNode = rb_define_class_under(rb_cPrism, "EmbeddedStatementsNode", rb_cPrismNode); rb_cPrismEmbeddedVariableNode = rb_define_class_under(rb_cPrism, "EmbeddedVariableNode", rb_cPrismNode); rb_cPrismEnsureNode = rb_define_class_under(rb_cPrism, "EnsureNode", rb_cPrismNode); rb_cPrismFalseNode = rb_define_class_under(rb_cPrism, "FalseNode", rb_cPrismNode); rb_cPrismFindPatternNode = rb_define_class_under(rb_cPrism, "FindPatternNode", rb_cPrismNode); rb_cPrismFlipFlopNode = rb_define_class_under(rb_cPrism, "FlipFlopNode", rb_cPrismNode); rb_cPrismFloatNode = rb_define_class_under(rb_cPrism, "FloatNode", rb_cPrismNode); rb_cPrismForNode = rb_define_class_under(rb_cPrism, "ForNode", rb_cPrismNode); rb_cPrismForwardingArgumentsNode = rb_define_class_under(rb_cPrism, "ForwardingArgumentsNode", rb_cPrismNode); rb_cPrismForwardingParameterNode = rb_define_class_under(rb_cPrism, "ForwardingParameterNode", rb_cPrismNode); rb_cPrismForwardingSuperNode = rb_define_class_under(rb_cPrism, "ForwardingSuperNode", rb_cPrismNode); rb_cPrismGlobalVariableAndWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableAndWriteNode", rb_cPrismNode); rb_cPrismGlobalVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableOperatorWriteNode", rb_cPrismNode); rb_cPrismGlobalVariableOrWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableOrWriteNode", rb_cPrismNode); rb_cPrismGlobalVariableReadNode = rb_define_class_under(rb_cPrism, "GlobalVariableReadNode", rb_cPrismNode); rb_cPrismGlobalVariableTargetNode = rb_define_class_under(rb_cPrism, "GlobalVariableTargetNode", rb_cPrismNode); rb_cPrismGlobalVariableWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableWriteNode", rb_cPrismNode); rb_cPrismHashNode = rb_define_class_under(rb_cPrism, "HashNode", rb_cPrismNode); rb_cPrismHashPatternNode = rb_define_class_under(rb_cPrism, "HashPatternNode", rb_cPrismNode); rb_cPrismIfNode = rb_define_class_under(rb_cPrism, "IfNode", rb_cPrismNode); rb_cPrismImaginaryNode = rb_define_class_under(rb_cPrism, "ImaginaryNode", rb_cPrismNode); rb_cPrismImplicitNode = rb_define_class_under(rb_cPrism, "ImplicitNode", rb_cPrismNode); rb_cPrismImplicitRestNode = rb_define_class_under(rb_cPrism, "ImplicitRestNode", rb_cPrismNode); rb_cPrismInNode = rb_define_class_under(rb_cPrism, "InNode", rb_cPrismNode); rb_cPrismIndexAndWriteNode = rb_define_class_under(rb_cPrism, "IndexAndWriteNode", rb_cPrismNode); rb_cPrismIndexOperatorWriteNode = rb_define_class_under(rb_cPrism, "IndexOperatorWriteNode", rb_cPrismNode); rb_cPrismIndexOrWriteNode = rb_define_class_under(rb_cPrism, "IndexOrWriteNode", rb_cPrismNode); rb_cPrismIndexTargetNode = rb_define_class_under(rb_cPrism, "IndexTargetNode", rb_cPrismNode); rb_cPrismInstanceVariableAndWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableAndWriteNode", rb_cPrismNode); rb_cPrismInstanceVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOperatorWriteNode", rb_cPrismNode); rb_cPrismInstanceVariableOrWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOrWriteNode", rb_cPrismNode); rb_cPrismInstanceVariableReadNode = rb_define_class_under(rb_cPrism, "InstanceVariableReadNode", rb_cPrismNode); rb_cPrismInstanceVariableTargetNode = rb_define_class_under(rb_cPrism, "InstanceVariableTargetNode", rb_cPrismNode); rb_cPrismInstanceVariableWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableWriteNode", rb_cPrismNode); rb_cPrismIntegerNode = rb_define_class_under(rb_cPrism, "IntegerNode", rb_cPrismNode); rb_cPrismInterpolatedMatchLastLineNode = rb_define_class_under(rb_cPrism, "InterpolatedMatchLastLineNode", rb_cPrismNode); rb_cPrismInterpolatedRegularExpressionNode = rb_define_class_under(rb_cPrism, "InterpolatedRegularExpressionNode", rb_cPrismNode); rb_cPrismInterpolatedStringNode = rb_define_class_under(rb_cPrism, "InterpolatedStringNode", rb_cPrismNode); rb_cPrismInterpolatedSymbolNode = rb_define_class_under(rb_cPrism, "InterpolatedSymbolNode", rb_cPrismNode); rb_cPrismInterpolatedXStringNode = rb_define_class_under(rb_cPrism, "InterpolatedXStringNode", rb_cPrismNode); rb_cPrismItLocalVariableReadNode = rb_define_class_under(rb_cPrism, "ItLocalVariableReadNode", rb_cPrismNode); rb_cPrismItParametersNode = rb_define_class_under(rb_cPrism, "ItParametersNode", rb_cPrismNode); rb_cPrismKeywordHashNode = rb_define_class_under(rb_cPrism, "KeywordHashNode", rb_cPrismNode); rb_cPrismKeywordRestParameterNode = rb_define_class_under(rb_cPrism, "KeywordRestParameterNode", rb_cPrismNode); rb_cPrismLambdaNode = rb_define_class_under(rb_cPrism, "LambdaNode", rb_cPrismNode); rb_cPrismLocalVariableAndWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableAndWriteNode", rb_cPrismNode); rb_cPrismLocalVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableOperatorWriteNode", rb_cPrismNode); rb_cPrismLocalVariableOrWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableOrWriteNode", rb_cPrismNode); rb_cPrismLocalVariableReadNode = rb_define_class_under(rb_cPrism, "LocalVariableReadNode", rb_cPrismNode); rb_cPrismLocalVariableTargetNode = rb_define_class_under(rb_cPrism, "LocalVariableTargetNode", rb_cPrismNode); rb_cPrismLocalVariableWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableWriteNode", rb_cPrismNode); rb_cPrismMatchLastLineNode = rb_define_class_under(rb_cPrism, "MatchLastLineNode", rb_cPrismNode); rb_cPrismMatchPredicateNode = rb_define_class_under(rb_cPrism, "MatchPredicateNode", rb_cPrismNode); rb_cPrismMatchRequiredNode = rb_define_class_under(rb_cPrism, "MatchRequiredNode", rb_cPrismNode); rb_cPrismMatchWriteNode = rb_define_class_under(rb_cPrism, "MatchWriteNode", rb_cPrismNode); rb_cPrismMissingNode = rb_define_class_under(rb_cPrism, "MissingNode", rb_cPrismNode); rb_cPrismModuleNode = rb_define_class_under(rb_cPrism, "ModuleNode", rb_cPrismNode); rb_cPrismMultiTargetNode = rb_define_class_under(rb_cPrism, "MultiTargetNode", rb_cPrismNode); rb_cPrismMultiWriteNode = rb_define_class_under(rb_cPrism, "MultiWriteNode", rb_cPrismNode); rb_cPrismNextNode = rb_define_class_under(rb_cPrism, "NextNode", rb_cPrismNode); rb_cPrismNilNode = rb_define_class_under(rb_cPrism, "NilNode", rb_cPrismNode); rb_cPrismNoKeywordsParameterNode = rb_define_class_under(rb_cPrism, "NoKeywordsParameterNode", rb_cPrismNode); rb_cPrismNumberedParametersNode = rb_define_class_under(rb_cPrism, "NumberedParametersNode", rb_cPrismNode); rb_cPrismNumberedReferenceReadNode = rb_define_class_under(rb_cPrism, "NumberedReferenceReadNode", rb_cPrismNode); rb_cPrismOptionalKeywordParameterNode = rb_define_class_under(rb_cPrism, "OptionalKeywordParameterNode", rb_cPrismNode); rb_cPrismOptionalParameterNode = rb_define_class_under(rb_cPrism, "OptionalParameterNode", rb_cPrismNode); rb_cPrismOrNode = rb_define_class_under(rb_cPrism, "OrNode", rb_cPrismNode); rb_cPrismParametersNode = rb_define_class_under(rb_cPrism, "ParametersNode", rb_cPrismNode); rb_cPrismParenthesesNode = rb_define_class_under(rb_cPrism, "ParenthesesNode", rb_cPrismNode); rb_cPrismPinnedExpressionNode = rb_define_class_under(rb_cPrism, "PinnedExpressionNode", rb_cPrismNode); rb_cPrismPinnedVariableNode = rb_define_class_under(rb_cPrism, "PinnedVariableNode", rb_cPrismNode); rb_cPrismPostExecutionNode = rb_define_class_under(rb_cPrism, "PostExecutionNode", rb_cPrismNode); rb_cPrismPreExecutionNode = rb_define_class_under(rb_cPrism, "PreExecutionNode", rb_cPrismNode); rb_cPrismProgramNode = rb_define_class_under(rb_cPrism, "ProgramNode", rb_cPrismNode); rb_cPrismRangeNode = rb_define_class_under(rb_cPrism, "RangeNode", rb_cPrismNode); rb_cPrismRationalNode = rb_define_class_under(rb_cPrism, "RationalNode", rb_cPrismNode); rb_cPrismRedoNode = rb_define_class_under(rb_cPrism, "RedoNode", rb_cPrismNode); rb_cPrismRegularExpressionNode = rb_define_class_under(rb_cPrism, "RegularExpressionNode", rb_cPrismNode); rb_cPrismRequiredKeywordParameterNode = rb_define_class_under(rb_cPrism, "RequiredKeywordParameterNode", rb_cPrismNode); rb_cPrismRequiredParameterNode = rb_define_class_under(rb_cPrism, "RequiredParameterNode", rb_cPrismNode); rb_cPrismRescueModifierNode = rb_define_class_under(rb_cPrism, "RescueModifierNode", rb_cPrismNode); rb_cPrismRescueNode = rb_define_class_under(rb_cPrism, "RescueNode", rb_cPrismNode); rb_cPrismRestParameterNode = rb_define_class_under(rb_cPrism, "RestParameterNode", rb_cPrismNode); rb_cPrismRetryNode = rb_define_class_under(rb_cPrism, "RetryNode", rb_cPrismNode); rb_cPrismReturnNode = rb_define_class_under(rb_cPrism, "ReturnNode", rb_cPrismNode); rb_cPrismSelfNode = rb_define_class_under(rb_cPrism, "SelfNode", rb_cPrismNode); rb_cPrismShareableConstantNode = rb_define_class_under(rb_cPrism, "ShareableConstantNode", rb_cPrismNode); rb_cPrismSingletonClassNode = rb_define_class_under(rb_cPrism, "SingletonClassNode", rb_cPrismNode); rb_cPrismSourceEncodingNode = rb_define_class_under(rb_cPrism, "SourceEncodingNode", rb_cPrismNode); rb_cPrismSourceFileNode = rb_define_class_under(rb_cPrism, "SourceFileNode", rb_cPrismNode); rb_cPrismSourceLineNode = rb_define_class_under(rb_cPrism, "SourceLineNode", rb_cPrismNode); rb_cPrismSplatNode = rb_define_class_under(rb_cPrism, "SplatNode", rb_cPrismNode); rb_cPrismStatementsNode = rb_define_class_under(rb_cPrism, "StatementsNode", rb_cPrismNode); rb_cPrismStringNode = rb_define_class_under(rb_cPrism, "StringNode", rb_cPrismNode); rb_cPrismSuperNode = rb_define_class_under(rb_cPrism, "SuperNode", rb_cPrismNode); rb_cPrismSymbolNode = rb_define_class_under(rb_cPrism, "SymbolNode", rb_cPrismNode); rb_cPrismTrueNode = rb_define_class_under(rb_cPrism, "TrueNode", rb_cPrismNode); rb_cPrismUndefNode = rb_define_class_under(rb_cPrism, "UndefNode", rb_cPrismNode); rb_cPrismUnlessNode = rb_define_class_under(rb_cPrism, "UnlessNode", rb_cPrismNode); rb_cPrismUntilNode = rb_define_class_under(rb_cPrism, "UntilNode", rb_cPrismNode); rb_cPrismWhenNode = rb_define_class_under(rb_cPrism, "WhenNode", rb_cPrismNode); rb_cPrismWhileNode = rb_define_class_under(rb_cPrism, "WhileNode", rb_cPrismNode); rb_cPrismXStringNode = rb_define_class_under(rb_cPrism, "XStringNode", rb_cPrismNode); rb_cPrismYieldNode = rb_define_class_under(rb_cPrism, "YieldNode", rb_cPrismNode); }