Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dump option to show node #3212

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 22, 2024

  1. Add dump option to show node

    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]>
    Kamiinarii committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    9e874a5 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. WIP: internal_comment

    Kamiinarii committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    2043132 View commit details
    Browse the repository at this point in the history