add hygiene support fns, move them around.

also adds test cases
This commit is contained in:
John Clements
2013-06-25 11:40:51 -07:00
parent 7fd5bdcb9a
commit fa6c981606
5 changed files with 176 additions and 61 deletions

View File

@@ -825,9 +825,6 @@ pub fn pat_is_ident(pat: @ast::Pat) -> bool {
// HYGIENE FUNCTIONS
/// Construct an identifier with the given name and an empty context:
pub fn new_ident(name: Name) -> Ident { Ident {name: name, ctxt: 0}}
/// Extend a syntax context with a given mark
pub fn new_mark(m:Mrk, tail:SyntaxContext) -> SyntaxContext {
new_mark_internal(m,tail,get_sctable())