コード例 #1
0
 public ICLS_Expression Compiler_Expression_NegativeLogic(IList<Token> tlist, CLS_Content 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_NegativeLogic v = new CLS_Expression_NegativeLogic(pos,expend2);
             v.listParam.Add(subvalue);
             return v;
         }
         else
         {
             LogError(tlist, "无法识别的取反表达式:", expbegin, posend);
             return null;
         }
     }
 }
コード例 #2
0
        public ICLS_Expression Compiler_Expression_NegativeLogic(IList <Token> tlist, CLS_Content 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_NegativeLogic v = new CLS_Expression_NegativeLogic(pos, expend2);
                    v.listParam.Add(subvalue);
                    return(v);
                }
                else
                {
                    LogError(tlist, "无法识别的取反表达式:", expbegin, posend);
                    return(null);
                }
            }
        }