Skip to content
Snippets Groups Projects
Commit 3b5fb3f8 authored by Jakub Dupak's avatar Jakub Dupak Committed by Arthur Cohen
Browse files

gccrs: ast: transform helper methods to visits and add methods to simplify repeated patterns


gcc/rust/ChangeLog:

	* ast/rust-ast-dump.cc (Dump::go): Use new API.
	(Dump::format_function_param): Refactor.
	(Dump::visit_items_joined_by_separator): New function.
	(Dump::emit_attrib): Refactor.
	(Dump::visit_as_line): New function.
	(Dump::visit_items_as_lines): Likewise.
	(Dump::visit_items_as_block): Likewise.
	(Dump::visit): Use new API.
	(Dump::emit_visibility): Likewise.
	(Dump::emit_indented_string): Likewise.
	(Dump::emit_generic_params): Likewise.
	(Dump::format_tuple_field): Likewise.
	(Dump::format_struct_field): Likewise.
	(Dump::format_function_common): Likewise.
	(Dump::visit_function_common): Likewise.
	* ast/rust-ast-dump.h: Declare new functions and add documentation.

Signed-off-by: default avatarJakub Dupak <dev@jakubdupak.com>
parent aedd97a5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment