Ejemplo n.º 1
0
        internal static CTFUnaryExpression Parse(TokParser tp)
        {
            CTFPrimaryExpression cpe = CTFPrimaryExpression.Parse(tp);

            if (cpe == null)
            {
                return(null);
            }

            CTFUnaryExpression cp = new CTFUnaryExpression(cpe);

            while (tp.Match(Token.EnumId.DOT))
            {
                cp.element = cp.element + "." + tp.GetIden();
            }

            if (tp.Match(Token.EnumId.OPENBRAC))
            {
                CTFUnaryExpression cue = Parse(tp);
                if (cue == null)
                {
                    throw new CTFException();
                }

                tp.MustBe(Token.EnumId.CLOSEBRAC);

                cp.cue = cue;
            }

            return(cp);
        }
Ejemplo n.º 2
0
 private CTFUnaryExpression(CTFPrimaryExpression cpe)
 {
     this.cpe = cpe;
     element  = "";
 }