Skip to content

desugar: Add desugar dispatch for all desugars#3994

Merged
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
CohenArthur:dispatch-expr-desugars
Jul 24, 2025
Merged

desugar: Add desugar dispatch for all desugars#3994
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
CohenArthur:dispatch-expr-desugars

Conversation

@CohenArthur

Copy link
Copy Markdown
Member

Since we are doing more and more "external" desugars, as in desugars
that take a pointer and replace it with another one, rather than
modifying it from within, having an external visitor dispatch to the
proper desugar helps with code clarity.

gcc/rust/ChangeLog:

* Make-lang.in:
* ast/rust-desugar-question-mark.cc: Rework class
API.
* ast/rust-desugar-question-mark.h: Likewise.
* ast/rust-expression-yeast.cc: New file.
* ast/rust-expression-yeast.h: New file.

Since we are doing more and more "external" desugars, as in desugars
that take a pointer and replace it with another one, rather than
modifying it from within, having an external visitor dispatch to the
proper desugar helps with code clarity.

gcc/rust/ChangeLog:

	* Make-lang.in: Compile it.
	* rust-session-manager.cc: Call the expression desugar dispatcher.
	* ast/rust-desugar-question-mark.cc: Rework class API.
	* ast/rust-desugar-question-mark.h: Likewise.
	* ast/rust-expression-yeast.cc: New file.
	* ast/rust-expression-yeast.h: New file.
@CohenArthur CohenArthur force-pushed the dispatch-expr-desugars branch from be4f97d to 898ffd0 Compare July 22, 2025 11:41
@CohenArthur CohenArthur added this pull request to the merge queue Jul 24, 2025
Merged via the queue into Rust-GCC:master with commit f70b5e0 Jul 24, 2025
13 checks passed
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