Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new dump option to show node node as internal comment with a blacklist to ignore some node. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::begin_internal_comment): Add internal comment to print node beginning. (TokenCollector::end_internal_comment): Add internal comment to print node end. (TokenCollector::visit): Add the comments of the node visited. (TokenCollector::visit_closure_common): Likewise. (TokenCollector::visit_loop_common): Likewise. * ast/rust-ast-collector.h: Add internal comment as a nes Kind. * ast/rust-ast-dump.cc (Dump::Dump): add a Dump constructor to enable internal. * ast/rust-ast-dump.h: Add printing of internal comment in the dump * rust-session-manager.cc (Session::enable_dump): Activate ast dump and fill the blacklist. (Session::handle_internal_blacklist): Parse the flag to get node to be blacklisted. (Session::compile_crate): Launch ast dump internal when asked. (Session::dump_ast_pretty_internal): Call the visitor to dump the internals. * rust-session-manager.h (struct CompileOptions): add Interal in Dump option enum. Signed-off-by: Benjamin Thos <[email protected]>
- Loading branch information