about summary refs log tree commit diff
path: root/std
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-05-15 21:41:40 +0200
committerBaitinq <[email protected]>2025-05-15 21:47:18 +0200
commit9d99668ad0b123f522e4adffec9dd34930c0d930 (patch)
tree122dd0cee1381b10a5b56c7e6854fbd0707e5b78 /std
parentFeature: Add support for null pointers (diff)
downloadinterpreter-9d99668ad0b123f522e4adffec9dd34930c0d930.tar.gz
interpreter-9d99668ad0b123f522e4adffec9dd34930c0d930.tar.bz2
interpreter-9d99668ad0b123f522e4adffec9dd34930c0d930.zip
Bootstrap: Tokenizer: Tokenize ints
Diffstat (limited to 'std')
-rw-r--r--std/stdlib.src15
1 files changed, 11 insertions, 4 deletions
diff --git a/std/stdlib.src b/std/stdlib.src
index 133ed27..91884d5 100644
--- a/std/stdlib.src
+++ b/std/stdlib.src
@@ -31,6 +31,15 @@ let strcmp = (stra: *i8, strb: *i8) => bool {
 	return true;
 };
 
+let isdigit = (c: i8) => bool {
+	if c > '0' {
+		if c < '9' {
+			return true;
+		};
+	};
+	return false;
+};
+
 let isalphanum = (c: i8) => bool {
 	if c > 'a' {
 		if c < 'z' {
@@ -42,10 +51,8 @@ let isalphanum = (c: i8) => bool {
 			return true;
 		};
 	};
-	if c > '0' {
-		if c < '9' {
-			return true;
-		};
+	if isdigit(c) {
+		return true;
 	};
 
 	return false;