nova-parser 0.3.1

The Nova language's parser (internal to the nova toolchain)
Documentation
1
2
3
4
5
6
7
8
9
10
11
type Result<T, E> =
  | Ok(T)
  | Err(E)

fn divide(a: Int, b: Int) -> Result<Int, String> {
    if b == 0 {
        Err("division by zero")
    } else {
        Ok(a / b)
    }
}