Skip to main content

has_syntax_error

Function has_syntax_error 

Source
pub fn has_syntax_error(tree: &Tree) -> bool
Expand description

true if any node in tree is a tree-sitter ERROR node - a syntax construct the grammar couldn’t make sense of. Callers use this to decide whether a file is safe to mechanically convert at all, or should be flagged for manual review instead of risking a partial/misleading translation.