rustc: Implement "deriving" for monomorphic structs via a syntax extension. r=brson

This commit is contained in:
Patrick Walton
2012-11-19 18:05:50 -08:00
parent 8f22582e9f
commit a7aecc46a5
6 changed files with 450 additions and 0 deletions

View File

@@ -97,6 +97,9 @@ fn syntax_expander_table() -> HashMap<~str, syntax_extension> {
ext::log_syntax::expand_syntax_ext));
syntax_expanders.insert(~"ast",
builtin(ext::qquote::expand_ast));
syntax_expanders.insert(~"deriving_eq",
item_decorator(
ext::deriving::expand_deriving_eq));
// Quasi-quoting expanders
syntax_expanders.insert(~"quote_tokens",