mbj/unparser

Invalid syntax emitted on until when condition has a block

mbj opened this issue · 0 comments

mbj commented
(string):4:1: error: unexpected token kEND
(string):4: end
(string):4: ^~~
Parsing of generated source failed:
Original-source:
foo until bar {}

Original-AST:
s(:until,
  s(:block,
    s(:send, nil, :bar),
    s(:args), nil),
  s(:send, nil, :foo))
Source:
until bar do
end
  foo
end
Error: (x.rb)

while will also be affected.