[][src]Module rustc_span::hygiene

Machinery for hygienic macros.

Inspired by Matthew Flatt et al., “Macros That Work Together: Compile-Time Bindings, Partial Expansion, and Definition Contexts,” Journal of Functional Programming 22, no. 2 (March 1, 2012): 181–216, https://doi.org/10.1017/S0956796812000093.

Structs

ExpnData

A subset of properties from both macro definition and macro call available through global data. Avoid using this if you have access to the original definition or call structures.

ExpnId

A unique ID associated with a macro invocation and expansion.

HygieneData
HygieneDecodeContext

Additional information used to assist in decoding hygiene data

HygieneEncodeContext
SyntaxContext

A SyntaxContext represents a chain of pairs (ExpnId, Transparency) named "marks".

SyntaxContextData

Enums

AstPass

The kind of AST transform.

DesugaringKind

The kind of compiler desugaring.

ExpnDataDecodeMode
ExpnDataEncodeMode
ExpnKind

Expansion kind.

ForLoopLoc

A location in the desugaring of a for loop

MacroKind

The kind of macro invocation or definition.

Transparency

A property of a macro expansion that determines how identifiers produced by that expansion are resolved.

Functions

clear_syntax_context_map
debug_hygiene_data
decode_expn_id
decode_syntax_context
for_all_ctxts_in
for_all_data
for_all_expn_data
for_all_expns_in
num_syntax_ctxts
raw_encode_expn_id
raw_encode_syntax_context
update_dollar_crate_names
walk_chain