ludic/docs/language
Orkuncakilkaya f5e9b5d6c2 feat(lang): new Type { field: value } record initialisers
`new` accepted only a bare `new T` (every field its declared default) or
`new []T`, but the docs (kw-new) document `new Record { field: value, … }`
as the way to construct a record with non-default fields — a documented,
intended form the parser never accepted (`let o = new Point { x: 3 }` failed
with "expected newline or ';'").

Parse an optional `{ … }` override record after the type in a `new`
expression (reusing the existing `record()` parser that `spawn` uses), and
seed each field in emit_new_struct from that record when present, else from
the field's declared default. `new []T` and bare `new T` are unchanged.

Also mark the illustrative kw-import fence `# doc-check: skip` (its imports
are example paths that can't resolve in isolation), which makes `x check-docs`
fully green (398 fences, 0 drifted) — so it is now wired as a gate in
`x test-tools` and CI, guarding against future doc/compiler drift.

Reseed is a clean fixpoint (x bootstrap-cfree holds); x test (56),
x selfhost-test (29, golden renders unchanged) and x test-tools (30) green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 01:20:06 +03:00
..
annotations refactor(lang): rename the ptr/ptrs types to pointer/pointers 2026-08-30 01:58:54 +03:00
builtins refactor(lang): rename builtins flr->floor and fx->fixed 2026-08-30 02:01:56 +03:00
clock feat(stdlib): DateTime format/parse + simulated Clock — completes #9 2026-08-30 03:51:48 +03:00
collision refactor(stdlib): de-abbreviate namespaces (Mem/Sys/Net/Collide) 2026-08-30 01:30:47 +03:00
color feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
colors docs: add Networking section + process/OS builtins (net_send, owner, is_server, serialize/apply, arg, exit, run, getenv, read_char, file_*) 2026-08-29 16:39:29 +03:00
control feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
crypto feat(stdlib): finish Crypto (CSPRNG + base64) and add Uuid.* library (#19 #16) 2026-08-30 21:40:51 +03:00
date feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
datetime feat(stdlib): DateTime format/parse + simulated Clock — completes #9 2026-08-30 03:51:48 +03:00
duration feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
ease feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25) 2026-08-30 01:19:44 +03:00
ecs refactor(lang): rename the str type (and stringify builtin) to string 2026-08-30 01:51:11 +03:00
events docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
fs feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
hash feat(lang,stdlib): 64-bit long type + 64-bit Hash variants (issue #17) 2026-08-30 01:01:06 +03:00
input docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
list feat(stdlib): sorting toolkit — sort_by/sort_desc_by/sort_with + stable merge sort (#11) 2026-08-30 11:39:26 +03:00
log feat(stdlib): add Log.* — levelled, structured logging (#15) 2026-08-30 21:57:22 +03:00
map docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
math refactor(lang): rename builtins flr->floor and fx->fixed 2026-08-30 02:01:56 +03:00
memory refactor(lang): rename the ptr/ptrs types to pointer/pointers 2026-08-30 01:58:54 +03:00
mime feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
network docs: merge duplicate networking namespace dirs; guard against recurrence 2026-08-30 16:46:21 +03:00
noise feat(stdlib): add Noise.* — deterministic fixed-point procedural noise (#3) 2026-08-30 21:50:50 +03:00
operators refactor(lang): rename the ptr/ptrs types to pointer/pointers 2026-08-30 01:58:54 +03:00
os feat(stdlib): add Os.* — the OS/environment interface (#21) 2026-08-30 22:19:11 +03:00
path feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
phases docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
random feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
save feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
scenes docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
screen feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
structure feat(lang): new Type { field: value } record initialisers 2026-08-31 01:20:06 +03:00
system refactor(stdlib): consolidate System.* onto Os.*, retire duplicated members 2026-08-30 22:54:28 +03:00
text refactor(stdlib): consolidate System.* onto Os.*, retire duplicated members 2026-08-30 22:54:28 +03:00
time feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
types feat(stdlib): 2D Vector type + Vector.* namespace (issue #25) 2026-08-30 02:09:38 +03:00
unicode feat(stdlib): add Unicode.* — UTF-8 code points, graphemes, case mapping (#13) 2026-08-30 22:29:00 +03:00
uuid feat(stdlib): finish Crypto (CSPRNG + base64) and add Uuid.* library (#19 #16) 2026-08-30 21:40:51 +03:00
vector feat(stdlib): 2D Vector type + Vector.* namespace (issue #25) 2026-08-30 02:09:38 +03:00
world feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00