January 2019
Beginner to intermediate
554 pages
13h 31m
English
Before we build more complex macros, it's important to become familiar with the valid inputs that macro_rules! can take. Since macro_rules! work at the syntactic level, it needs to provide users, a handle to these syntactic elements, and distinguish what can and cannot be included within a macro and how we can interact with them.
The following are some important token tree types that you can pass into a macro as input:
{ silly; things; }
This block includes the statements silly and things.
Read now
Unlock full access