Commit Graph
13 Commits
Author SHA1 Message Date
ozzy dbc14d0403 feat(cli): create proper cli
made a proper cli using clap
2026-09-27 15:09:57 -05:00
ozzy fdf4464edb refactor(eval): rename math_constants to constants 2026-09-27 14:26:55 -05:00
ozzy 62070919eb feat(tests): add tests
added tests for the struct displays, eval function, lexer, and parser
2026-09-27 14:23:23 -05:00
ozzy d5397d1591 fix(parser): allow negative numbers
made adding a minus sign before a group/primary expression implicitly multiply by -1
2026-09-27 13:26:47 -05:00
ozzy bbc0ef6045 feat(eval): add functions and constants
added constants pi, e
added functions sin, cos, tan, asin, acos, atan, abs, and sqrt
fixed displaying decimals without normalizing them
todo: add imaginary number support
2026-09-26 15:31:33 -05:00
ozzy 234b2ef2dc feat(eval): add extremely basic evaluation
added a basic `eval_expr` function that evaluates an expression.
it still does not reduce/simplify anything, and it cannot evaluate to fractions yet
2026-09-26 14:51:33 -05:00
ozzy b68b1db2f6 fix(parser): fix for implicit multiplication
fixed implicit multiplication parsing going to `parse_primary` instead of `parse_additive`
2026-09-26 14:23:02 -05:00
ozzy 7eaf7c4097 feat(types): remove some redundant parenthesis 2026-09-26 14:19:01 -05:00
ozzy 1488a51081 fix(parser): fix many bugs in parser
fixed bugs relating to parsing order and unreliable token advancement for parenthesis
2026-09-25 21:20:08 -05:00
ozzy 64d6f8f095 feat(types): implement display
implement display on expression and operator so that math expressions can be turned back into strings that could theoretically be parsed again
2026-09-25 20:46:43 -05:00
ozzy 66da876e2a feat(parser): add parser
added a basic ast parser that is likely riddled with bugs
2026-09-25 20:29:43 -05:00
ozzy 26e85652af feat(lexer): add lexer
added basic lexer
2026-09-25 19:16:52 -05:00
ozzy acd053dfb5 initial commit
initialize cargo + just
2026-09-23 15:46:11 -05:00