Allow the return {inline:object}; syntax.
git-svn-id: http://voip.null.ro/svn/yate@5975 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
0ad3b6042b
commit
a6887f0fd0
|
@ -1378,6 +1378,20 @@ bool JsCode::getInstruction(ParsePoint& expr, char stop, GenObject* nested)
|
|||
case ';':
|
||||
case '}':
|
||||
break;
|
||||
case '{':
|
||||
{
|
||||
saved = expr;
|
||||
JsObject* jso = parseObject(expr,false,0);
|
||||
if (!jso)
|
||||
return gotError("Expecting valid object",saved);
|
||||
if (skipComments(expr) != ';') {
|
||||
TelEngine::destruct(jso);
|
||||
return gotError("Expecting ';'",expr);
|
||||
}
|
||||
addOpcode(new ExpWrapper(ExpEvaluator::OpcCopy,jso));
|
||||
pop = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!runCompile(expr,';'))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue