Phase 6b: annotation DSL (@Queries, @Handles) + docs prose pass
@Queries(these: [Prop{constraint}, ...], on: Model) on a handler desugars to the
existing S_QUERY loop: each property binds by its own name, a Prop{...} block
qualifies its bare fields to that property, and on: adds a {Model} tag filter.
Implemented via parse_queries_anno + qualify_fields (parse_game.ludic), wired
into parse_one_decl; @Handles parses on the program (documentation).
examples/annotations.ludic demonstrates it (output 3 1 0 0); test.sh 15/15.
Docs: added the Annotations section to LANGUAGE.md and did the vocabulary prose
pass (component->property, archetype->model, system->handler, game->program)
across the docs. check-docs + test-tools green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
69fe39bff1
commit
dfc17398cf
10 changed files with 3812 additions and 3113 deletions
5
test.sh
5
test.sh
|
|
@ -50,6 +50,11 @@ qsmoke() { # name
|
|||
else bad "$n: $(tail -1 /tmp/qs.out)"; fi
|
||||
}
|
||||
qsmoke qdecl
|
||||
# @Queries desugars to a query loop; @Handles parses. Check the desugared behavior.
|
||||
if ./selfhost/game-build.sh build/ludicc examples/annotations.ludic "/tmp/ludic_ann" >/tmp/ann.out 2>&1 \
|
||||
&& [ "$(/tmp/ludic_ann | tr '\n' ' ')" = "3 1 0 0 " ]; then
|
||||
ok "annotations.ludic (@Queries desugars to a query, @Handles parses)"
|
||||
else bad "annotations: $(tail -1 /tmp/ann.out)"; fi
|
||||
# --- Toolchain-agent CLI smoke tests append below this line ---
|
||||
echo "== self-hosted front-end binaries (ludicc / ludic) =="
|
||||
# The two commands are one multi-call native binary built from the seed with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue