Tree-sitter grammar rejects documented backtick prompt syntax
Problem
The published Tree-sitter grammar mirror at BoundaryML/baml-treesitter@276b4d8471f1c2f2ce80f182ab46d171b825f2b7 rejects the interpolated backtick prompt syntax shown in the BAML 0.20.1 release note: https://boundaryml.com/blog/baml-0.20.1
The mirror README directs grammar fixes to this monorepo. Its grammar.js currently defines prompt_field with field('value', $.raw_string), which accepts #"..."# but not the documented backtick form.
Minimal example
function extract(text: string) -> string {
client: "openai/gpt-5.6-luna"
prompt: `${text}`
}With the mirror's generated src/parser.c compiled against Tree-sitter 0.26, the root node has has_error == True; the ERROR node covers prompt:. Replacing the prompt with prompt: #"hi"# parses without an error. The grammar reports ABI 15, so this is syntax coverage rather than a runtime ABI mismatch.
Expected
The official grammar parses documented, valid BAML 0.20.1 prompt syntax without an ERROR node and the read-only mirror is regenerated. A corpus case for the documented form would prevent drift.
This blocks exact structural parsing for .baml files in Consiliency/treesitter-chunker; a local compatibility shim may be needed until the upstream mirror includes the form.
Source: BoundaryML/baml