--- parser3/src/classes/op.C 2001/05/21 17:17:11 1.23 +++ parser3/src/classes/op.C 2001/05/23 07:37:01 1.26 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: op.C,v 1.23 2001/05/21 17:17:11 parser Exp $ + $Id: op.C,v 1.26 2001/05/23 07:37:01 parser Exp $ */ #include "classes.h" @@ -52,9 +52,9 @@ static void _if(Request& r, const String 0/*no name*/, false/*don't intercept string*/).as_bool(); if(condition) - r.write_pass_lang(r.process(params->get(1))); + r.write_pass_lang(r.process(params->get_junction(1, "'then' parameter must be code"))); else if(params->size()==3) - r.write_pass_lang(r.process(params->get(2))); + r.write_pass_lang(r.process(params->get_junction(2, "'else' parameter must be code"))); } static void _untaint(Request& r, const String& method_name, MethodParams *params) { @@ -331,7 +331,7 @@ MOP::MOP(Pool& apool) : Methoded(apool), add_native_method("process", Method::CT_ANY, _process, 1, 1); // ^rem{code} - add_native_method("rem", Method::CT_ANY, _rem, 1, 1); + add_native_method("rem", Method::CT_ANY, _rem, 1, 1000); // ^while(condition){code} add_native_method("while", Method::CT_ANY, _while, 2, 2);