summaryrefslogtreecommitdiff
path: root/tokenizer.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-07-10 12:08:40 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-07-10 12:08:40 -0400
commit72c4d0a78c067806a6341a5fc5acb33d5805896b (patch)
tree2f2bdda14e247915b27e73b353d32501886dca42 /tokenizer.c
parente684e1bce6ac55607d0612a3f99031c7dfbdfc90 (diff)
big changes to the way for loops work
Diffstat (limited to 'tokenizer.c')
-rw-r--r--tokenizer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokenizer.c b/tokenizer.c
index 3f83e6f..d384da2 100644
--- a/tokenizer.c
+++ b/tokenizer.c
@@ -387,8 +387,8 @@ static Status tokenize_file(Tokenizer *t, File *file) {
}
while (1) {
if (*t->s == '.') {
- if (t->s[1] == '.') {
- /* .. (not a decimal point; end the number here) */
+ if (!isdigit(t->s[1])) {
+ /* not a decimal point; end the number here (could be .. or .,) */
break;
}
if (token->kind == TOKEN_LITERAL_FLOAT) {