tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Tree-sitter grammar for tilcayo, with Neovim and Helix setup

- editors/tree-sitter-tilcayo/grammar.js follows the grammar reference.
  src/scanner.c implements the line-break rules (a call's `(` on the
  callee's line; `<tag` and `<>` at a line start begin HTML, otherwise
  `<` compares and `<>` concatenates) and reads HTML text verbatim.
- Queries: highlights (Neovim names), locals, indents, and the
  highlights for Helix, generated by renaming captures and reversing
  patterns (the first match wins there).
- Tests:
  - a corpus of hand-written expected trees (`tree-sitter test`);
  - a Rust binding crate whose tests compile every query, keep the Helix
    query in step, and parse every .til file of the repository and every
    documentation sample without errors (run by cargo test, so CI covers
    the grammar even without the CLI).
  Checked in headless Neovim with tree-sitter highlighting and with the
  language server's semantic tokens.
- CI regenerates the parser and runs the corpus when the tree-sitter CLI
  is installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · 0d62be22cd45184c04c1143c59999cfaf4fac92e

Parents 18a3d43

28 fichiers modifiés, 32022 ajouts, 2 suppressions

Aeditors/tree-sitter-tilcayo/Cargo.toml+21−0
Aeditors/tree-sitter-tilcayo/README.md+92−0
Aeditors/tree-sitter-tilcayo/bindings/rust/build.rs+14−0
Aeditors/tree-sitter-tilcayo/bindings/rust/lib.rs+139−0
Aeditors/tree-sitter-tilcayo/grammar.js+390−0
Aeditors/tree-sitter-tilcayo/queries/helix/generate.py+69−0
Aeditors/tree-sitter-tilcayo/queries/helix/highlights.scm+102−0
Aeditors/tree-sitter-tilcayo/queries/highlights.scm+81−0
Aeditors/tree-sitter-tilcayo/queries/indents.scm+21−0
Aeditors/tree-sitter-tilcayo/queries/locals.scm+18−0
Aeditors/tree-sitter-tilcayo/src/grammar.json+3552−0
Aeditors/tree-sitter-tilcayo/src/node-types.json+3500−0
Aeditors/tree-sitter-tilcayo/src/parser.c+22714−0
Aeditors/tree-sitter-tilcayo/src/scanner.c+124−0
Aeditors/tree-sitter-tilcayo/src/tree_sitter/alloc.h+54−0
Aeditors/tree-sitter-tilcayo/src/tree_sitter/array.h+336−0
Aeditors/tree-sitter-tilcayo/src/tree_sitter/parser.h+286−0
Aeditors/tree-sitter-tilcayo/test/corpus/effects.txt+77−0
Aeditors/tree-sitter-tilcayo/test/corpus/expressions.txt+72−0
Aeditors/tree-sitter-tilcayo/test/corpus/html.txt+39−0
Aeditors/tree-sitter-tilcayo/test/corpus/items.txt+99−0
Aeditors/tree-sitter-tilcayo/test/corpus/line_breaks.txt+120−0
Aeditors/tree-sitter-tilcayo/tree-sitter.json+21−0