Module syntax::ext::mtwt
[−]
[src]
rustc_private)Machinery for hygienic macros, as described in the MTWT[1] paper.
[1] Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler. 2012. Macros that work together: Compile-time bindings, partial expansion, and definition contexts. J. Funct. Program. 22, 2 (March 2012), 181-216. DOI=10.1017/S0956796812000093 http://dx.doi.org/10.1017/S0956796812000093
Reexports
pub use self::SyntaxContext_::*; |
Structs
| SCTable |
[Unstable] The SCTable contains a table of SyntaxContext_'s. It represents a flattened tree structure, to avoid having managed pointers everywhere (that caused an ICE). the mark_memo and rename_memo fields are side-tables that ensure that adding the same mark to the same context gives you back the same context as before. This shouldn't change the semantics--everything here is immutable--but it should cut down on memory use a lot; applying a mark to a tree containing 50 identifiers would otherwise generate 50 new contexts |
Enums
| SyntaxContext_ | [Unstable] |
Functions
| apply_mark |
[Unstable] Extend a syntax context with a given mark |
| apply_rename |
[Unstable] Extend a syntax context with a given rename |
| apply_renames |
[Unstable] Apply a list of renamings to a context |
| clear_tables |
[Unstable] Clear the tables from TLD to reclaim memory. |
| display_sctable |
[Unstable] Print out an SCTable for debugging |
| marksof |
[Unstable] Compute the marks associated with a syntax context. |
| outer_mark |
[Unstable] Return the outer mark for a context with a mark at the outside. FAILS when outside is not a mark. |
| reset_tables |
[Unstable] Reset the tables to their initial state |
| resolve |
[Unstable] Resolve a syntax object to a name, per MTWT. |
| with_sctable |
[Unstable] Fetch the SCTable from TLS, create one if it doesn't yet exist. |
Type Definitions
| RenameList |
[Unstable] A list of ident->name renamings |