A tree-sitter grammar for the Wolfram Language.
.wl, .m, .wls, .wlt, .mt, .nb
grammar.js is the source of truth. After any change to it, regenerate the C
parser in src/ (parser.c, grammar.json, node-types.json):
npx tree-sitter generateRuns the corpus under test/:
npx tree-sitter testThis grammar is used by the zed-wolfram-highlighter extension to provide syntax highlighting in the Zed editor.
MIT