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:
paulc 2015-05-19 12:29:16 +00:00
parent 0ad3b6042b
commit a6887f0fd0
1 changed files with 14 additions and 0 deletions

View File

@ -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;