Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed Jul 1, 2024
1 parent fbd23f9 commit 9520524
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/ast_to_prism/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def convert_node(node, block: nil)
location(node) # location
)
when :IMAGINARY
# TODO: Original Node should have val as Node.
# TODO: Original Node should have val as Node because it needs to take care of flags.

val, = node.children
img = val.imaginary
Expand Down
13 changes: 9 additions & 4 deletions spec/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ def foo(a, b, opt1=1, opt2=2, *rest, y, z, kw: 1, **kwrest, &blk)

describe "return" do
it "tests" do
pending "Need to keep RETURN NODE"
pending "redundant flags and keyword_loc are not supported"

test_code(<<~CODE)
def m
Expand All @@ -896,6 +896,8 @@ def m
end

it "tests" do
pending "redundant flags and keyword_loc are not supported"

test_code(<<~CODE)
def m
return 1
Expand All @@ -904,6 +906,8 @@ def m
end

it "tests" do
pending "redundant flags and keyword_loc are not supported"

test_code(<<~CODE)
def m
return 1, 2
Expand All @@ -912,11 +916,12 @@ def m
end

it "tests" do
pending "keyword_loc is not supported"

test_code(<<~CODE)
def m
if a
en
return 1, 2
return 1, 2 if a
3
end
CODE
end
Expand Down

0 comments on commit 9520524

Please sign in to comment.