macro empty {}
macro arg1 $a { arg1 invoked with $a; } # should not recurse
macro arg2 $a $b { arg2 { arg1 $a; arg1 $b; empty; } }
macro arg3 $a $b $c { arg3 { arg2 $a $b; arg1 $c; } }

empty;
arg1 argument;
arg2 argument1 argument2;
arg3 x y z;

# nested & conditional macro definitions
macro toplevel $arg {
    pre_if $arg ~ (a) {
        macro nested {
            toplevel was called with $arg and contains $1;
        }
    }
    nested;
}
toplevel b;
toplevel hallo;
nested; # not available here

macro multi $first @rest &block {
    first $first;
    rest @rest;
    cnt $#rest $#{rest} $#{rest,x};
    invisible $invisible;
    pre_set $nested_var 1;
    block { &block; }
    pre_if $#rest == 0 {
        no additional args;
    }
}
pre_set $invisible 'this variable isn\'t visible';
pre_set $quot He\ 'lo;
multi a1 { empty; }
multi $quot a2 $quot { arg1 $quot; no $nested_var here; }
