summaryrefslogtreecommitdiff
path: root/src/main/smp/sys/char.smp
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-08-10 11:11:18 -0700
committerCliff Click <cliffc@acm.org>2026-10-22 15:47:50 -0700
commite31f4ad4d202eeecdc1fda2253e849a05e2a834d (patch)
tree23bdd0450e4de54a7a80207a2199e58a0fd439bd /src/main/smp/sys/char.smp
parent1031463bd645a79da2f8e643048a84e5a962a2b6 (diff)
downloadSimple-e31f4ad4d202eeecdc1fda2253e849a05e2a834d.tar.gz
Simple-e31f4ad4d202eeecdc1fda2253e849a05e2a834d.zip
Chapter 25: Modules, Separate Compilation, and SSA Construction
Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki <jun784@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/main/smp/sys/char.smp')
-rw-r--r--src/main/smp/sys/char.smp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/smp/sys/char.smp b/src/main/smp/sys/char.smp
new file mode 100644
index 00000000..22ca4213
--- /dev/null
+++ b/src/main/smp/sys/char.smp
@@ -0,0 +1,8 @@
+
+val toupper = { u8 c ->
+ return c >= 'a' && c <= 'z' ? c - ('a' - 'A') : c;
+};
+
+val tolower = { u8 c ->
+ return c >= 'A' && c <= 'Z' ? c + ('a' - 'A') : c;
+};