Auto stash before rebase of "relpace_lsp_with_rust" onto "origin/relpace_lsp_with_rust"
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use tree_sitter::Parser;
|
||||
use analysis::collect_procs;
|
||||
|
||||
fn main() {
|
||||
let src = r#"namespace eval foo {
|
||||
proc bar {x y} { return $x }
|
||||
}
|
||||
proc top {} {}
|
||||
"#;
|
||||
let mut parser = Parser::new();
|
||||
parser
|
||||
.set_language(&tree_sitter_tcl::LANGUAGE.into())
|
||||
.expect("load tcl grammar");
|
||||
let tree = parser.parse(src, None).expect("parse");
|
||||
println!("tree: {}", tree.root_node().to_sexp());
|
||||
let procs = collect_procs(&tree, src);
|
||||
println!("found {} procs via collect_procs", procs.len());
|
||||
for p in procs {
|
||||
println!("- {} {:?}", p.name, p.params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user