class Prism::Compiler
编译器是一个访问者,它在访问每个节点时返回该节点的值。这与仅遍历树的访问者不同。当您尝试将树编译成不同的格式时,这可能很有用。
例如,要构建一个 s-表达式形式的树表示,您可以编写
class SExpressions < Prism::Compiler def visit_arguments_node(node) = [:arguments, super] def visit_call_node(node) = [:call, super] def visit_integer_node(node) = [:integer] def visit_program_node(node) = [:program, super] end Prism.parse("1 + 2").value.accept(SExpressions.new) # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]]
Public Instance Methods
Source
# File lib/prism/compiler.rb, line 32 def visit(node) node&.accept(self) end
访问单个节点。
Source
# File lib/prism/compiler.rb, line 47 def visit_alias_global_variable_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 AliasGlobalVariableNode 节点
Source
# File lib/prism/compiler.rb, line 52 def visit_alias_method_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 AliasMethodNode 节点
Source
# File lib/prism/compiler.rb, line 37 def visit_all(nodes) nodes.map { |node| node&.accept(self) } end
访问节点列表。
Source
# File lib/prism/compiler.rb, line 57 def visit_alternation_pattern_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 AlternationPatternNode 节点
Source
# File lib/prism/compiler.rb, line 62 def visit_and_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 AndNode 节点
Source
# File lib/prism/compiler.rb, line 67 def visit_arguments_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ArgumentsNode 节点
Source
# File lib/prism/compiler.rb, line 72 def visit_array_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ArrayNode 节点
Source
# File lib/prism/compiler.rb, line 77 def visit_array_pattern_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ArrayPatternNode 节点
Source
# File lib/prism/compiler.rb, line 82 def visit_assoc_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 AssocNode 节点
Source
# File lib/prism/compiler.rb, line 87 def visit_assoc_splat_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 AssocSplatNode 节点
Source
# File lib/prism/compiler.rb, line 92 def visit_back_reference_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BackReferenceReadNode 节点
Source
# File lib/prism/compiler.rb, line 97 def visit_begin_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BeginNode 节点
Source
# File lib/prism/compiler.rb, line 102 def visit_block_argument_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BlockArgumentNode 节点
Source
# File lib/prism/compiler.rb, line 107 def visit_block_local_variable_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BlockLocalVariableNode 节点
Source
# File lib/prism/compiler.rb, line 112 def visit_block_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BlockNode 节点
Source
# File lib/prism/compiler.rb, line 117 def visit_block_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BlockParameterNode 节点
Source
# File lib/prism/compiler.rb, line 122 def visit_block_parameters_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BlockParametersNode 节点
Source
# File lib/prism/compiler.rb, line 127 def visit_break_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 BreakNode 节点
Source
# File lib/prism/compiler.rb, line 132 def visit_call_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CallAndWriteNode 节点
Source
# File lib/prism/compiler.rb, line 137 def visit_call_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CallNode 节点
Source
# File lib/prism/compiler.rb, line 142 def visit_call_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CallOperatorWriteNode 节点
Source
# File lib/prism/compiler.rb, line 147 def visit_call_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CallOrWriteNode 节点
Source
# File lib/prism/compiler.rb, line 152 def visit_call_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CallTargetNode 节点
Source
# File lib/prism/compiler.rb, line 157 def visit_capture_pattern_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CapturePatternNode 节点
Source
# File lib/prism/compiler.rb, line 162 def visit_case_match_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CaseMatchNode 节点
Source
# File lib/prism/compiler.rb, line 167 def visit_case_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 CaseNode 节点
Source
# File lib/prism/compiler.rb, line 42 def visit_child_nodes(node) node.compact_child_nodes.map { |node| node.accept(self) } end
访问给定节点的子节点。
Source
# File lib/prism/compiler.rb, line 172 def visit_class_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ClassNode 节点
Source
# File lib/prism/compiler.rb, line 177 def visit_class_variable_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 182 def visit_class_variable_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 187 def visit_class_variable_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ClassVariableOrWriteNode 节点
Source
# File lib/prism/compiler.rb, line 192 def visit_class_variable_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ClassVariableReadNode 节点
Source
# File lib/prism/compiler.rb, line 197 def visit_class_variable_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ClassVariableTargetNode 节点
Source
# File lib/prism/compiler.rb, line 202 def visit_class_variable_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ClassVariableWriteNode 节点
Source
# File lib/prism/compiler.rb, line 207 def visit_constant_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantAndWriteNode 节点
Source
# File lib/prism/compiler.rb, line 212 def visit_constant_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 217 def visit_constant_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantOrWriteNode 节点
Source
# File lib/prism/compiler.rb, line 222 def visit_constant_path_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantPathAndWriteNode 节点
Source
# File lib/prism/compiler.rb, line 227 def visit_constant_path_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantPathNode 节点
Source
# File lib/prism/compiler.rb, line 232 def visit_constant_path_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 237 def visit_constant_path_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantPathOrWriteNode 节点
Source
# File lib/prism/compiler.rb, line 242 def visit_constant_path_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantPathTargetNode 节点
Source
# File lib/prism/compiler.rb, line 247 def visit_constant_path_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantPathWriteNode 节点
Source
# File lib/prism/compiler.rb, line 252 def visit_constant_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantReadNode 节点
Source
# File lib/prism/compiler.rb, line 257 def visit_constant_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantTargetNode 节点
Source
# File lib/prism/compiler.rb, line 262 def visit_constant_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ConstantWriteNode 节点
Source
# File lib/prism/compiler.rb, line 267 def visit_def_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 DefNode 节点
Source
# File lib/prism/compiler.rb, line 272 def visit_defined_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 DefinedNode 节点
Source
# File lib/prism/compiler.rb, line 277 def visit_else_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ElseNode 节点
Source
# File lib/prism/compiler.rb, line 282 def visit_embedded_statements_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 EmbeddedStatementsNode 节点
Source
# File lib/prism/compiler.rb, line 287 def visit_embedded_variable_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 EmbeddedVariableNode 节点
Source
# File lib/prism/compiler.rb, line 292 def visit_ensure_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 EnsureNode 节点
Source
# File lib/prism/compiler.rb, line 297 def visit_false_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 FalseNode 节点
Source
# File lib/prism/compiler.rb, line 302 def visit_find_pattern_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 FindPatternNode 节点
Source
# File lib/prism/compiler.rb, line 307 def visit_flip_flop_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 FlipFlopNode 节点
Source
# File lib/prism/compiler.rb, line 312 def visit_float_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 FloatNode 节点
Source
# File lib/prism/compiler.rb, line 317 def visit_for_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ForNode 节点
Source
# File lib/prism/compiler.rb, line 322 def visit_forwarding_arguments_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ForwardingArgumentsNode 节点
Source
# File lib/prism/compiler.rb, line 327 def visit_forwarding_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ForwardingParameterNode 节点
Source
# File lib/prism/compiler.rb, line 332 def visit_forwarding_super_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ForwardingSuperNode 节点
Source
# File lib/prism/compiler.rb, line 337 def visit_global_variable_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 342 def visit_global_variable_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 347 def visit_global_variable_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 352 def visit_global_variable_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 GlobalVariableReadNode 节点
Source
# File lib/prism/compiler.rb, line 357 def visit_global_variable_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 GlobalVariableTargetNode 节点
Source
# File lib/prism/compiler.rb, line 362 def visit_global_variable_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 GlobalVariableWriteNode 节点
Source
# File lib/prism/compiler.rb, line 367 def visit_hash_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 HashNode 节点
Source
# File lib/prism/compiler.rb, line 372 def visit_hash_pattern_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 HashPatternNode 节点
Source
# File lib/prism/compiler.rb, line 377 def visit_if_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 IfNode 节点
Source
# File lib/prism/compiler.rb, line 382 def visit_imaginary_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ImaginaryNode 节点
Source
# File lib/prism/compiler.rb, line 387 def visit_implicit_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ImplicitNode 节点
Source
# File lib/prism/compiler.rb, line 392 def visit_implicit_rest_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ImplicitRestNode 节点
Source
# File lib/prism/compiler.rb, line 397 def visit_in_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 InNode 节点
Source
# File lib/prism/compiler.rb, line 402 def visit_index_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 IndexAndWriteNode 节点
Source
# File lib/prism/compiler.rb, line 407 def visit_index_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 IndexOperatorWriteNode 节点
Source
# File lib/prism/compiler.rb, line 412 def visit_index_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 IndexOrWriteNode 节点
Source
# File lib/prism/compiler.rb, line 417 def visit_index_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 IndexTargetNode 节点
Source
# File lib/prism/compiler.rb, line 422 def visit_instance_variable_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 427 def visit_instance_variable_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 432 def visit_instance_variable_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 437 def visit_instance_variable_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 InstanceVariableReadNode 节点
Source
# File lib/prism/compiler.rb, line 442 def visit_instance_variable_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 447 def visit_instance_variable_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 452 def visit_integer_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 IntegerNode 节点
Source
# File lib/prism/compiler.rb, line 457 def visit_interpolated_match_last_line_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 462 def visit_interpolated_regular_expression_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 467 def visit_interpolated_string_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 InterpolatedStringNode 节点
Source
# File lib/prism/compiler.rb, line 472 def visit_interpolated_symbol_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 InterpolatedSymbolNode 节点
Source
# File lib/prism/compiler.rb, line 477 def visit_interpolated_x_string_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 InterpolatedXStringNode 节点
Source
# File lib/prism/compiler.rb, line 482 def visit_it_local_variable_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ItLocalVariableReadNode 节点
Source
# File lib/prism/compiler.rb, line 487 def visit_it_parameters_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ItParametersNode 节点
Source
# File lib/prism/compiler.rb, line 492 def visit_keyword_hash_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 KeywordHashNode 节点
Source
# File lib/prism/compiler.rb, line 497 def visit_keyword_rest_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 KeywordRestParameterNode 节点
Source
# File lib/prism/compiler.rb, line 502 def visit_lambda_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 LambdaNode 节点
Source
# File lib/prism/compiler.rb, line 507 def visit_local_variable_and_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 512 def visit_local_variable_operator_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 517 def visit_local_variable_or_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 LocalVariableOrWriteNode 节点
Source
# File lib/prism/compiler.rb, line 522 def visit_local_variable_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 LocalVariableReadNode 节点
Source
# File lib/prism/compiler.rb, line 527 def visit_local_variable_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 LocalVariableTargetNode 节点
Source
# File lib/prism/compiler.rb, line 532 def visit_local_variable_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 LocalVariableWriteNode 节点
Source
# File lib/prism/compiler.rb, line 537 def visit_match_last_line_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MatchLastLineNode 节点
Source
# File lib/prism/compiler.rb, line 542 def visit_match_predicate_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MatchPredicateNode 节点
Source
# File lib/prism/compiler.rb, line 547 def visit_match_required_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MatchRequiredNode 节点
Source
# File lib/prism/compiler.rb, line 552 def visit_match_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MatchWriteNode 节点
Source
# File lib/prism/compiler.rb, line 557 def visit_missing_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MissingNode 节点
Source
# File lib/prism/compiler.rb, line 562 def visit_module_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ModuleNode 节点
Source
# File lib/prism/compiler.rb, line 567 def visit_multi_target_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MultiTargetNode 节点
Source
# File lib/prism/compiler.rb, line 572 def visit_multi_write_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 MultiWriteNode 节点
Source
# File lib/prism/compiler.rb, line 577 def visit_next_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 NextNode 节点
Source
# File lib/prism/compiler.rb, line 582 def visit_nil_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 NilNode 节点
Source
# File lib/prism/compiler.rb, line 587 def visit_no_keywords_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 NoKeywordsParameterNode 节点
Source
# File lib/prism/compiler.rb, line 592 def visit_numbered_parameters_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 NumberedParametersNode 节点
Source
# File lib/prism/compiler.rb, line 597 def visit_numbered_reference_read_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 602 def visit_optional_keyword_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 607 def visit_optional_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 OptionalParameterNode 节点
Source
# File lib/prism/compiler.rb, line 612 def visit_or_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 OrNode 节点
Source
# File lib/prism/compiler.rb, line 617 def visit_parameters_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ParametersNode 节点
Source
# File lib/prism/compiler.rb, line 622 def visit_parentheses_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ParenthesesNode 节点
Source
# File lib/prism/compiler.rb, line 627 def visit_pinned_expression_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 PinnedExpressionNode 节点
Source
# File lib/prism/compiler.rb, line 632 def visit_pinned_variable_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 PinnedVariableNode 节点
Source
# File lib/prism/compiler.rb, line 637 def visit_post_execution_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 PostExecutionNode 节点
Source
# File lib/prism/compiler.rb, line 642 def visit_pre_execution_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 PreExecutionNode 节点
Source
# File lib/prism/compiler.rb, line 647 def visit_program_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ProgramNode 节点
Source
# File lib/prism/compiler.rb, line 652 def visit_range_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RangeNode 节点
Source
# File lib/prism/compiler.rb, line 657 def visit_rational_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RationalNode 节点
Source
# File lib/prism/compiler.rb, line 662 def visit_redo_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RedoNode 节点
Source
# File lib/prism/compiler.rb, line 667 def visit_regular_expression_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RegularExpressionNode 节点
Source
# File lib/prism/compiler.rb, line 672 def visit_required_keyword_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
Source
# File lib/prism/compiler.rb, line 677 def visit_required_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RequiredParameterNode 节点
Source
# File lib/prism/compiler.rb, line 682 def visit_rescue_modifier_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RescueModifierNode 节点
Source
# File lib/prism/compiler.rb, line 687 def visit_rescue_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RescueNode 节点
Source
# File lib/prism/compiler.rb, line 692 def visit_rest_parameter_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RestParameterNode 节点
Source
# File lib/prism/compiler.rb, line 697 def visit_retry_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 RetryNode 节点
Source
# File lib/prism/compiler.rb, line 702 def visit_return_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 ReturnNode 节点
Source
# File lib/prism/compiler.rb, line 707 def visit_self_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SelfNode 节点
Source
# File lib/prism/compiler.rb, line 717 def visit_singleton_class_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SingletonClassNode 节点
Source
# File lib/prism/compiler.rb, line 722 def visit_source_encoding_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SourceEncodingNode 节点
Source
# File lib/prism/compiler.rb, line 727 def visit_source_file_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SourceFileNode 节点
Source
# File lib/prism/compiler.rb, line 732 def visit_source_line_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SourceLineNode 节点
Source
# File lib/prism/compiler.rb, line 737 def visit_splat_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SplatNode 节点
Source
# File lib/prism/compiler.rb, line 742 def visit_statements_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 StatementsNode 节点
Source
# File lib/prism/compiler.rb, line 747 def visit_string_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 StringNode 节点
Source
# File lib/prism/compiler.rb, line 752 def visit_super_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SuperNode 节点
Source
# File lib/prism/compiler.rb, line 757 def visit_symbol_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 SymbolNode 节点
Source
# File lib/prism/compiler.rb, line 762 def visit_true_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 TrueNode 节点
Source
# File lib/prism/compiler.rb, line 767 def visit_undef_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 UndefNode 节点
Source
# File lib/prism/compiler.rb, line 772 def visit_unless_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 UnlessNode 节点
Source
# File lib/prism/compiler.rb, line 777 def visit_until_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 UntilNode 节点
Source
# File lib/prism/compiler.rb, line 782 def visit_when_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 WhenNode 节点
Source
# File lib/prism/compiler.rb, line 787 def visit_while_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 WhileNode 节点
Source
# File lib/prism/compiler.rb, line 792 def visit_x_string_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 XStringNode 节点
Source
# File lib/prism/compiler.rb, line 797 def visit_yield_node(node) node.compact_child_nodes.map { |node| node.accept(self) } end
编译 YieldNode 节点