1
Fork 0

Add AST node for pattern macros

This commit is contained in:
Keegan McAllister 2014-05-19 13:29:41 -07:00
parent 28a4ee5eeb
commit 5fdd0e4b05
12 changed files with 36 additions and 2 deletions

View file

@ -1731,7 +1731,12 @@ fn name_from_pat(p: &ast::Pat) -> String {
PatRange(..) => fail!("tried to get argument name from PatRange, \
which is not allowed in function arguments"),
PatVec(..) => fail!("tried to get argument name from pat_vec, \
which is not allowed in function arguments")
which is not allowed in function arguments"),
PatMac(..) => {
warn!("can't document the name of a function argument \
produced by a pattern macro");
"(argument produced by macro)".to_string()
}
}
}