Skip to content
Snippets Groups Projects

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

Merged 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Very nice implementation that you have for arithmetic. Whenever you are ready, we can merge this work. I would like to eventually split the logic up in parser::statements into diverging nano-parsers. Current implementation is largely the work of duct-taping it repeatedly over time as issues are discovered.

  • Created by: huntergoldstein

    Ready to merge!

Please register or sign in to reply
Loading