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

Polish the macro interface #506

Merged
merged 6 commits into from
Jan 6, 2025
Merged

Polish the macro interface #506

merged 6 commits into from
Jan 6, 2025

Conversation

yihozhang
Copy link
Collaborator

This PR does a few small things:

  • Make parsing-related functions public and make them member functions of Parser
  • Make the macro type a trait- the current macro type is defined as a fn, which has to be static (e.g., no captured values from the environment nor dynamic behavior)
  • Add a few convenience methods so it's usable from outside the crate

@yihozhang yihozhang requested a review from a team as a code owner January 5, 2025 08:09
@yihozhang yihozhang requested review from FTRobbin and Alex-Fischman and removed request for a team and FTRobbin January 5, 2025 08:09
Copy link

codspeed-hq bot commented Jan 5, 2025

CodSpeed Performance Report

Merging #506 will not alter performance

Comparing yihozhang-polish-macros (63520b9) with main (2dfd4f3)

Summary

✅ 9 untouched benchmarks

make macro take a mutable parser for symbol_gen
rename methods
src/ast/parse.rs Outdated Show resolved Hide resolved
src/ast/parse.rs Outdated Show resolved Hide resolved
src/ast/parse.rs Show resolved Hide resolved
src/ast/parse.rs Outdated Show resolved Hide resolved
src/ast/parse.rs Show resolved Hide resolved
Copy link
Collaborator

@Alex-Fischman Alex-Fischman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yihozhang yihozhang merged commit 802c87b into main Jan 6, 2025
9 checks passed
@Alex-Fischman Alex-Fischman deleted the yihozhang-polish-macros branch January 6, 2025 16:41
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.

2 participants