Crafting Interpreters in Rust: Parsing Unary-NOT

We’re implementing Lox’s primary rule. So far, we’ve done booleans, nil , numbers and strings. Let’s move on to some basic expressions. In this post, we’ll deal with unary-NOT — !x . In the book, Lox’s primary rule looks like this: primary → NUMBER | STRING | "true" | "false" | "nil" | "(" expression ")" ; We’ve already done numbers, strings, boleans and nil. Now we need to do expressions, which…