comment on hygienic context extension train fns
This commit is contained in:
parent
dc7f3df27f
commit
1a06584117
@ -1410,6 +1410,17 @@ pub fn expand_crate(parse_sess: @mut parse::ParseSess,
|
||||
return ret;
|
||||
}
|
||||
|
||||
// HYGIENIC CONTEXT EXTENSION:
|
||||
// all of these functions are for walking over
|
||||
// ASTs and making some change to the context of every
|
||||
// element that has one. a CtxtFn is a trait-ified
|
||||
// version of a closure in (SyntaxContext -> SyntaxContext).
|
||||
// the ones defined here include:
|
||||
// Renamer - add a rename to a context
|
||||
// MultiRenamer - add a set of renames to a context
|
||||
// Marker - add a mark to a context
|
||||
// Repainter - replace a context (maybe Replacer would be a better name?)
|
||||
|
||||
// a function in SyntaxContext -> SyntaxContext
|
||||
pub trait CtxtFn{
|
||||
fn f(&self, ast::SyntaxContext) -> ast::SyntaxContext;
|
||||
|
Loading…
x
Reference in New Issue
Block a user