class Prism::InspectVisitor
Dieser Visitor ist verantwortlich fΓΌr das Erstellen der Zeichenketten, die von den verschiedenen Inspect-Methoden auf jedem der Knoten zurΓΌckgegeben werden.
Attribute
Die Liste der Befehle, die wir ausfΓΌhren mΓΌssen, um die endgΓΌltige Zeichenkette zu erstellen.
Die aktuelle PrΓ€fix-Zeichenkette.
Γffentliche Klassenmethoden
Source
# File lib/prism/inspect_visitor.rb, line 44 def self.compose(node) visitor = new node.accept(visitor) visitor.compose end
Erstellt eine Inspect-Zeichenkette fΓΌr den gegebenen Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 38 def initialize(indent = +"") @indent = indent @commands = [] end
Initialisiert eine neue Instanz von InspectVisitor.
Γffentliche Instanzmethoden
Source
# File lib/prism/inspect_visitor.rb, line 51 def compose buffer = +"" replace = nil until commands.empty? # @type var command: String | node | Replace # @type var indent: String command, indent = *commands.shift case command when String buffer << (replace || indent) buffer << command replace = nil when Node visitor = InspectVisitor.new(indent) command.accept(visitor) @commands = [*visitor.commands, *@commands] when Replace replace = command.value else raise "Unknown command: #{command.inspect}" end end buffer end
Erstellt die endgΓΌltige Zeichenkette.
Source
# File lib/prism/inspect_visitor.rb, line 80 def visit_alias_global_variable_node(node) commands << [inspect_node("AliasGlobalVariableNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ new_name:\n", indent] commands << [node.new_name, "#{indent}β "] commands << ["βββ old_name:\n", indent] commands << [node.old_name, "#{indent}β "] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen AliasGlobalVariableNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 92 def visit_alias_method_node(node) commands << [inspect_node("AliasMethodNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ new_name:\n", indent] commands << [node.new_name, "#{indent}β "] commands << ["βββ old_name:\n", indent] commands << [node.old_name, "#{indent}β "] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen AliasMethodNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 104 def visit_alternation_pattern_node(node) commands << [inspect_node("AlternationPatternNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ left:\n", indent] commands << [node.left, "#{indent}β "] commands << ["βββ right:\n", indent] commands << [node.right, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen AlternationPatternNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 116 def visit_and_node(node) commands << [inspect_node("AndNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ left:\n", indent] commands << [node.left, "#{indent}β "] commands << ["βββ right:\n", indent] commands << [node.right, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen AndNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 128 def visit_arguments_node(node) commands << [inspect_node("ArgumentsNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("contains_forwarding" if node.contains_forwarding?), ("contains_keywords" if node.contains_keywords?), ("contains_keyword_splat" if node.contains_keyword_splat?), ("contains_splat" if node.contains_splat?), ("contains_multiple_splats" if node.contains_multiple_splats?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ arguments: (length: #{(arguments = node.arguments).length})\n", indent] if arguments.any? arguments[0...-1].each do |child| commands << [Replace.new("#{indent} βββ "), indent] commands << [child, "#{indent} β "] end commands << [Replace.new("#{indent} βββ "), indent] commands << [arguments[-1], "#{indent} "] end end
Inspiziert einen ArgumentsNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 144 def visit_array_node(node) commands << [inspect_node("ArrayNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("contains_splat" if node.contains_splat?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ elements: (length: #{(elements = node.elements).length})\n", indent] if elements.any? elements[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [elements[-1], "#{indent}β "] end commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen ArrayNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 162 def visit_array_pattern_node(node) commands << [inspect_node("ArrayPatternNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (constant = node.constant).nil? commands << ["βββ constant: β \n", indent] else commands << ["βββ constant:\n", indent] commands << [constant, "#{indent}β "] end commands << ["βββ requireds: (length: #{(requireds = node.requireds).length})\n", indent] if requireds.any? requireds[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [requireds[-1], "#{indent}β "] end if (rest = node.rest).nil? commands << ["βββ rest: β \n", indent] else commands << ["βββ rest:\n", indent] commands << [rest, "#{indent}β "] end commands << ["βββ posts: (length: #{(posts = node.posts).length})\n", indent] if posts.any? posts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [posts[-1], "#{indent}β "] end commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen ArrayPatternNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 201 def visit_assoc_node(node) commands << [inspect_node("AssocNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ key:\n", indent] commands << [node.key, "#{indent}β "] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen AssocNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 213 def visit_assoc_splat_node(node) commands << [inspect_node("AssocSplatNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (value = node.value).nil? commands << ["βββ value: β \n", indent] else commands << ["βββ value:\n", indent] commands << [value, "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen AssocSplatNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 227 def visit_back_reference_read_node(node) commands << [inspect_node("BackReferenceReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen BackReferenceReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 235 def visit_begin_node(node) commands << [inspect_node("BeginNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ begin_keyword_loc: #{inspect_location(node.begin_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end if (rescue_clause = node.rescue_clause).nil? commands << ["βββ rescue_clause: β \n", indent] else commands << ["βββ rescue_clause:\n", indent] commands << [rescue_clause, "#{indent}β "] end if (else_clause = node.else_clause).nil? commands << ["βββ else_clause: β \n", indent] else commands << ["βββ else_clause:\n", indent] commands << [else_clause, "#{indent}β "] end if (ensure_clause = node.ensure_clause).nil? commands << ["βββ ensure_clause: β \n", indent] else commands << ["βββ ensure_clause:\n", indent] commands << [ensure_clause, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen BeginNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 268 def visit_block_argument_node(node) commands << [inspect_node("BlockArgumentNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (expression = node.expression).nil? commands << ["βββ expression: β \n", indent] else commands << ["βββ expression:\n", indent] commands << [expression, "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen BlockArgumentNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 282 def visit_block_local_variable_node(node) commands << [inspect_node("BlockLocalVariableNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen BlockLocalVariableNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 290 def visit_block_node(node) commands << [inspect_node("BlockNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ locals: #{node.locals.inspect}\n", indent] if (parameters = node.parameters).nil? commands << ["βββ parameters: β \n", indent] else commands << ["βββ parameters:\n", indent] commands << [parameters, "#{indent}β "] end if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent}β "] end commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen BlockNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 312 def visit_block_parameter_node(node) commands << [inspect_node("BlockParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (name = node.name).nil? commands << ["βββ name: β \n", indent] else commands << ["βββ name: #{name.inspect}\n", indent] end commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen BlockParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 326 def visit_block_parameters_node(node) commands << [inspect_node("BlockParametersNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (parameters = node.parameters).nil? commands << ["βββ parameters: β \n", indent] else commands << ["βββ parameters:\n", indent] commands << [parameters, "#{indent}β "] end commands << ["βββ locals: (length: #{(locals = node.locals).length})\n", indent] if locals.any? locals[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [locals[-1], "#{indent}β "] end commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen BlockParametersNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 350 def visit_break_node(node) commands << [inspect_node("BreakNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen BreakNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 364 def visit_call_and_write_node(node) commands << [inspect_node("CallAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ message_loc: #{inspect_location(node.message_loc)}\n", indent] commands << ["βββ read_name: #{node.read_name.inspect}\n", indent] commands << ["βββ write_name: #{node.write_name.inspect}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen CallAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 384 def visit_call_node(node) commands << [inspect_node("CallNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ message_loc: #{inspect_location(node.message_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ equal_loc: #{inspect_location(node.equal_loc)}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent} "] end end
Inspiziert einen CallNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 415 def visit_call_operator_write_node(node) commands << [inspect_node("CallOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ message_loc: #{inspect_location(node.message_loc)}\n", indent] commands << ["βββ read_name: #{node.read_name.inspect}\n", indent] commands << ["βββ write_name: #{node.write_name.inspect}\n", indent] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen CallOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 436 def visit_call_or_write_node(node) commands << [inspect_node("CallOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ message_loc: #{inspect_location(node.message_loc)}\n", indent] commands << ["βββ read_name: #{node.read_name.inspect}\n", indent] commands << ["βββ write_name: #{node.write_name.inspect}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen CallOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 456 def visit_call_target_node(node) commands << [inspect_node("CallTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ receiver:\n", indent] commands << [node.receiver, "#{indent}β "] commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ message_loc: #{inspect_location(node.message_loc)}\n", indent] end
Inspiziert einen CallTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 468 def visit_capture_pattern_node(node) commands << [inspect_node("CapturePatternNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ target:\n", indent] commands << [node.target, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen CapturePatternNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 480 def visit_case_match_node(node) commands << [inspect_node("CaseMatchNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (predicate = node.predicate).nil? commands << ["βββ predicate: β \n", indent] else commands << ["βββ predicate:\n", indent] commands << [predicate, "#{indent}β "] end commands << ["βββ conditions: (length: #{(conditions = node.conditions).length})\n", indent] if conditions.any? conditions[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [conditions[-1], "#{indent}β "] end if (else_clause = node.else_clause).nil? commands << ["βββ else_clause: β \n", indent] else commands << ["βββ else_clause:\n", indent] commands << [else_clause, "#{indent}β "] end commands << ["βββ case_keyword_loc: #{inspect_location(node.case_keyword_loc)}\n", indent] commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen CaseMatchNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 510 def visit_case_node(node) commands << [inspect_node("CaseNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (predicate = node.predicate).nil? commands << ["βββ predicate: β \n", indent] else commands << ["βββ predicate:\n", indent] commands << [predicate, "#{indent}β "] end commands << ["βββ conditions: (length: #{(conditions = node.conditions).length})\n", indent] if conditions.any? conditions[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [conditions[-1], "#{indent}β "] end if (else_clause = node.else_clause).nil? commands << ["βββ else_clause: β \n", indent] else commands << ["βββ else_clause:\n", indent] commands << [else_clause, "#{indent}β "] end commands << ["βββ case_keyword_loc: #{inspect_location(node.case_keyword_loc)}\n", indent] commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen CaseNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 540 def visit_class_node(node) commands << [inspect_node("ClassNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ locals: #{node.locals.inspect}\n", indent] commands << ["βββ class_keyword_loc: #{inspect_location(node.class_keyword_loc)}\n", indent] commands << ["βββ constant_path:\n", indent] commands << [node.constant_path, "#{indent}β "] commands << ["βββ inheritance_operator_loc: #{inspect_location(node.inheritance_operator_loc)}\n", indent] if (superclass = node.superclass).nil? commands << ["βββ superclass: β \n", indent] else commands << ["βββ superclass:\n", indent] commands << [superclass, "#{indent}β "] end if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen ClassNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 566 def visit_class_variable_and_write_node(node) commands << [inspect_node("ClassVariableAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ClassVariableAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 578 def visit_class_variable_operator_write_node(node) commands << [inspect_node("ClassVariableOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] end
Inspiziert einen ClassVariableOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 591 def visit_class_variable_or_write_node(node) commands << [inspect_node("ClassVariableOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ClassVariableOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 603 def visit_class_variable_read_node(node) commands << [inspect_node("ClassVariableReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen ClassVariableReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 611 def visit_class_variable_target_node(node) commands << [inspect_node("ClassVariableTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen ClassVariableTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 619 def visit_class_variable_write_node(node) commands << [inspect_node("ClassVariableWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen ClassVariableWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 631 def visit_constant_and_write_node(node) commands << [inspect_node("ConstantAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ConstantAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 643 def visit_constant_operator_write_node(node) commands << [inspect_node("ConstantOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] end
Inspiziert einen ConstantOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 656 def visit_constant_or_write_node(node) commands << [inspect_node("ConstantOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ConstantOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 668 def visit_constant_path_and_write_node(node) commands << [inspect_node("ConstantPathAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ target:\n", indent] commands << [node.target, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ConstantPathAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 680 def visit_constant_path_node(node) commands << [inspect_node("ConstantPathNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (parent = node.parent).nil? commands << ["βββ parent: β \n", indent] else commands << ["βββ parent:\n", indent] commands << [parent, "#{indent}β "] end if (name = node.name).nil? commands << ["βββ name: β \n", indent] else commands << ["βββ name: #{name.inspect}\n", indent] end commands << ["βββ delimiter_loc: #{inspect_location(node.delimiter_loc)}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] end
Inspiziert einen ConstantPathNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 700 def visit_constant_path_operator_write_node(node) commands << [inspect_node("ConstantPathOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ target:\n", indent] commands << [node.target, "#{indent}β "] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] end
Inspiziert einen ConstantPathOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 713 def visit_constant_path_or_write_node(node) commands << [inspect_node("ConstantPathOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ target:\n", indent] commands << [node.target, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ConstantPathOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 725 def visit_constant_path_target_node(node) commands << [inspect_node("ConstantPathTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (parent = node.parent).nil? commands << ["βββ parent: β \n", indent] else commands << ["βββ parent:\n", indent] commands << [parent, "#{indent}β "] end if (name = node.name).nil? commands << ["βββ name: β \n", indent] else commands << ["βββ name: #{name.inspect}\n", indent] end commands << ["βββ delimiter_loc: #{inspect_location(node.delimiter_loc)}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] end
Inspiziert einen ConstantPathTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 745 def visit_constant_path_write_node(node) commands << [inspect_node("ConstantPathWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ target:\n", indent] commands << [node.target, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ConstantPathWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 757 def visit_constant_read_node(node) commands << [inspect_node("ConstantReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen ConstantReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 765 def visit_constant_target_node(node) commands << [inspect_node("ConstantTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen ConstantTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 773 def visit_constant_write_node(node) commands << [inspect_node("ConstantWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen ConstantWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 785 def visit_def_node(node) commands << [inspect_node("DefNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end if (parameters = node.parameters).nil? commands << ["βββ parameters: β \n", indent] else commands << ["βββ parameters:\n", indent] commands << [parameters, "#{indent}β "] end if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent}β "] end commands << ["βββ locals: #{node.locals.inspect}\n", indent] commands << ["βββ def_keyword_loc: #{inspect_location(node.def_keyword_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] commands << ["βββ equal_loc: #{inspect_location(node.equal_loc)}\n", indent] commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen DefNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 819 def visit_defined_node(node) commands << [inspect_node("DefinedNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen DefinedNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 831 def visit_else_node(node) commands << [inspect_node("ElseNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ else_keyword_loc: #{inspect_location(node.else_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen ElseNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 846 def visit_embedded_statements_node(node) commands << [inspect_node("EmbeddedStatementsNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen EmbeddedStatementsNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 861 def visit_embedded_variable_node(node) commands << [inspect_node("EmbeddedVariableNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ variable:\n", indent] commands << [node.variable, "#{indent} "] end
Inspiziert einen EmbeddedVariableNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 871 def visit_ensure_node(node) commands << [inspect_node("EnsureNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ ensure_keyword_loc: #{inspect_location(node.ensure_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen EnsureNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 886 def visit_false_node(node) commands << [inspect_node("FalseNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen FalseNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 893 def visit_find_pattern_node(node) commands << [inspect_node("FindPatternNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (constant = node.constant).nil? commands << ["βββ constant: β \n", indent] else commands << ["βββ constant:\n", indent] commands << [constant, "#{indent}β "] end commands << ["βββ left:\n", indent] commands << [node.left, "#{indent}β "] commands << ["βββ requireds: (length: #{(requireds = node.requireds).length})\n", indent] if requireds.any? requireds[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [requireds[-1], "#{indent}β "] end commands << ["βββ right:\n", indent] commands << [node.right, "#{indent}β "] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen FindPatternNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 921 def visit_flip_flop_node(node) commands << [inspect_node("FlipFlopNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("exclude_end" if node.exclude_end?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (left = node.left).nil? commands << ["βββ left: β \n", indent] else commands << ["βββ left:\n", indent] commands << [left, "#{indent}β "] end if (right = node.right).nil? commands << ["βββ right: β \n", indent] else commands << ["βββ right:\n", indent] commands << [right, "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen FlipFlopNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 941 def visit_float_node(node) commands << [inspect_node("FloatNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ value: #{node.value.inspect}\n", indent] end
Inspiziert einen FloatNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 949 def visit_for_node(node) commands << [inspect_node("ForNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ index:\n", indent] commands << [node.index, "#{indent}β "] commands << ["βββ collection:\n", indent] commands << [node.collection, "#{indent}β "] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ for_keyword_loc: #{inspect_location(node.for_keyword_loc)}\n", indent] commands << ["βββ in_keyword_loc: #{inspect_location(node.in_keyword_loc)}\n", indent] commands << ["βββ do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent] commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen ForNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 970 def visit_forwarding_arguments_node(node) commands << [inspect_node("ForwardingArgumentsNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen ForwardingArgumentsNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 977 def visit_forwarding_parameter_node(node) commands << [inspect_node("ForwardingParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen ForwardingParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 984 def visit_forwarding_super_node(node) commands << [inspect_node("ForwardingSuperNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent} "] end end
Inspiziert einen ForwardingSuperNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 997 def visit_global_variable_and_write_node(node) commands << [inspect_node("GlobalVariableAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen GlobalVariableAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1009 def visit_global_variable_operator_write_node(node) commands << [inspect_node("GlobalVariableOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] end
Inspiziert einen GlobalVariableOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1022 def visit_global_variable_or_write_node(node) commands << [inspect_node("GlobalVariableOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen GlobalVariableOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1034 def visit_global_variable_read_node(node) commands << [inspect_node("GlobalVariableReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen GlobalVariableReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1042 def visit_global_variable_target_node(node) commands << [inspect_node("GlobalVariableTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen GlobalVariableTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1050 def visit_global_variable_write_node(node) commands << [inspect_node("GlobalVariableWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen GlobalVariableWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1062 def visit_hash_node(node) commands << [inspect_node("HashNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ elements: (length: #{(elements = node.elements).length})\n", indent] if elements.any? elements[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [elements[-1], "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen HashNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1080 def visit_hash_pattern_node(node) commands << [inspect_node("HashPatternNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (constant = node.constant).nil? commands << ["βββ constant: β \n", indent] else commands << ["βββ constant:\n", indent] commands << [constant, "#{indent}β "] end commands << ["βββ elements: (length: #{(elements = node.elements).length})\n", indent] if elements.any? elements[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [elements[-1], "#{indent}β "] end if (rest = node.rest).nil? commands << ["βββ rest: β \n", indent] else commands << ["βββ rest:\n", indent] commands << [rest, "#{indent}β "] end commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen HashPatternNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1110 def visit_if_node(node) commands << [inspect_node("IfNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ if_keyword_loc: #{inspect_location(node.if_keyword_loc)}\n", indent] commands << ["βββ predicate:\n", indent] commands << [node.predicate, "#{indent}β "] commands << ["βββ then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end if (subsequent = node.subsequent).nil? commands << ["βββ subsequent: β \n", indent] else commands << ["βββ subsequent:\n", indent] commands << [subsequent, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen IfNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1134 def visit_imaginary_node(node) commands << [inspect_node("ImaginaryNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ numeric:\n", indent] commands << [node.numeric, "#{indent} "] end
Inspiziert einen ImaginaryNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1143 def visit_implicit_node(node) commands << [inspect_node("ImplicitNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen ImplicitNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1152 def visit_implicit_rest_node(node) commands << [inspect_node("ImplicitRestNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen ImplicitRestNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1159 def visit_in_node(node) commands << [inspect_node("InNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ pattern:\n", indent] commands << [node.pattern, "#{indent}β "] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ in_loc: #{inspect_location(node.in_loc)}\n", indent] commands << ["βββ then_loc: #{inspect_location(node.then_loc)}\n", indent] end
Inspiziert einen InNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1176 def visit_index_and_write_node(node) commands << [inspect_node("IndexAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen IndexAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1207 def visit_index_operator_write_node(node) commands << [inspect_node("IndexOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent}β "] end commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen IndexOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1239 def visit_index_or_write_node(node) commands << [inspect_node("IndexOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (receiver = node.receiver).nil? commands << ["βββ receiver: β \n", indent] else commands << ["βββ receiver:\n", indent] commands << [receiver, "#{indent}β "] end commands << ["βββ call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen IndexOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1270 def visit_index_target_node(node) commands << [inspect_node("IndexTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ receiver:\n", indent] commands << [node.receiver, "#{indent}β "] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent} "] end end
Inspiziert einen IndexTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1293 def visit_instance_variable_and_write_node(node) commands << [inspect_node("InstanceVariableAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen InstanceVariableAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1305 def visit_instance_variable_operator_write_node(node) commands << [inspect_node("InstanceVariableOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] end
Inspiziert einen InstanceVariableOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1318 def visit_instance_variable_or_write_node(node) commands << [inspect_node("InstanceVariableOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen InstanceVariableOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1330 def visit_instance_variable_read_node(node) commands << [inspect_node("InstanceVariableReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen InstanceVariableReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1338 def visit_instance_variable_target_node(node) commands << [inspect_node("InstanceVariableTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen InstanceVariableTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1346 def visit_instance_variable_write_node(node) commands << [inspect_node("InstanceVariableWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen InstanceVariableWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1358 def visit_integer_node(node) commands << [inspect_node("IntegerNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("binary" if node.binary?), ("decimal" if node.decimal?), ("octal" if node.octal?), ("hexadecimal" if node.hexadecimal?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ value: #{node.value.inspect}\n", indent] end
Inspiziert einen IntegerNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1366 def visit_interpolated_match_last_line_node(node) commands << [inspect_node("InterpolatedMatchLastLineNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ parts: (length: #{(parts = node.parts).length})\n", indent] if parts.any? parts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [parts[-1], "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen InterpolatedMatchLastLineNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1384 def visit_interpolated_regular_expression_node(node) commands << [inspect_node("InterpolatedRegularExpressionNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ parts: (length: #{(parts = node.parts).length})\n", indent] if parts.any? parts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [parts[-1], "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen InterpolatedRegularExpressionNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1402 def visit_interpolated_string_node(node) commands << [inspect_node("InterpolatedStringNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ parts: (length: #{(parts = node.parts).length})\n", indent] if parts.any? parts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [parts[-1], "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen InterpolatedStringNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1420 def visit_interpolated_symbol_node(node) commands << [inspect_node("InterpolatedSymbolNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ parts: (length: #{(parts = node.parts).length})\n", indent] if parts.any? parts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [parts[-1], "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen InterpolatedSymbolNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1438 def visit_interpolated_x_string_node(node) commands << [inspect_node("InterpolatedXStringNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ parts: (length: #{(parts = node.parts).length})\n", indent] if parts.any? parts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [parts[-1], "#{indent}β "] end commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen InterpolatedXStringNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1456 def visit_it_local_variable_read_node(node) commands << [inspect_node("ItLocalVariableReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen ItLocalVariableReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1463 def visit_it_parameters_node(node) commands << [inspect_node("ItParametersNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen ItParametersNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1470 def visit_keyword_hash_node(node) commands << [inspect_node("KeywordHashNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("symbol_keys" if node.symbol_keys?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ elements: (length: #{(elements = node.elements).length})\n", indent] if elements.any? elements[0...-1].each do |child| commands << [Replace.new("#{indent} βββ "), indent] commands << [child, "#{indent} β "] end commands << [Replace.new("#{indent} βββ "), indent] commands << [elements[-1], "#{indent} "] end end
Inspiziert einen KeywordHashNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1486 def visit_keyword_rest_parameter_node(node) commands << [inspect_node("KeywordRestParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (name = node.name).nil? commands << ["βββ name: β \n", indent] else commands << ["βββ name: #{name.inspect}\n", indent] end commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen KeywordRestParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1500 def visit_lambda_node(node) commands << [inspect_node("LambdaNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ locals: #{node.locals.inspect}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] if (parameters = node.parameters).nil? commands << ["βββ parameters: β \n", indent] else commands << ["βββ parameters:\n", indent] commands << [parameters, "#{indent}β "] end if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent} "] end end
Inspiziert einen LambdaNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1523 def visit_local_variable_and_write_node(node) commands << [inspect_node("LocalVariableAndWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ depth: #{node.depth.inspect}\n", indent] end
Inspiziert einen LocalVariableAndWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1536 def visit_local_variable_operator_write_node(node) commands << [inspect_node("LocalVariableOperatorWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ binary_operator: #{node.binary_operator.inspect}\n", indent] commands << ["βββ depth: #{node.depth.inspect}\n", indent] end
Inspiziert einen LocalVariableOperatorWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1550 def visit_local_variable_or_write_node(node) commands << [inspect_node("LocalVariableOrWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ depth: #{node.depth.inspect}\n", indent] end
Inspiziert einen LocalVariableOrWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1563 def visit_local_variable_read_node(node) commands << [inspect_node("LocalVariableReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ depth: #{node.depth.inspect}\n", indent] end
Inspiziert einen LocalVariableReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1572 def visit_local_variable_target_node(node) commands << [inspect_node("LocalVariableTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ depth: #{node.depth.inspect}\n", indent] end
Inspiziert einen LocalVariableTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1581 def visit_local_variable_write_node(node) commands << [inspect_node("LocalVariableWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ depth: #{node.depth.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen LocalVariableWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1594 def visit_match_last_line_node(node) commands << [inspect_node("MatchLastLineNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ content_loc: #{inspect_location(node.content_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ unescaped: #{node.unescaped.inspect}\n", indent] end
Inspiziert einen MatchLastLineNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1605 def visit_match_predicate_node(node) commands << [inspect_node("MatchPredicateNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ pattern:\n", indent] commands << [node.pattern, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen MatchPredicateNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1617 def visit_match_required_node(node) commands << [inspect_node("MatchRequiredNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent}β "] commands << ["βββ pattern:\n", indent] commands << [node.pattern, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen MatchRequiredNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1629 def visit_match_write_node(node) commands << [inspect_node("MatchWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ call:\n", indent] commands << [node.call, "#{indent}β "] commands << ["βββ targets: (length: #{(targets = node.targets).length})\n", indent] if targets.any? targets[0...-1].each do |child| commands << [Replace.new("#{indent} βββ "), indent] commands << [child, "#{indent} β "] end commands << [Replace.new("#{indent} βββ "), indent] commands << [targets[-1], "#{indent} "] end end
Inspiziert einen MatchWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1647 def visit_missing_node(node) commands << [inspect_node("MissingNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen MissingNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1654 def visit_module_node(node) commands << [inspect_node("ModuleNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ locals: #{node.locals.inspect}\n", indent] commands << ["βββ module_keyword_loc: #{inspect_location(node.module_keyword_loc)}\n", indent] commands << ["βββ constant_path:\n", indent] commands << [node.constant_path, "#{indent}β "] if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen ModuleNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1673 def visit_multi_target_node(node) commands << [inspect_node("MultiTargetNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ lefts: (length: #{(lefts = node.lefts).length})\n", indent] if lefts.any? lefts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [lefts[-1], "#{indent}β "] end if (rest = node.rest).nil? commands << ["βββ rest: β \n", indent] else commands << ["βββ rest:\n", indent] commands << [rest, "#{indent}β "] end commands << ["βββ rights: (length: #{(rights = node.rights).length})\n", indent] if rights.any? rights[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [rights[-1], "#{indent}β "] end commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] end
Inspiziert einen MultiTargetNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1706 def visit_multi_write_node(node) commands << [inspect_node("MultiWriteNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ lefts: (length: #{(lefts = node.lefts).length})\n", indent] if lefts.any? lefts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [lefts[-1], "#{indent}β "] end if (rest = node.rest).nil? commands << ["βββ rest: β \n", indent] else commands << ["βββ rest:\n", indent] commands << [rest, "#{indent}β "] end commands << ["βββ rights: (length: #{(rights = node.rights).length})\n", indent] if rights.any? rights[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [rights[-1], "#{indent}β "] end commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen MultiWriteNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1742 def visit_next_node(node) commands << [inspect_node("NextNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen NextNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1756 def visit_nil_node(node) commands << [inspect_node("NilNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen NilNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1763 def visit_no_keywords_parameter_node(node) commands << [inspect_node("NoKeywordsParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen NoKeywordsParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1772 def visit_numbered_parameters_node(node) commands << [inspect_node("NumberedParametersNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ maximum: #{node.maximum.inspect}\n", indent] end
Inspiziert einen NumberedParametersNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1780 def visit_numbered_reference_read_node(node) commands << [inspect_node("NumberedReferenceReadNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ number: #{node.number.inspect}\n", indent] end
Inspiziert einen NumberedReferenceReadNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1788 def visit_optional_keyword_parameter_node(node) commands << [inspect_node("OptionalKeywordParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen OptionalKeywordParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1799 def visit_optional_parameter_node(node) commands << [inspect_node("OptionalParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ value:\n", indent] commands << [node.value, "#{indent} "] end
Inspiziert einen OptionalParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1811 def visit_or_node(node) commands << [inspect_node("OrNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ left:\n", indent] commands << [node.left, "#{indent}β "] commands << ["βββ right:\n", indent] commands << [node.right, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen OrNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1823 def visit_parameters_node(node) commands << [inspect_node("ParametersNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ requireds: (length: #{(requireds = node.requireds).length})\n", indent] if requireds.any? requireds[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [requireds[-1], "#{indent}β "] end commands << ["βββ optionals: (length: #{(optionals = node.optionals).length})\n", indent] if optionals.any? optionals[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [optionals[-1], "#{indent}β "] end if (rest = node.rest).nil? commands << ["βββ rest: β \n", indent] else commands << ["βββ rest:\n", indent] commands << [rest, "#{indent}β "] end commands << ["βββ posts: (length: #{(posts = node.posts).length})\n", indent] if posts.any? posts[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [posts[-1], "#{indent}β "] end commands << ["βββ keywords: (length: #{(keywords = node.keywords).length})\n", indent] if keywords.any? keywords[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [keywords[-1], "#{indent}β "] end if (keyword_rest = node.keyword_rest).nil? commands << ["βββ keyword_rest: β \n", indent] else commands << ["βββ keyword_rest:\n", indent] commands << [keyword_rest, "#{indent}β "] end if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent} "] end end
Inspiziert einen ParametersNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1884 def visit_parentheses_node(node) commands << [inspect_node("ParenthesesNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("multiple_statements" if node.multiple_statements?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent}β "] end commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen ParenthesesNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1899 def visit_pinned_expression_node(node) commands << [inspect_node("PinnedExpressionNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ expression:\n", indent] commands << [node.expression, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] end
Inspiziert einen PinnedExpressionNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1911 def visit_pinned_variable_node(node) commands << [inspect_node("PinnedVariableNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ variable:\n", indent] commands << [node.variable, "#{indent}β "] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen PinnedVariableNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1921 def visit_post_execution_node(node) commands << [inspect_node("PostExecutionNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen PostExecutionNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1937 def visit_pre_execution_node(node) commands << [inspect_node("PreExecutionNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] end
Inspiziert einen PreExecutionNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1953 def visit_program_node(node) commands << [inspect_node("ProgramNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ locals: #{node.locals.inspect}\n", indent] commands << ["βββ statements:\n", indent] commands << [node.statements, "#{indent} "] end
Inspiziert einen ProgramNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1963 def visit_range_node(node) commands << [inspect_node("RangeNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("exclude_end" if node.exclude_end?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (left = node.left).nil? commands << ["βββ left: β \n", indent] else commands << ["βββ left:\n", indent] commands << [left, "#{indent}β "] end if (right = node.right).nil? commands << ["βββ right: β \n", indent] else commands << ["βββ right:\n", indent] commands << [right, "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen RangeNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1983 def visit_rational_node(node) commands << [inspect_node("RationalNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("binary" if node.binary?), ("decimal" if node.decimal?), ("octal" if node.octal?), ("hexadecimal" if node.hexadecimal?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ numerator: #{node.numerator.inspect}\n", indent] commands << ["βββ denominator: #{node.denominator.inspect}\n", indent] end
Inspiziert einen RationalNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1992 def visit_redo_node(node) commands << [inspect_node("RedoNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen RedoNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 1999 def visit_regular_expression_node(node) commands << [inspect_node("RegularExpressionNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ content_loc: #{inspect_location(node.content_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ unescaped: #{node.unescaped.inspect}\n", indent] end
Inspiziert einen RegularExpressionNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2010 def visit_required_keyword_parameter_node(node) commands << [inspect_node("RequiredKeywordParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] end
Inspiziert einen RequiredKeywordParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2019 def visit_required_parameter_node(node) commands << [inspect_node("RequiredParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ name: #{node.name.inspect}\n", indent] end
Inspiziert einen RequiredParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2027 def visit_rescue_modifier_node(node) commands << [inspect_node("RescueModifierNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ expression:\n", indent] commands << [node.expression, "#{indent}β "] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ rescue_expression:\n", indent] commands << [node.rescue_expression, "#{indent} "] end
Inspiziert einen RescueModifierNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2039 def visit_rescue_node(node) commands << [inspect_node("RescueNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ exceptions: (length: #{(exceptions = node.exceptions).length})\n", indent] if exceptions.any? exceptions[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [exceptions[-1], "#{indent}β "] end commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] if (reference = node.reference).nil? commands << ["βββ reference: β \n", indent] else commands << ["βββ reference:\n", indent] commands << [reference, "#{indent}β "] end commands << ["βββ then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end if (subsequent = node.subsequent).nil? commands << ["βββ subsequent: β \n", indent] else commands << ["βββ subsequent:\n", indent] commands << [subsequent, "#{indent} "] end end
Inspiziert einen RescueNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2076 def visit_rest_parameter_node(node) commands << [inspect_node("RestParameterNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] if (name = node.name).nil? commands << ["βββ name: β \n", indent] else commands << ["βββ name: #{name.inspect}\n", indent] end commands << ["βββ name_loc: #{inspect_location(node.name_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] end
Inspiziert einen RestParameterNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2090 def visit_retry_node(node) commands << [inspect_node("RetryNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen RetryNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2097 def visit_return_node(node) commands << [inspect_node("ReturnNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent} "] end end
Inspiziert einen ReturnNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2111 def visit_self_node(node) commands << [inspect_node("SelfNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen SelfNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2127 def visit_singleton_class_node(node) commands << [inspect_node("SingletonClassNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ locals: #{node.locals.inspect}\n", indent] commands << ["βββ class_keyword_loc: #{inspect_location(node.class_keyword_loc)}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] commands << ["βββ expression:\n", indent] commands << [node.expression, "#{indent}β "] if (body = node.body).nil? commands << ["βββ body: β \n", indent] else commands << ["βββ body:\n", indent] commands << [body, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen SingletonClassNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2146 def visit_source_encoding_node(node) commands << [inspect_node("SourceEncodingNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen SourceEncodingNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2153 def visit_source_file_node(node) commands << [inspect_node("SourceFileNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ filepath: #{node.filepath.inspect}\n", indent] end
Inspiziert einen SourceFileNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2161 def visit_source_line_node(node) commands << [inspect_node("SourceLineNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen SourceLineNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2168 def visit_splat_node(node) commands << [inspect_node("SplatNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ operator_loc: #{inspect_location(node.operator_loc)}\n", indent] if (expression = node.expression).nil? commands << ["βββ expression: β \n", indent] else commands << ["βββ expression:\n", indent] commands << [expression, "#{indent} "] end end
Inspiziert einen SplatNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2182 def visit_statements_node(node) commands << [inspect_node("StatementsNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ body: (length: #{(body = node.body).length})\n", indent] if body.any? body[0...-1].each do |child| commands << [Replace.new("#{indent} βββ "), indent] commands << [child, "#{indent} β "] end commands << [Replace.new("#{indent} βββ "), indent] commands << [body[-1], "#{indent} "] end end
Inspiziert einen StatementsNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2198 def visit_string_node(node) commands << [inspect_node("StringNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ content_loc: #{inspect_location(node.content_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ unescaped: #{node.unescaped.inspect}\n", indent] end
Inspiziert einen StringNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2209 def visit_super_node(node) commands << [inspect_node("SuperNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] if (block = node.block).nil? commands << ["βββ block: β \n", indent] else commands << ["βββ block:\n", indent] commands << [block, "#{indent} "] end end
Inspiziert einen SuperNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2231 def visit_symbol_node(node) commands << [inspect_node("SymbolNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ value_loc: #{inspect_location(node.value_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ unescaped: #{node.unescaped.inspect}\n", indent] end
Inspiziert einen SymbolNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2242 def visit_true_node(node) commands << [inspect_node("TrueNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] end
Inspiziert einen TrueNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2249 def visit_undef_node(node) commands << [inspect_node("UndefNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ names: (length: #{(names = node.names).length})\n", indent] if names.any? names[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [names[-1], "#{indent}β "] end commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] end
Inspiziert einen UndefNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2266 def visit_unless_node(node) commands << [inspect_node("UnlessNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ predicate:\n", indent] commands << [node.predicate, "#{indent}β "] commands << ["βββ then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent}β "] end if (else_clause = node.else_clause).nil? commands << ["βββ else_clause: β \n", indent] else commands << ["βββ else_clause:\n", indent] commands << [else_clause, "#{indent}β "] end commands << ["βββ end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent] end
Inspiziert einen UnlessNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2290 def visit_until_node(node) commands << [inspect_node("UntilNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("begin_modifier" if node.begin_modifier?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ predicate:\n", indent] commands << [node.predicate, "#{indent}β "] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent} "] end end
Inspiziert einen UntilNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2308 def visit_when_node(node) commands << [inspect_node("WhenNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ conditions: (length: #{(conditions = node.conditions).length})\n", indent] if conditions.any? conditions[0...-1].each do |child| commands << [Replace.new("#{indent}β βββ "), indent] commands << [child, "#{indent}β β "] end commands << [Replace.new("#{indent}β βββ "), indent] commands << [conditions[-1], "#{indent}β "] end commands << ["βββ then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent} "] end end
Inspiziert einen WhenNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2332 def visit_while_node(node) commands << [inspect_node("WhileNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("begin_modifier" if node.begin_modifier?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ predicate:\n", indent] commands << [node.predicate, "#{indent}β "] if (statements = node.statements).nil? commands << ["βββ statements: β \n", indent] else commands << ["βββ statements:\n", indent] commands << [statements, "#{indent} "] end end
Inspiziert einen WhileNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2350 def visit_x_string_node(node) commands << [inspect_node("XStringNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?)].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ opening_loc: #{inspect_location(node.opening_loc)}\n", indent] commands << ["βββ content_loc: #{inspect_location(node.content_loc)}\n", indent] commands << ["βββ closing_loc: #{inspect_location(node.closing_loc)}\n", indent] commands << ["βββ unescaped: #{node.unescaped.inspect}\n", indent] end
Inspiziert einen XStringNode-Knoten.
Source
# File lib/prism/inspect_visitor.rb, line 2361 def visit_yield_node(node) commands << [inspect_node("YieldNode", node), indent] flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact commands << ["βββ flags: #{flags.empty? ? "β " : flags.join(", ")}\n", indent] commands << ["βββ keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent] commands << ["βββ lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent] if (arguments = node.arguments).nil? commands << ["βββ arguments: β \n", indent] else commands << ["βββ arguments:\n", indent] commands << [arguments, "#{indent}β "] end commands << ["βββ rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent] end
Inspiziert einen YieldNode-Knoten.
Private Instanzmethoden
Source
# File lib/prism/inspect_visitor.rb, line 2385 def inspect_location(location) if location "(#{location.start_line},#{location.start_column})-(#{location.end_line},#{location.end_column}) = #{location.slice.inspect}" else "β " end end
Erstellt eine Zeichenkette, die das gegebene interne Standortfeld darstellt.
Source
# File lib/prism/inspect_visitor.rb, line 2379 def inspect_node(name, node) location = node.location "@ #{name} (location: (#{location.start_line},#{location.start_column})-(#{location.end_line},#{location.end_column}))\n" end
Erstellt eine Kopfzeile fΓΌr den gegebenen Knoten.