From 86c46c629b59d1404b3d421fd6a6609c1ecd99d0 Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Tue, 29 Sep 2026 23:59:47 +0300 Subject: [PATCH] changes: syntax-vocabulary (ludic syntax, ludic-dev syntax, the language server's outline and attribute arguments) Co-Authored-By: Claude Opus 5.5 --- changes/syntax-vocabulary.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 changes/syntax-vocabulary.md diff --git a/changes/syntax-vocabulary.md b/changes/syntax-vocabulary.md new file mode 100644 index 00000000..126fd47b --- /dev/null +++ b/changes/syntax-vocabulary.md @@ -0,0 +1,25 @@ +bump: minor +type: feat +**One vocabulary, from the compiler, for every editor.** `ludicc --emit-syntax` (`ludic syntax [--json] [-o FILE]`) +prints the language's words from the compiler's own table (`selfhost/frontend/vocab.ludic`): every keyword with its +role (declaration, modifier, statement, operator, constant) and whether the parser reserves it, every declaration's +form, the built-in types and phases, every attribute with what it goes on, its arguments and a one-line doc +(`@Ref`, `@OneOf`, `@Range`, `@Unit`, `@Asset`, `@Color`, `@Node`, `@Clip`, `@Material`, `@Tint`, `@Derived`, +`@Text`, `@Multiline`, `@Key`, `@AppendOnly`, `@ByKey`, `@PerMap`, `@Chunked`, `@max`, `@owns`, `@frame`, `@Sync`, +`@Computed`, `@alloc_ok`, ...), the operators and the literal forms. `"syntax_version": 1`. The emitter asks the +parser's own recognisers of every row and refuses one they disagree with. + +`ludic-dev syntax` writes the keyword, type and phase lists of `ludic_syntax.h`, the TextMate grammar, the JetBrains +lexer, `ludic-mode.el` and the language server between marked lines; `ludic-dev syntax --check` (also run by +`check-vocabulary` and the regression suite) fails when one falls behind or lacks a word, when docs/language has no +page for a keyword, type, phase or attribute, or when the parser tests a word or reads an attribute the vocabulary +lacks. The grammars gain `module uses port bind action reducer dispatch registry def open component prop view alias +friend unsafe numbers of as from mut system` and more; docs/language gains a page for each of them and for every +editor, registry and memory attribute. + +The language server's outline names every declaration by its own kind: `export property` / `state` are structs with +every field as a child (a field's default no longer swallows the fields after it), `event` / `action` events, `port` +an interface, `registry`, `enum` with its members, `component` / `view` with their props, state and events, and +`reducer S on A`. Hover and go-to-definition resolve an attribute's argument - `@Ref(Kits)` to the registry, +`@Node(model)` to the field it names - and hover on the attribute shows its reference page; a `fn(...) -> T` field +shows its whole type.