public ICLS_Expression Compiler_Expression_FunctionTrace(IList<Token> tlist, ICLS_Environment content, int pos, int posend)
{
if (tlist[pos + 1].type == TokenType.PUNCTUATION && tlist[pos + 1].text == "(")
return Compiler_Expression_Function(tlist, content, pos, posend);
int begin = pos + 1;
int dep;
int end = FindCodeAnyInFunc(tlist, ref begin, out dep);
if (end != posend)
{
return null;
}
CLS_Expression_Function func = new CLS_Expression_Function(pos, end, tlist[pos].line, tlist[end].line);
func.funcname = "trace";
do
{
ICLS_Expression param;
bool succ = Compiler_Expression(tlist, content, begin, end, out param);
if (succ && param != null)
{
func.listParam.Add(param);
func.tokenEnd = end;
func.lineEnd = tlist[end].line;
}
begin = end + 2;
end = FindCodeAnyInFunc(tlist, ref begin, out dep);
}
while (end < posend && begin <= end);
//ICLS_Expression param0;
//bool succ = Compiler_Expression(tlist,content, begin, end, out param0);
//if(succ&¶m0!=null)
//{
// func.listParam.Add(param0);
// return func;
//}
return func;
//trace ,单值直接dump,否则按逗号分隔的表达式处理
//return null;
}
public ICLS_Expression Compiler_Expression_FunctionThrow(IList<Token> tlist, ICLS_Environment content, int pos, int posend)