#[test]
fn print_sexp() {
let code = r#"<Hello attr="foo"></Hello>"#;
let mut parser = tree_sitter::Parser::new().unwrap();
let lang = tree_sitter_html::language().into();
parser.set_language(&lang).unwrap();
let tree = parser.parse(code, None).unwrap().unwrap();
let root = tree.root_node();
let sexp = root.to_sexp();
assert!(!sexp.contains("ERROR"));
println!("{sexp}");
}
fails even though the snippet is valid html, and parses correctly through the tree-sitter cli.
commenting out the vue module in in language/src/lib.rs fixes this which is odd as the test does not make use of any functionality outside of tree-sitter
It may be because the tree-sitter-vue module has it's own html parser that implements the same external scanner functions? (idk, haven't checked this properly yet)
this test:
fails even though the snippet is valid html, and parses correctly through the tree-sitter cli. commenting out the
vue
module in inlanguage/src/lib.rs
fixes this which is odd as the test does not make use of any functionality outside of tree-sitter