Ejemplo n.º 1
0
        /// <summary>
        /// Validate a cast expression.
        /// </summary>
        /// <param name="cexp">
        ///            is the expression. </param>
        /// <returns> null. </returns>
        public virtual object visit(CastExpr cexp)
        {
            printBinExpr("CAST", cexp);

            SingleType st   = (SingleType)cexp.right();
            QName      type = st.type();

            [email protected] qName = type.asQName();
            Function f = _sc.resolveFunction(qName, 1);

            if (f == null)
            {
                reportError(new StaticFunctNameError("Type does not exist: " + type.ToString()));
            }
            cexp.set_function(f);
            _resolvedFunctions.Add(qName);

            return(null);
        }
Ejemplo n.º 2
0
 /// <param name="cexp">
 ///            is the cast expression. </param>
 /// <returns> cexp. </returns>
 public virtual object visit(CastExpr cexp)
 {
     cexp.left().accept(this);
     cexp.right().accept(this);
     return(null);
 }