diff options
| author | Baitinq <[email protected]> | 2025-05-15 21:41:40 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-05-15 21:47:18 +0200 |
| commit | 9d99668ad0b123f522e4adffec9dd34930c0d930 (patch) | |
| tree | 122dd0cee1381b10a5b56c7e6854fbd0707e5b78 /std | |
| parent | Feature: Add support for null pointers (diff) | |
| download | pry-lang-9d99668ad0b123f522e4adffec9dd34930c0d930.tar.gz pry-lang-9d99668ad0b123f522e4adffec9dd34930c0d930.tar.bz2 pry-lang-9d99668ad0b123f522e4adffec9dd34930c0d930.zip | |
Bootstrap: Tokenizer: Tokenize ints
Diffstat (limited to 'std')
| -rw-r--r-- | std/stdlib.src | 15 |
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; |