about summary refs log tree commit diff
path: root/std/stdlib.src
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-05-17 17:57:13 +0200
committerBaitinq <[email protected]>2025-05-17 17:57:13 +0200
commit0f64e13fa056bd0506b352015dce5085f16eea74 (patch)
tree787efe2a338e219b263c7ec6097124262b9286f7 /std/stdlib.src
parentBootstrap: Tokenizer: Tokenize chars (diff)
downloadpry-lang-0f64e13fa056bd0506b352015dce5085f16eea74.tar.gz
pry-lang-0f64e13fa056bd0506b352015dce5085f16eea74.tar.bz2
pry-lang-0f64e13fa056bd0506b352015dce5085f16eea74.zip
Bootstrap: Tokenizer: Tokenize identifiers
Diffstat (limited to 'std/stdlib.src')
-rw-r--r--std/stdlib.src17
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;
 	};