On Wed, Jul 8, 2009 at 12:23, Neil Harris<[email protected]> wrote:

> {{#switch:
> {{#iferror: {{#expr: {{{1}}} + {{{2}}} }} | error | correct }}
> | error = that's an error
> | correct = {{{1}}} + {{{2}}} = {{#expr: {{{1}}} + {{{2}}} }}}}

{{#perl
if( error( eval( "$arg1+$arg2" ) ) ) {
 return "that's an error";
} else {
 return "1+2=", $arg1+$arg2;
}
}}

:-)

But really, any above cited language should work, the more easy to
parse (and to create an interpreter) the better. I guess a lua-like
language should be easy and readable.

-- 
 byte-byte,
    grin

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to