Follow-up from the font-lock fix (b336931).
These Prologos keywords have no rules in editors/tree-sitter-prologos/grammar.js — top_level (grammar.js:52-79) has no schema_form/defr_form, and expression (:506) has no solve/explain/query/rel/forall/exists. They currently highlight only via prologos-ts-mode's identifier-regex fallback (rule 2), which is fragile (matches any identifier with those names) and gives them no structural support (navigation/imenu/indent).
Making them proper forms:
- schema — top-level declaration
schema Name / :field Type …. Add schema_form to top_level (low conflict, mirrors spec_form).
- defr — top-level relation def with
|| fact blocks and &> rule clauses. Needs new ||/&> operator tokens the grammar lacks.
- rel / solve / explain / query / forall / exists — expressions that appear inside
(…). Adding seq('solve', …)-style rules to expression conflicts with the generic application rule (grammar.js:608) — needs explicit precedence / conflicts entries.
Scope: real grammar-authoring + test/ corpus updates + rebuild via install.sh. Do it as one tested change. Until then the regex fallback keeps them highlighted.
After landing, move these from the mode's rule-2 regex into rule 1's token list (and verify against node-types.json so the query still compiles under Emacs 31).
Follow-up from the font-lock fix (b336931).
These Prologos keywords have no rules in
editors/tree-sitter-prologos/grammar.js—top_level(grammar.js:52-79) has noschema_form/defr_form, andexpression(:506) has nosolve/explain/query/rel/forall/exists. They currently highlight only via prologos-ts-mode's identifier-regex fallback (rule 2), which is fragile (matches any identifier with those names) and gives them no structural support (navigation/imenu/indent).Making them proper forms:
schema Name / :field Type …. Addschema_formtotop_level(low conflict, mirrorsspec_form).||fact blocks and&>rule clauses. Needs new||/&>operator tokens the grammar lacks.(…). Addingseq('solve', …)-style rules toexpressionconflicts with the genericapplicationrule (grammar.js:608) — needs explicit precedence /conflictsentries.Scope: real grammar-authoring +
test/corpus updates + rebuild viainstall.sh. Do it as one tested change. Until then the regex fallback keeps them highlighted.After landing, move these from the mode's rule-2 regex into rule 1's token list (and verify against node-types.json so the query still compiles under Emacs 31).