tree-sitter-faust
April 11, 2026 ยท View on GitHub
Tree-sitter grammar for the Faust audio programming language.
Every Faust syntax feature should be supported. If you encounter any errors parsing a valid Faust program, please file an issue and I'll fix it! Also, please file an issue or pull request if you have any suggestions for improving the grammar.
The npm package is here.
Python
pip install tree-sitter-faust[core]
from tree_sitter import Language, Parser
from tree_sitter_faust import language
code = 'import("stdfaust.lib"); process = os.osc(440) * 0.5;'
parser = Parser(Language(language()))
tree = parser.parse(code.encode())
Bundled queries are also available as HIGHLIGHTS_QUERY, INJECTIONS_QUERY, and LOCALS_QUERY.
Install nvim-treesitter language parser
The parser and queries are available as an nvim-treesitter language.
Install with the nvim command:
:TSInstall faust
Commands
$ npm run build # generate and build
$ npm run generate # tree-sitter generate
$ npm test # tree-sitter test
$ npm run parse # tree-sitter parse
See tree-sitter's documentation for details on tree-sitter CLI commands.
Resources
- Faust syntax documentation
- Faust Bison parser and Flex lexer source
- Faust box-tester
TODO
- Add
playgroundscript fortree-sitter build-wasm && tree-sitter web-ui?- Saw this here