]> git.lizzy.rs Git - rust.git/commitdiff
comment on hygienic context extension train fns
authorJohn Clements <clements@racket-lang.org>
Sat, 13 Jul 2013 17:18:37 +0000 (10:18 -0700)
committerJohn Clements <clements@racket-lang.org>
Fri, 6 Sep 2013 20:35:13 +0000 (13:35 -0700)
src/libsyntax/ext/expand.rs

index 3a5b9f2f7c674c2832868041170e8103291d5955..0e2fc4b59b593d550b3b990bad11536f143b4fa6 100644 (file)
@@ -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;