Skip to content

[WIP] Add arithmetic sub-expressions to Ion's syntax

Michael Aaron Murphy requested to merge huntergoldstein:arithmetic_exprs into master

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 to calc '...' 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 and word level
  • Revise flags and logic in parser::statements; this could be cleaner IMO

State: Core functionality should be there, needs some polish

Merge request reports