macro infix:\ ($cont, $key) is parsed(/$?key := (-?<letter>\w* | \d+)/) { if $key ~~ /^\d+$/ { "($cont).[$key]"; } else { "($cont).«$key»"; } }
That does all the magic at compile time.
True, but what about $x\$y ? :-)
(which I'd want to work for consistency reasons.. so you can write $foo\bar\$baz\42 instead of ugly mixing like $foo\foo{baz}\42 )
-- Matthijs van Duin -- May the Forth be with you!