Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@esdmr/tree-sitter-fish

esdmr2693.5.2-1

Fish tree-sitter grammar

tree-sitter, fish, shell, parser

readme

tree-sitter-fish

Fork of ram02z/tree-sitter-fish, but only the Wasm output, built via GitHub actions.

import Parser from 'web-tree-sitter';
import tsWasm from 'web-tree-sitter/tree-sitter.wasm?url';
import tsFishWasm from '@esdmr/tree-sitter-fish?url';

await Parser.init({
    locateFile() {
        return tsWasm;
    },
});
const fish = await Parser.Language.load(tsFishWasm);

Fish grammar for tree-sitter.

Development

Install the dependencies:

npm install

Run the tests:

npm run test

Run the build and tests in watch mode:

npm run test:watch

Test parser against fish-shell /share fish files:

npm run test:examples

References