diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 3a5b9f2f7c6..0e2fc4b59b5 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -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;