2026-10-23 02:13:30 -04:00
2026-10-23 02:13:30 -04:00
2026-10-23 02:13:30 -04:00
2026-10-23 02:13:30 -04:00
2026-09-23 00:36:22 -04:00
2026-10-23 02:13:30 -04:00
2026-10-23 02:13:30 -04:00
2026-09-23 00:36:22 -04:00
2026-09-23 00:36:22 -04:00
2026-09-23 00:36:22 -04:00
2026-10-23 02:13:30 -04:00
2026-09-23 00:36:22 -04:00
2026-10-23 02:13:30 -04:00
2026-09-23 00:36:22 -04:00

tree-sitter-lscript

Tree-sitter grammar and editor queries for LScript.

This package provides a lossless, error-tolerant concrete syntax tree for LScript editors and source tools. Syntax fixtures and tests are included here.

The public named-node and field contract is documented in docs/cst.md.

Development

Tree-sitter 0.27 is required. tree-sitter generate evaluates grammar.js with Node.js by default; without Node.js, pass --js-runtime native to use the CLI's bundled QuickJS runtime.

npm install
npm run generate
npm test
npm run test:fixtures
npm run test:queries
cargo test

test:fixtures requires every syntax-valid fixture to parse without an ERROR or MISSING node. It also checks syntax-invalid fixtures and fails if a new one is accepted without recovery. Three exceptions are listed explicitly by the script: the adjacency-only =- and != lexer errors, and recovery after a repeated result operator. These need lexical or recovery handling rather than a looser grammar rule.

The future-reserved word context is a reserved_word token with no grammar production, so it is rejected wherever an identifier is expected.

Generated parser sources under src/ are committed so consumers do not need Node.js or the Tree-sitter CLI.

S
Description
No description provided
Readme
359 KiB
1 Watchers 0 Forks
Languages
C 96.5%
JavaScript 1.3%
Rust 1.2%
C++ 0.8%
Tree-sitter Query 0.1%