spade_hir/
testutil.rs

1/// A declared type.
2/// The type name is the name as declared in the symtab which must be in scope with
3/// the name `symtab`
4#[macro_export]
5macro_rules! dtype {
6    ($symtab:expr => $base:expr$(; ($($arg:expr),*) )?) => {
7        hir::TypeSpec::Declared(
8            $symtab.lookup_id(&ast_path($base)).unwrap().nowhere(),
9            vec![ $( $( $arg ),* )? ]
10        ).nowhere()
11    }
12}
13
14#[macro_export]
15macro_rules! hparams {
16    ($(($name:expr, $type:expr)),*$(,)?) => {
17        hir::ParameterList(vec![$(hir::Parameter{name: ast_ident($name), ty: $type, no_mangle: None}),*])
18    }
19}