예제 #1
0
        public ICLS_Expression Compiler_Expression_NegativeValue(IList <Token> tlist, ICLS_Environment content, int pos, int posend)
        {
            int expbegin = pos;
            int bdep;
            int expend2 = FindCodeAny(tlist, ref expbegin, out bdep);

            if (expend2 != posend)
            {
                LogError(tlist, "无法识别的负号表达式:", expbegin, posend);
                return(null);
            }
            else
            {
                ICLS_Expression subvalue;
                bool            succ = Compiler_Expression(tlist, content, expbegin, expend2, out subvalue);
                if (succ && subvalue != null)
                {
                    CLS_Expression_NegativeValue v = new CLS_Expression_NegativeValue(pos, expend2, tlist[pos].line, tlist[expend2].line);
                    v.listParam.Add(subvalue);
                    return(v);
                }
                else
                {
                    LogError(tlist, "无法识别的负号表达式:", expbegin, posend);
                    return(null);
                }
            }
        }
 public ICLS_Expression Compiler_Expression_NegativeValue(IList<Token> tlist, ICLS_Environment content, int pos, int posend)
 {
     int expbegin = pos;
     int bdep;
     int expend2 = FindCodeAny(tlist, ref expbegin, out bdep);
     if (expend2 != posend)
     {
         LogError(tlist,"无法识别的负号表达式:" ,expbegin , posend);
         return null;
     }
     else
     {
         ICLS_Expression subvalue;
         bool succ = Compiler_Expression(tlist,content, expbegin, expend2, out subvalue);
         if (succ && subvalue != null)
         {
             CLS_Expression_NegativeValue v = new CLS_Expression_NegativeValue(pos, expend2, tlist[pos].line, tlist[expend2].line);
             v.listParam.Add(subvalue);
             return v;
         }
         else
         {
             LogError(tlist, "无法识别的负号表达式:", expbegin, posend);
             return null;
         }
     }
 }
예제 #3
0
 public ICLS_Expression Compiler_Expression_NegativeValue(IList<Token> tlist, ICLS_Environment content, int pos, int posend)
 {
     ICLS_Expression subvalue;
     bool succ = Compiler_Expression(tlist, content, pos, posend, out subvalue);
     if (succ && subvalue != null)
     {
         CLS_Expression_NegativeValue v = new CLS_Expression_NegativeValue(pos, posend, tlist[pos].line, tlist[posend].line);
         v.listParam.Add(subvalue);
         return v;
     }
     else
     {
         LogError(tlist, "无法识别的负号表达式:", pos, posend);
         return null;
     }
 }
예제 #4
0
        public ICLS_Expression Compiler_Expression_NegativeValue(IList <Token> tlist, ICLS_Environment content, int pos, int posend)
        {
            ICLS_Expression subvalue;
            bool            succ = Compiler_Expression(tlist, content, pos, posend, out subvalue);

            if (succ && subvalue != null)
            {
                CLS_Expression_NegativeValue v = new CLS_Expression_NegativeValue(pos, posend, tlist[pos].line, tlist[posend].line);
                v.listParam.Add(subvalue);
                return(v);
            }
            else
            {
                LogError(tlist, "无法识别的负号表达式:", pos, posend);
                return(null);
            }
        }