jakt icon indicating copy to clipboard operation
jakt copied to clipboard

Parser infinite loop when parsing unsupported match body expression that is surrounded by brackets

Open Lubrsi opened this issue 2 years ago • 1 comments

This causes the parser to go into an infinite loop:

function main() {
    match foo {
        (++foo) => 1
    }
}

Removing the () around ++foo makes it error:

-----
function main() {
    match foo {
        ++foo => 1
    }
}
 
-----
Error: ParserError("expected '=>' after pattern case", Span { file_id: 1, start: 42, end: 44 })

Lubrsi avatar May 22 '22 16:05 Lubrsi

Looking into this.

holychowders avatar May 25 '22 05:05 holychowders

fixed as of 9012330

lanmonster avatar Aug 25 '22 02:08 lanmonster