From bc8c20d1e93b5c18e8915d356e74024092a74ce8 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 9 Oct 2025 19:41:45 +0000 Subject: Extra thoughts --- cm.lua | 2 ++ cm/ex03.cm | 4 ++++ tablgen.lua | 10 ++++++++++ 3 files changed, 16 insertions(+) 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 -- cgit v1.3.1