summaryrefslogtreecommitdiff
path: root/tnslc/tokenizer.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-08-24 20:12:24 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-08-24 20:12:24 -0400
commit56262f5e8e521c782629aa18ed3d294c26f45011 (patch)
treeabaa7133ce5fa87bbc7b8b28e71f870958f8e990 /tnslc/tokenizer.tnsl
parent02e3121d70b8e3d3d2fa333dc0fef9cc63b5f93a (diff)
change in_csv to return an index
Diffstat (limited to 'tnslc/tokenizer.tnsl')
-rw-r--r--tnslc/tokenizer.tnsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tnslc/tokenizer.tnsl b/tnslc/tokenizer.tnsl
index 62acd4a..09509f8 100644
--- a/tnslc/tokenizer.tnsl
+++ b/tnslc/tokenizer.tnsl
@@ -113,7 +113,7 @@ struct Token {
;/
;/
- return in_csv(~CSV_AUGMENTS, tok.data)
+ return in_csv(~CSV_AUGMENTS, tok.data) !< 0
;/
# True if the token is a valid number (integer or float)
@@ -157,9 +157,9 @@ struct Token {
;; else if (contains_char(~AUGMENTS, tok.data{0}) == true)
return TOKEN_TYPE.AUGMENT
;/
- ;; else if (in_csv(~CSV_KEYWORDS, tok.data) == true)
+ ;; else if (in_csv(~CSV_KEYWORDS, tok.data) !< 0)
return TOKEN_TYPE.KEYWORD
- ;; else if (in_csv(~CSV_KEYTYPES, tok.data) == true)
+ ;; else if (in_csv(~CSV_KEYTYPES, tok.data) !< 0)
return TOKEN_TYPE.KEYTYPE
;; else if (is_numeric_literal(tok) == true)
return TOKEN_TYPE.LITERAL