Overview
SHA1 Hash: | 94f038249932a60dc8394daefa51db46b273243f |
---|---|
Date: | 2010-11-26 16:14:27 |
User: | kinaba |
Comment: | changed the semantics of def foo(x @macro) {}, the @macro-layered parameter. - in @macro( foo(e) ), e is run in @macro (this is ok) - in @value( foo(e) ), e is run in (rawmacro)!! - in @rawmacro( foo(e) ), e is run in (rawmacro)!! |
Timelines: | family | ancestors | descendants | both | trunk |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [f65680e1d2]
- sym-trunk inherited from [f65680e1d2]
Changes
Modified polemy/eval.d from [1c0a1caee00496c7] to [47affa2343c633ca].
219 219 { 220 220 Table newCtx = new Table(f.definitionContext(), Table.Kind.NotPropagateSet); 221 221 foreach(i,p; f.params()) 222 222 if( p.layers.empty ) 223 223 newCtx.set(p.name, isMacroLayer(lay)?MacroLayer:lay, eval(args[i], lay, ctx)); 224 224 else 225 225 foreach(argLay; p.layers) 226 - newCtx.set(p.name, argLay, eval(args[i], argLay, ctx)); 226 + if( lay!=MacroLayer && isMacroLayer(argLay) ) // explicit @macro invokes (rawmacro) 227 + newCtx.set(p.name, argLay, eval(args[i], RawMacroLayer, ctx)); 228 + else 229 + newCtx.set(p.name, argLay, eval(args[i], argLay, ctx)); 227 230 scope _ = new PushCallStack(pos, callstackmsg); 228 231 return f.invoke(isMacroLayer(lay)?MacroLayer:lay, newCtx, pos); 229 232 } 230 233 throw genex!RuntimeException(pos, text("tried to call non-function: ",_f)); 231 234 } 232 235 233 236 Value lift(Value v, Layer lay, Table ctx, LexPosition pos)