Merge lang/i18nkeys (27024de) into lang/syntax: the vocabulary gains the text keys - the Key type, @TextKey (a registry's), the k"..." and kn"..." literals - and @Text's doc; docs/language pages for Key and @TextKey; ludic-dev syntax rewrote the grammars; reseeded, bootstrap-cfree fixpoint holds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-30 00:02:48 +03:00
commit 9f8aec3bc1
63 changed files with 145288 additions and 114562 deletions

View file

@ -216,6 +216,12 @@ program LudicFmt {
if char_is_alpha(c) {
let st = i; while char_is_alnum(s[i]) { i += 1 }
let w = s[st..i]
if s[i] == '"' and ((w == "k") or (w == "kn")) { # k"pause.resume": a key literal, one token
i += 1
while s[i] != 0 and s[i] != '"' and s[i] != '\n' { if s[i] == '\\' and s[i + 1] != 0 { i += 2 } else { i += 1 } }
if s[i] == '"' { i += 1 }
push_tok(LT_STR, st, i, line); continue
}
var k = LT_ID
if (w == "true") or (w == "false") or (w == "null") { k = LT_BOOL }
else { if is_type_word(w) { k = LT_TYPE }

View file

@ -236,9 +236,9 @@ program LudicLsp {
# ludic-dev syntax: begin - generated from `ludicc --emit-syntax` (selfhost/frontend/vocab.ludic); run `ludic-dev syntax`, do not edit
function is_type_word(w: pointer) -> bool {
if (w == "int") or (w == "long") or (w == "float") or (w == "double") or (w == "fixed") or (w == "bool") { return true }
if (w == "byte") or (w == "string") or (w == "pointer") or (w == "void") or (w == "entity") or (w == "countdown") { return true }
if (w == "words") or (w == "floats") or (w == "doubles") or (w == "fixeds") or (w == "pointers") or (w == "Vector") { return true }
if (w == "IVec2") or (w == "Rect") { return true }
if (w == "byte") or (w == "string") or (w == "Key") or (w == "pointer") or (w == "void") or (w == "entity") { return true }
if (w == "countdown") or (w == "words") or (w == "floats") or (w == "doubles") or (w == "fixeds") or (w == "pointers") { return true }
if (w == "Vector") or (w == "IVec2") or (w == "Rect") { return true }
return false
}
function is_phase_word(w: pointer) -> bool {

View file

@ -75,7 +75,7 @@ static const char* LUDIC_KW_STMT[] = {
"dispatch","try","and","or","not", 0
};
static const char* LUDIC_TYPES[] = {
"int","long","float","double","fixed","bool","byte","string","pointer","void","entity",
"int","long","float","double","fixed","bool","byte","string","Key","pointer","void","entity",
"countdown","words","floats","doubles","fixeds","pointers","Vector","IVec2","Rect", 0
};
static const char* LUDIC_PHASES[] = {
@ -84,10 +84,10 @@ static const char* LUDIC_PHASES[] = {
static const char* LUDIC_ATTRIBUTES[] = {
"Ref","OneOf","Range","Unit","Asset","Color","Node","Clip","Material","Tint","Derived","Text",
"Multiline","Key","Computed","Sync","frame","max","owns","AppendOnly","ByKey","PerMap",
"Chunked","export","Public","On","Queries","OnSpawn","OnDespawn","OnAttach","OnDetach",
"OnEnable","OnDisable","OnStart","OnQuit","Owned","Server","Predicted","ToServer","ToClients",
"System","EngineSystem","Namespace","deterministic","ClearColor","alloc_ok","creates",
"releases","Handles","Reads","Writes", 0
"Chunked","TextKey","export","Public","On","Queries","OnSpawn","OnDespawn","OnAttach",
"OnDetach","OnEnable","OnDisable","OnStart","OnQuit","Owned","Server","Predicted","ToServer",
"ToClients","System","EngineSystem","Namespace","deterministic","ClearColor","alloc_ok",
"creates","releases","Handles","Reads","Writes", 0
};
/* ludic-dev syntax: end */
static const char* LUDIC_WIDGETS[] = {