crepl

An intuitive calculator REPL.
git clone git://git.knutsen.co/crepl
Log | Files | Refs | README | LICENSE

commit 0f0ef3b11642e230165fafb8686ea0addf869485
parent bb97219da3d33b54472340e176df4f2ea8465e66
Author: Demonstrandum <moi@knutsen.co>
Date:   Fri, 26 Jun 2020 11:44:25 +0100

Cover all ASCII special symbol characters as operators

Diffstat:
MREADME.md | 1+
Msrc/parse.c | 3++-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -27,6 +27,7 @@ sudo make install # Installs the program system wide. ``` ## TODO + - [ ] Throw errors on overflows until we implement bignums. - [ ] Imaginary numbers (using `complex.h`). - [ ] User defined functions. - [ ] Extend factorial to positive reals and complex values using Gamma function. diff --git a/src/parse.c b/src/parse.c @@ -77,7 +77,8 @@ TokenType char_token_type(char c, char last_char, TokenType last_token_type) // All possible operator/special-symbol characters: if ((c >= '!' && c <= '/') || (c >= ':' && c <= '@') - || (c >= '{' && c <= '~')) { + || (c >= '{' && c <= '~') + || (c >= '[' && c <= '`')) { return TT_OPERATOR; }