aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2025-10-09 19:41:45 +0000
committerrtk0c <[email protected]>2025-10-15 20:28:15 +0000
commitbc8c20d1e93b5c18e8915d356e74024092a74ce8 (patch)
tree68572587354e928075f84bfbb3f71db21e9d174e
parentab49edbb106c25b980bac0227a3db55b74378784 (diff)
Extra thoughts
-rw-r--r--cm.lua2
-rw-r--r--cm/ex03.cm4
-rw-r--r--tablgen.lua10
3 files changed, 16 insertions, 0 deletions
diff --git a/cm.lua b/cm.lua
index 42fd532..e2d11f6 100644
--- a/cm.lua
+++ b/cm.lua
@@ -1,6 +1,8 @@
-- Cm: name inspired by "C meta(language)", but it's not really a metalangauge (whatever this means) of C (or anything else)
local function LateResolveType(name)
+ -- "lb" - Lazy Binding
+ return {_tag = "lb", _lb_typename = name}
end
local function TypeTagger(tag)
diff --git a/cm/ex03.cm b/cm/ex03.cm
index 34275df..417799f 100644
--- a/cm/ex03.cm
+++ b/cm/ex03.cm
@@ -31,6 +31,10 @@
// should bindings be baked into the environment image (i.e. design the bytecode format to include this? however it should be done; can't really imagine it now?)
// or should they be generated e.g. `bind_function("func_name", &func_written_in_C);`?
+// REUSING EXSITING SCRIPTING LANGUAGE
+// We don't want to reimplement a language from scratch
+// Hacking e.g. PUC-Lua's parser? Kind of like Terra
+
// terminology akin to Janet (from _Janet for Mortals_):
// compile: evaluating the program sources to produce an environment
// runtime: evaluating the environment
diff --git a/tablgen.lua b/tablgen.lua
index ae8a4fb..3cef364 100644
--- a/tablgen.lua
+++ b/tablgen.lua
@@ -1,5 +1,15 @@
local F = {}
+local function tostrType(t)
+end
+
+--- Output the given text as-is to the generated file.
+function F:Write(chunk)
+ -- TODO
+
+end
+
function F:WriteFuncDecl(func_name, ret, arg)
+ -- Write to output as a C function declaration
-- TODO
end