Skip to content

Commit

Permalink
Add stubs for remaining ripper visit methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Mar 5, 2024
1 parent 7a277be commit 4ba9abf
Show file tree
Hide file tree
Showing 2 changed files with 1,049 additions and 272 deletions.
7 changes: 1 addition & 6 deletions lib/prism/translation/parser/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ def visit_if_node(node)
end

# 1i
# ^^
def visit_imaginary_node(node)
visit_numeric(node, builder.complex([imaginary_value(node), srange(node.location)]))
end
Expand Down Expand Up @@ -887,9 +888,6 @@ def visit_instance_variable_read_node(node)

# @foo = 1
# ^^^^^^^^
#
# @foo, @bar = 1
# ^^^^ ^^^^
def visit_instance_variable_write_node(node)
builder.assign(
builder.assignable(builder.ivar(token(node.name_loc))),
Expand Down Expand Up @@ -1033,9 +1031,6 @@ def visit_local_variable_read_node(node)

# foo = 1
# ^^^^^^^
#
# foo, bar = 1
# ^^^ ^^^
def visit_local_variable_write_node(node)
builder.assign(
builder.assignable(builder.ident(token(node.name_loc))),
Expand Down
Loading

0 comments on commit 4ba9abf

Please sign in to comment.