summaryrefslogtreecommitdiff
path: root/tnslc/compile/module.tnsl
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2026-04-14 03:20:57 -0400
committerKai Gunger <kgunger12@gmail.com>2026-04-14 03:20:57 -0400
commitef32d7fe6adc1335b06848893c16088bb8e7cd47 (patch)
tree48111a751acad3606265cbadba23534557e0236a /tnslc/compile/module.tnsl
parent2b43217716341352eac445ed0f7aacef0b8ac43d (diff)
[tnslc] small initial work on compiling values
Diffstat (limited to 'tnslc/compile/module.tnsl')
-rw-r--r--tnslc/compile/module.tnsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tnslc/compile/module.tnsl b/tnslc/compile/module.tnsl
index d3380f4..844d3c6 100644
--- a/tnslc/compile/module.tnsl
+++ b/tnslc/compile/module.tnsl
@@ -85,6 +85,22 @@ struct Module {
return out
;/
+ /; is_method [bool]
+ /; if (utils.strlen(self.name) < 3)
+ return false
+ ;/
+
+ /; if (self.name{0} !== '_')
+ return false
+ ;; else if (self.name{1} !== '#')
+ return false
+ ;; else if (self.name{2} == '#')
+ return false
+ ;/
+
+ return true
+ ;/
+
/; _from_tree (~parse.Node mod, ~CompBuf buf)
~parse.Node sub
/; loop (int i = 0; i < mod`.sub.count) [i++]