[WIP] Add arithmetic sub-expressions to Ion's syntax
Created by: huntergoldstein
Fixes: Closes #243 (closed)
Changes introduced by this pull request:
- Builtin
calc
functionality is now exposed to the rest of the crate - Added support for the
$((...))
syntax form which is equivalent tocalc '...'
with some syntactic sugar for referring to variables
Drawbacks:
- The
calc
builtin is now tightly coupled to the rest of the crate: I don't feel this is desirable
TODOs:
-
Add tests for parsing at statement
andword
level -
Revise flags and logic in parser::statements
; this could be cleaner IMO
State: Core functionality should be there, needs some polish