summaryrefslogtreecommitdiff
path: root/tnslc/compile/module.tnsl
diff options
context:
space:
mode:
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++]