Why Tree-Sitter Is Inadequate for Program Analysis
Summary
The Cubix article argues that Tree-sitter is inadequate for program analysis because it discards essential tokens and structural information, making AST-level analysis and transformation difficult. It contrasts CSTs with ASTs, highlights major issues such as anonymous nodes and lack of round-tripping, and positions Tree-sitter primarily as a fast tokenizer rather than a tool for semantic analysis, using Cubix’s approach as an alternative.