Skip to content

Conversation

powerboat9
Copy link
Collaborator

This is a bit messy, but basing default AST visitation on a descriptive DSL is probably one of our best options for regularizing AST visitors. clang-format is disabled in ast/rust-ast-visitable-inner.h, since I'm not sure how to get it to handle the DSL well.

@powerboat9
Copy link
Collaborator Author

It looks like https://clang.llvm.org/docs/ClangFormatStyleOptions.html#macros would be useful, whenever we bump clang-format to version 17

@powerboat9 powerboat9 force-pushed the x-mac-2 branch 4 times, most recently from 4188adf to a700bfe Compare July 28, 2025 15:47
This should help us reduce mismatches between DefaultASTVisitor and
ExpandVisitor later.

clang-format is disabled for "ast/rust-ast-visitable-inner.h", as it
doesn't seem to handle the macro shenanagins used very well.

gcc/rust/ChangeLog:

	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Remove
	explicit definitions, use X macros.
	* ast/rust-ast-visitable-inner.h: New file.

Signed-off-by: Owen Avery <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant