Skip to content

Macro Rules practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 13 of 13

Title Difficulty
Accumulate enum variants in a recursive macro Hard
A mini DSL: compile-time expression evaluation Hard
Build vector, pattern-matching and map macros Medium
Classify syntax with macro fragment specifiers Medium
Count macro arguments with stable Rust Medium
Follow-set rules: why the compiler rejects your matcher Hard
Macro callbacks and token-tree bundles Hard
Macro hygiene: why your variable didn't leak Medium
Macro recursion and incremental TT munchers Hard
Macro repetition: lists and repeated values Easy
Nested repetition and zipping metavariables Hard
Preserve expression grouping in a macro Medium
Your first macro_rules!: matchers and transcribers Easy