Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 638d11d

Browse files
committed
Handle it local variable read
1 parent 79b23c0 commit 638d11d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/syntax_tree/prism.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def visit_block_node(node)
418418
if_break { visit_block_node_break(node, break_opening, break_closing) }.if_flat do
419419
text(flat_opening)
420420

421-
if parameters.is_a?(ParametersNode)
421+
if parameters.is_a?(BlockParametersNode)
422422
text(" ")
423423
visit(parameters)
424424
end
@@ -1947,6 +1947,12 @@ def visit_interpolated_x_string_node(node)
19471947
end
19481948
end
19491949

1950+
# it
1951+
# ^^
1952+
def visit_it_local_variable_read_node(node)
1953+
text("it")
1954+
end
1955+
19501956
# foo(bar: baz)
19511957
# ^^^^^^^^
19521958
def visit_keyword_hash_node(node)

0 commit comments

Comments
 (0)