CSLE.CLS_Expression_Compiler.Compiler_Expression_IndexFind C# (CSharp) Method

Compiler_Expression_IndexFind() public method

public Compiler_Expression_IndexFind ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression
        public ICLS_Expression Compiler_Expression_IndexFind(IList<Token> tlist, ICLS_Environment content, int pos, int posend)
        {
            CLS_Expression_IndexFind func = new CLS_Expression_IndexFind(pos, posend, tlist[pos].line, tlist[posend].line);
            ICLS_Expression lefv;
            bool b = Compiler_Expression(tlist, content, pos, pos, out lefv);
            if (b) 
            {
                func.listParam.Add(lefv);
            }
            //func.funcname = tlist[pos].text;
            int begin = pos + 2;
            int dep;
            int end = FindCodeAny(tlist, ref begin, out dep);

            if (tlist[pos + 1].type == TokenType.PUNCTUATION && tlist[pos + 1].text == "[")
            {
                do
                {
                    ICLS_Expression param;
                    bool succ = Compiler_Expression(tlist, content, begin, end, out param);
                    if (succ && param != null)
                    {
                        func.tokenEnd = end;
                        func.lineEnd = tlist[end].line;
                        func.listParam.Add(param);
                    }
                    begin = end + 2;
                    end = FindCodeAny(tlist, ref begin, out dep);

                }
                while (end < posend && begin <= end);


                return func;
            }
            //一般函数
            return null;
        }
    }