@getmate/tree-sitter-mate
v0.8.0
Published
Mate tree-sitter runtime package (WASM + loader)
Readme
@getmate/tree-sitter-mate
Runtime-only Mate tree-sitter distribution with WASM and loader helpers.
Installation
bun add @getmate/tree-sitter-mateUsage
High-level API (ready to consume):
parseMate(code, options?)getMateCaptures(code, options?)
import { parseMate } from '@getmate/tree-sitter-mate';
const tree = await parseMate('<div>Hello</div>');import { getMateCaptures } from '@getmate/tree-sitter-mate';
const captures = await getMateCaptures('<div>Hello</div>');Options:
oldTree: previousTreefor incremental parsing.parseOptions: forwarded as the third argument toparser.parse(...).
CLI
tree-sitter-mate --version
tree-sitter-mate ./component.mate