AnyDSL / impala

An imperative and functional programming language

Home Page:https://anydsl.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

match negative numbers

richardmembarth opened this issue · comments

Matching a negative number is currently not supported:

fn test(id: i32) -> i32 {
    match id {
        23 => 42,
        -1 => 47,
        _  => 11
    }
}
impala test.impala
test.impala:4 col 9: error: expected identifier, got '-' while parsing path
test.impala:4 col 9: error: expected '=>', got '-' while parsing pattern of match expression

Fixed in commit fbe615c.