From 56262f5e8e521c782629aa18ed3d294c26f45011 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 24 Aug 2023 20:12:24 -0400 Subject: change in_csv to return an index --- tnslc/tokenizer.tnsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tnslc/tokenizer.tnsl') 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 -- cgit v1.2.3