init
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# 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](docs/cst.md).
|
||||
|
||||
## Development
|
||||
|
||||
Tree-sitter 0.27 and Node.js are required.
|
||||
|
||||
```sh
|
||||
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 not yet emitted as a Tree-sitter keyword
|
||||
because it has no grammar production. It should move into lexical handling with
|
||||
the two adjacency checks above.
|
||||
|
||||
Generated parser sources under `src/` are committed so consumers do not need
|
||||
Node.js or the Tree-sitter CLI.
|
||||
Reference in New Issue
Block a user