Skip to content

Commit

Permalink
Procedural macros
Browse files Browse the repository at this point in the history
This RFC proposes an evolution of Rust's procedural macro system (aka syntax
extensions, aka compiler plugins). This RFC specifies syntax for the definition
of procedural macros, a high-level view of their implementation in the compiler,
and outlines how they interact with the compilation process.

At the highest level, macros are defined by implementing functions marked with
a `#[macro]` attribute. Macros operate on a list of tokens provided by the
compiler and return a list of tokens that the macro use is replaced by. We
provide low-level facilities for operating on these tokens. Higher level
facilities (e.g., for parsing tokens to an AST) should exist as library crates.
  • Loading branch information
nrc committed Apr 1, 2016
1 parent 1fea0c8 commit 9c42f45
Showing 1 changed file with 417 additions and 0 deletions.
Loading

0 comments on commit 9c42f45

Please sign in to comment.