summaryrefslogtreecommitdiff
path: root/tnslc
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-03-26 23:21:53 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-03-26 23:21:53 -0400
commitf9eed77b62ae7e28eee7a758cb4ce4f6fb962de3 (patch)
tree2b65388b8e2a3ecd9517d0972c13fa673379bece /tnslc
parent2d50e875f98993fc77350c470774d800f13f7170 (diff)
Fix bug for functions with no return
Diffstat (limited to 'tnslc')
-rw-r--r--tnslc/tnslc.tnsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl
index b8e1189..c31c657 100644
--- a/tnslc/tnslc.tnsl
+++ b/tnslc/tnslc.tnsl
@@ -1768,6 +1768,12 @@
;/
;return false
;/
+
+ /; sprint [{}uint8]
+ ;return string_join( {
+ "Function ", self.name, " (", int_to_string(len(self.inputs)), ") ", self.output.sprint()
+ }, "")
+ ;/
;/
;struct Module {
@@ -2705,6 +2711,10 @@
"\tcall ", f.full_label(), "\n"
}, "")
+ /; if (string_equate(f.output.name, ""))
+ ;return {"", NO_TYPE, 0, 0}
+ ;/
+
;Type t = f.mod`.find_type(string_split(f.output.name, '.'))`
;t.ptr_chain = f.output.ptr_chain
;ctmp.data_type = t
@@ -2712,6 +2722,7 @@
/; if (!(ctmp.is_prim()) && !(ctmp.is_ref()))
;ctmp.data_type.ptr_chain.append(PTYPE.REFERENCE)
;/
+ ;log_debug("perf call ret")
;return ctmp
;/