From c1916adc7e16bd7ecd3ca8dbbe985ec75d0c825a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 24 Nov 2010 16:52:49 -0800 Subject: rustc: Parse type-parametric functions --- src/comp/front/ast.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/comp/front/ast.rs') diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index cc0f2961..3bc2fe16 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -7,6 +7,7 @@ import util.common.spanned; import util.common.ty_mach; type ident = str; +type ty_param = ident; type name_ = rec(ident ident, vec[@ty] types); type name = spanned[name_]; @@ -167,7 +168,7 @@ type variant = rec(str name, vec[@ty] args); type item = spanned[item_]; tag item_ { - item_fn(ident, _fn, def_id, ann); + item_fn(ident, _fn, vec[ty_param], def_id, ann); item_mod(ident, _mod, def_id); item_ty(ident, @ty, def_id, ann); item_tag(ident, vec[variant], def_id); -- cgit v1.2.3