AppleScript grammar for tree-sitter
applescript tree-sitter-grammar tree-sitter

build!: regenerate bindings for tree-sitter 0.26, release 2.0.0

BREAKING CHANGE: the Rust and Node APIs both change, and so does the parse tree. Rust: pub fn language() becomes the LANGUAGE constant. let language = tree_sitter_applescript::LANGUAGE; parser.set_language(&language.into()) The crate now depends on tree-sitter-language rather than pinning tree-sitter ~0.20.10, and moves to edition 2021. Node: the nan/v8 addon becomes node-addon-api with node-gyp-build, and the package is ESM. grammar.js moves to export default with it. Tree: the expression wrapper is hidden as of the previous commit, so every consumer of the tree sees one less level of nesting. tree-sitter init --update did part of this and left the tree inconsistent: it rewrote the JavaScript glue to expect a napi addon while binding.cc was still nan, and reported migrating package.json without doing so. The remaining files are taken from a clean tree-sitter init, with the project's licence header put back on the four binding files that carry one. Also fixes, both pre-existing: src/scanner.c included <tree_sitter/parser.h> with angle brackets, which cgo cannot resolve, so go build failed outright. Quoted now. .editorconfig declared charset = utf-2. .gitignore did not cover the Rust, Python, Swift or C build outputs, so a plain cargo build or pip install -e . left target/, *.egg-info, *.o and a static library sitting in the working copy. Verified end to end: tree-sitter test 64/79, node addon loads and parses, cargo build and cargo test pass, go build passes, make builds the static and shared libraries, and pip install -e . parses in a venv.


Author
Date Commit Parent 83f185cd Change ID