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

update deps, add widget_index!, improve examples/markdown #291

Merged
merged 4 commits into from
Mar 5, 2022
Merged

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Mar 4, 2022

  • Update dependencies (minor changes)
  • examples/markdown.rs: remove button and update on typing
  • add widget_index! macro for use within widget! macro

Comment on lines +59 to +63
fn visit_macro_mut(&mut self, node: &mut syn::Macro) {
// HACK: we cannot expand the macro here since we do not have an Expr
// to replace. Instead we can only modify the macro's tokens.
// WARNING: if the macro's tokens are modified before printing an error
// message is emitted then the span of that error message is incorrect.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is a bit hacky, but still works well enough. The only alternative (as far as I am aware) would be to match one level up, which would require matching both expressions and patterns (and maybe more) to catch everywhere the macro might be used.

@dhardy dhardy merged commit 48d9181 into master Mar 5, 2022
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