diff options
| author | rtk0c <[email protected]> | 2025-10-09 19:41:45 +0000 |
|---|---|---|
| committer | rtk0c <[email protected]> | 2025-10-15 20:28:15 +0000 |
| commit | bc8c20d1e93b5c18e8915d356e74024092a74ce8 (patch) | |
| tree | 68572587354e928075f84bfbb3f71db21e9d174e | |
| parent | ab49edbb106c25b980bac0227a3db55b74378784 (diff) | |
Extra thoughts
| -rw-r--r-- | cm.lua | 2 | ||||
| -rw-r--r-- | cm/ex03.cm | 4 | ||||
| -rw-r--r-- | tablgen.lua | 10 |
3 files changed, 16 insertions, 0 deletions
@@ -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) @@ -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 |
