231 Commits

Author SHA1 Message Date
Kasper
a0014f9afc Added area, volume, mass units 2020-01-08 19:33:51 +01:00
Kasper
6ac025850d Added implicative multiplication, like 2pi 2020-01-06 18:50:33 +01:00
Kasper
73823cbbce Lowered precedence of unary minus operator (-10% now works)
Previously the unary minus operator would have higher precedence than ! and %, meaning -10% and -10! would not work
2020-01-05 18:14:28 +01:00
Kasper
1e00714cf0 Sped up sin/cos/tan by calculating factorials using match statement 2019-12-28 06:34:53 +01:00
Kasper
26992c9e32 Evaluation of sin, cos, tan 2019-12-28 06:31:50 +01:00
Kasper
1e541b8313 Fixed evaluation of exponents 2019-12-28 01:59:29 +01:00
Kasper
a0b7a7cdf5 Performance improved for sqrt, cbrt, factorial 2019-12-28 00:37:40 +01:00
Kasper
de99482c98 Evaluation of sqrt, cbrt 2019-12-26 04:25:03 +01:00
Kasper
ce74ce83a0 Evaluation of round, ceil, floor, abs 2019-12-25 23:58:50 +01:00
Kasper
ec5b3371fc Evaluation of negative numbers 2019-12-25 23:56:43 +01:00
Kasper
f38e63c5a7 Evaluation of log, ln, exp 2019-12-25 23:29:53 +01:00
Kasper
77e359e182 Evaluation of pi, e 2019-12-25 23:20:31 +01:00
Kasper
c0277f610b Evaluation of "to" and "of" 2019-12-23 05:11:10 +01:00
Kasper
5286bec0dd Evaluation of multiply, divide, modulo, caret, percent, factorial 2019-12-23 01:24:15 +01:00
Kasper
8fcd76a098 Evaluation of plus and minus 2019-12-22 21:35:58 +01:00
Kasper
c247b6c899 Added length units and support for multi-word units 2019-12-21 21:36:39 +01:00
Kasper
d463082db5 Fix long units causing error (max_word_length) 2019-12-21 17:59:21 +01:00
Kasper
a4db9df058 Added units 2019-12-21 16:49:37 +01:00
Kasper
3587cb94a9 Added parser with most things supported 2019-12-15 20:27:17 +01:00
Kasper
670aa7e732 Fixed whitespace/commas causing lexing error 2019-12-14 22:59:04 +01:00
Kasper
8c156fcf15 Lexer determines if % is percent or modulo & wraps input in parens 2019-12-14 22:12:02 +01:00
Kasper
f7a5481268 to/of operators, auto insert parens 2019-12-12 22:25:08 +01:00
Kasper
e8d363acfc Fixed byte_index not incrementing in digit/string loops 2019-12-09 04:34:08 +01:00
Kasper
62262fbb1f Lexer support for a bunch of math functions 2019-12-09 04:28:38 +01:00
Kasper
424e6988e9 Lexer supports multi-byte utf8 characters and "pi", "π" and "e" 2019-12-09 03:36:02 +01:00
Kasper
1fe9214a62 Put lexer into it's own file 2019-12-09 00:31:34 +01:00
Kasper
47768ee208 Better error handling 2019-12-08 23:02:26 +01:00
Kasper
8e2a3ff4d7 Number parsing 2019-12-08 21:04:35 +01:00
Kasper
f83c0ce59d Started work on custom lexer 2019-12-08 15:17:15 +01:00
Kasper
4281aa97a9 cargo init 2019-12-06 16:16:29 +01:00
Kasper
6c15cf9cca Initial commit 2019-12-05 23:44:52 +01:00