Skip to content

Instantly share code, notes, and snippets.

@jbclements
Created January 22, 2013 23:52
Show Gist options
  • Save jbclements/4600076 to your computer and use it in GitHub Desktop.
Save jbclements/4600076 to your computer and use it in GitHub Desktop.
let maybe_it = match expanded {
mr_item(it) => fld.fold_item(it),
mr_expr(_) => cx.span_fatal(pth.span,
~"expr macro in item position: "
+ *extname),
mr_any(_, item_maker, _) =>
option::chain(item_maker(), |i| {fld.fold_item(i)}),
MacroDef(ref mdef) => {
exts.insert((*mdef).name, (*mdef).ext);
None
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment