Closed pzread closed 2 weeks ago
Zed also assumes the scanner file name is scanner.c
when compiling tree-sitter by itself (https://github.com/zed-industries/zed/blob/b386b6c2375dc623d123ea4acbf701af907d8856/crates/extension/src/extension_builder.rs#L235).
I'm not sure if Zed's way is the best practice, but rewriting scanner in C also makes it possible to directly be used in Zed extension
Thanks!
Tree-sitter has deprecated C++ scanner (https://tree-sitter.github.io/tree-sitter/creating-parsers#external-scanners) and recommends writing scanner in C