Skip to content

Commit 1a06584

Browse files
committed
comment on hygienic context extension train fns
1 parent dc7f3df commit 1a06584

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,17 @@ pub fn expand_crate(parse_sess: @mut parse::ParseSess,
14101410
return ret;
14111411
}
14121412

1413+
// HYGIENIC CONTEXT EXTENSION:
1414+
// all of these functions are for walking over
1415+
// ASTs and making some change to the context of every
1416+
// element that has one. a CtxtFn is a trait-ified
1417+
// version of a closure in (SyntaxContext -> SyntaxContext).
1418+
// the ones defined here include:
1419+
// Renamer - add a rename to a context
1420+
// MultiRenamer - add a set of renames to a context
1421+
// Marker - add a mark to a context
1422+
// Repainter - replace a context (maybe Replacer would be a better name?)
1423+
14131424
// a function in SyntaxContext -> SyntaxContext
14141425
pub trait CtxtFn{
14151426
fn f(&self, ast::SyntaxContext) -> ast::SyntaxContext;

0 commit comments

Comments
 (0)