diff options
| author | Baitinq <[email protected]> | 2025-05-17 17:57:13 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-05-17 17:57:13 +0200 |
| commit | 0f64e13fa056bd0506b352015dce5085f16eea74 (patch) | |
| tree | 787efe2a338e219b263c7ec6097124262b9286f7 /std | |
| parent | Bootstrap: Tokenizer: Tokenize chars (diff) | |
| download | pry-lang-0f64e13fa056bd0506b352015dce5085f16eea74.tar.gz pry-lang-0f64e13fa056bd0506b352015dce5085f16eea74.tar.bz2 pry-lang-0f64e13fa056bd0506b352015dce5085f16eea74.zip | |
Bootstrap: Tokenizer: Tokenize identifiers
Diffstat (limited to 'std')
| -rw-r--r-- | std/stdlib.src | 17 |
1 files changed, 12 insertions, 5 deletions
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; }; |