snirk-lang / protosnirk

The beginnings of a programming language
MIT License
1 stars 1 forks source link

Use a fixed match statement to parse (closes #31) #103

Closed SnirkImmington closed 5 years ago

SnirkImmington commented 5 years ago

This PR rewrites most parsing in parse to use fixed match expressions. We further move precedence information, which was stored in the parsers themselves, into the Precedence enum (depending on prefix vs infix). The Precedence enum now represents the source of truth for symbol precedence.

This PR also completes support for unary+ ("The not necessary numberical no-op operator!") and tests and fixes support for unary-.