-
Notifications
You must be signed in to change notification settings - Fork 175
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Prism fails to parse this code
while a in b; end
until a in b; endRubyVM::AbstractSyntaxTree.parse('while a in b; end')
=>
(SCOPE@1:0-1:17
tbl: [:b]
args: nil
body: (WHILE@1:0-1:17 (CASE3@1:6-1:12 (VCALL@1:6-1:7 :a) (IN@1:11-1:12 (LASGN@1:11-1:12 :b nil) (TRUE@1:11-1:12) (FALSE@1:11-1:12))) (BEGIN@1:13-1:13 nil) true))
Prism.parse('while a in b; end').errors
=>
[#<Prism::ParseError @message="Expected a predicate expression for the `while` statement" @location=#<Prism::Location @start_offset=7 @length=0 start_line=1>>,
#<Prism::ParseError @message="Cannot parse the expression" @location=#<Prism::Location @start_offset=7 @length=0 start_line=1>>]if and unless are ok
if a in b; end
unless a in b; endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working