From 0f64e13fa056bd0506b352015dce5085f16eea74 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sat, 17 May 2025 17:57:13 +0200 Subject: Bootstrap: Tokenizer: Tokenize identifiers --- std/stdlib.src | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'std') diff --git a/std/stdlib.src b/std/stdlib.src index 91884d5..e370446 100644 --- a/std/stdlib.src +++ b/std/stdlib.src @@ -40,17 +40,24 @@ let isdigit = (c: i8) => bool { return false; }; -let isalphanum = (c: i8) => bool { - if c > 'a' { - if c < 'z' { +let isalpha = (c: i8) => bool { + if c >= 'a' { + if c <= 'z' { return true; }; }; - if c > 'A' { - if c < 'Z' { + if c >= 'A' { + if c <= 'Z' { return true; }; }; + return false; +}; + +let isalphanum = (c: i8) => bool { + if isalpha(c) { + return true; + }; if isdigit(c) { return true; }; -- cgit 1.4.1