Beispiel #1
0
        public ICLS_Expression Compiler_Expression_Set(IList <Token> tlist, ICLS_Environment content, int pos, int posend)
        {
            int expbegin = pos + 2;
            int bdep;
            int expend = FindCodeAny(tlist, ref expbegin, out bdep);

            if (expend != posend)
            {
                expend = posend;
            }
            ICLS_Expression v;
            bool            succ = Compiler_Expression(tlist, content, expbegin, expend, out v);

            if (succ && v != null)
            {
                CLS_Expression_SetValue define = new CLS_Expression_SetValue(pos, expend, tlist[pos].line, tlist[expend].line);
                define.value_name = tlist[pos].text;
                define.listParam.Add(v);
                return(define);
            }
            LogError(tlist, "不正确的定义表达式:", pos, posend);
            return(null);
        }
 public ICLS_Expression Compiler_Expression_Set(IList<Token> tlist, ICLS_Environment content, int pos, int posend)
 {
     int expbegin = pos + 2;
     int bdep;
     int expend = FindCodeAny(tlist, ref expbegin, out bdep);
     if (expend != posend)
     {
       
         expend = posend;
     }
     ICLS_Expression v;
     bool succ = Compiler_Expression(tlist,content, expbegin, expend, out v);
     if (succ && v != null)
     {
         CLS_Expression_SetValue define = new CLS_Expression_SetValue(pos, expend, tlist[pos].line, tlist[expend].line);
         define.value_name = tlist[pos].text;
         define.listParam.Add(v);
         return define;
     }
     LogError(tlist,"不正确的定义表达式:" ,pos,posend);
     return null;
 }