diff options
Diffstat (limited to 'src/comp/syntax/ext/base.rs')
| -rw-r--r-- | src/comp/syntax/ext/base.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/syntax/ext/base.rs b/src/comp/syntax/ext/base.rs index 824931a759b..415c6cb5d9b 100644 --- a/src/comp/syntax/ext/base.rs +++ b/src/comp/syntax/ext/base.rs @@ -118,6 +118,13 @@ fn make_new_lit(cx: ext_ctxt, sp: codemap::span, lit: ast::lit_) -> ret @{id: cx.next_id(), node: ast::expr_lit(sp_lit), span: sp}; } +fn get_mac_arg(cx: ext_ctxt, sp: span, arg: ast::mac_arg) -> @ast::expr { + alt (arg) { + some(expr) {expr} + none {cx.span_fatal(sp, "missing macro args")} + } +} + fn get_mac_body(cx: ext_ctxt, sp: span, args: ast::mac_body) -> ast::mac_body_ { |
