9 Unspecced: do macros introduce a new CALLER frame? It seems like the
10 right answer is that closure macros should, but AST macros should not.
17 return $?CALLER::LINE;
20 macro ast_compiling_current_line () {
21 return quasi :COMPILING { current_line() };
24 macro ast_current_line () {
25 return quasi { current_line() };
30 macro closure_current_line () {
31 $closure_line = $?LINE; return { current_line() };
35 is current_line(), $?LINE,
36 'sanity check, caller can get $?LINE';
38 is ast_compiling_current_line, $?LINE,
39 'macros with COMPILING AST do not introduce new CALLER frame';
41 is ast_current_line, $?LINE,
42 'macros with AST do not introduce new CALLER frame';
44 is closure_current_line, $closure_line,
45 'macros with closures *do* introduce a new CALLER frame';