diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2014-08-01 17:11:53 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2014-08-13 17:40:15 +0200 |
| commit | c3ce245ba68f62edfc5818f003b2b78a02ce5c03 (patch) | |
| tree | 0be1530cc0bd24d38a1f8f9d80d196e75be26a60 /src/rustllvm/RustWrapper.cpp | |
| parent | 9d554212de0398ac044e6d815da3bfb184831e77 (diff) | |
| download | rust-c3ce245ba68f62edfc5818f003b2b78a02ce5c03.tar.gz rust-c3ce245ba68f62edfc5818f003b2b78a02ce5c03.zip | |
quote_expr macro: embed Ident using special encoding that preserves hygiene.
This adds support to `quote_expr!` and friends for round-trip hygienic preservation of Ident. Here are the pieces of the puzzle: * adding a method for encoding Ident for re-reading into token tree. * Support for reading such encoded Idents in the lexer. Note that one must peek ahead for MOD_SEP after scan_embedded_hygienic_ident. * To ensure that encoded Idents are only read when we are in the midst of expanding a `quote_expr` or similar, added a `read_embedded_ident` flag on `StringReader`. * pprust support for encoding Ident's as (uint,uint) pairs (for hygiene).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
