Macro parsing
diff --git a/src/expr.rs b/src/expr.rs
index 2865c2c..e3e4e55 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -346,6 +346,7 @@
use ident::parsing::ident;
use item::parsing::item;
use lit::parsing::lit;
+ use mac::parsing::mac;
use nom::IResult::Error;
use ty::parsing::{mutability, path, qpath, ty};
@@ -388,7 +389,8 @@
expr_continue
|
expr_ret
- // TODO: Mac
+ |
+ expr_mac
|
expr_repeat
) >>
@@ -429,6 +431,8 @@
(e)
));
+ named!(expr_mac -> Expr, map!(mac, Expr::Mac));
+
named!(expr_paren -> Expr, do_parse!(
punct!("(") >>
e: expr >>
@@ -876,9 +880,12 @@
// TODO: Lit
// TODO: Range
// TODO: Vec
- // TODO: Mac
+ |
+ pat_mac
));
+ named!(pat_mac -> Pat, map!(mac, Pat::Mac));
+
named!(pat_wild -> Pat, map!(keyword!("_"), |_| Pat::Wild));
named!(pat_ident -> Pat, do_parse!(