Skip to content

Commit dd9f25e

Browse files
committed
clang: Print the semantic parent when dumping the AST.
1 parent 18a7d3e commit dd9f25e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/clang.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,13 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
14981498
&specialized);
14991499
}
15001500
}
1501+
1502+
if let Some(parent) = c.fallible_semantic_parent() {
1503+
println!("");
1504+
print_cursor(depth,
1505+
String::from(prefix) + "semantic-parent.",
1506+
&parent);
1507+
}
15011508
}
15021509

15031510
fn print_type<S: AsRef<str>>(depth: isize, prefix: S, ty: &Type) {

0 commit comments

Comments
 (0)