summaryrefslogtreecommitdiff
path: root/tnslc/compile/function.tnsl
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2025-11-30 03:52:24 -0500
committerKai Gunger <kgunger12@gmail.com>2025-11-30 03:52:24 -0500
commit46e23fa81f651961b2388c95e9569d2d39c3cffb (patch)
treef4b8fa1704b930ce8f2397d5d5b1bfc180284642 /tnslc/compile/function.tnsl
parent51854e5db46033712b5dbbf78d769ea500eca14f (diff)
Start work on backend
Diffstat (limited to 'tnslc/compile/function.tnsl')
-rw-r--r--tnslc/compile/function.tnsl11
1 files changed, 7 insertions, 4 deletions
diff --git a/tnslc/compile/function.tnsl b/tnslc/compile/function.tnsl
index 937e668..4f7615b 100644
--- a/tnslc/compile/function.tnsl
+++ b/tnslc/compile/function.tnsl
@@ -4,23 +4,26 @@ struct Function {
utils.Vector
inputs,
outputs,
- ~parse.Node body
+ ~parse.Node _up,
}
/; method Function
- /; init (~uint8 name)
- self.name = name
+ /; init (~parse.Node n)
+ self.name = utils.strcpy(n`.data)
+ self._up = n
Var v
self.inputs.init(len v)
self.outputs.init(len v)
;/
+ /; _resolve_type (~Module parent)
+ ;/
+
/; _compile (~Module parent, ~CompBuf cb)
;/
/; end
_delete(self.name)
- self.body`.end()
~Var v
/; loop (int i = 0; i < self.inputs.count) [i++]