Exemplo n.º 1
0
    public static bool _ObjectInvokeFunc(object ip, ELEMENT e, xmlScriptObj baseObj, STACKVAL stack, out object o)
    {
        o = null;
        if (ip == null)
        {
            throw new SystemException("ERROR THE PARENT OF THE FUNCTION IS NULL :" + e.ToString());
        }
        if (!e.isFUNCTION())
        {
            throw new SystemException("ERROR STATEMENT IS NOT FUNCTION :" + e.ToString());
        }
        var t = xmlScriptGetMethod.ObjectGetType(ip);

        object[] arglist = xmlScriptExecFunc.GetArgs(e, baseObj, stack);
        return(__InvokeFunc(e, arglist, ref o, e.raw, ip, t));
    }
Exemplo n.º 2
0
    static object _ObjectGetPropaty(object obj, ELEMENT ie, xmlScriptObj scrObj, STACKVAL stack)
    {
        object o = null;

        if (obj == null)
        {
            throw new SystemException("ERRPOR POINTERS HAS NULL:" + ie);
        }

        ELEMENT e = ie;

        if (ie.isPOINTER())
        {
            e = ie.GetPointerInside();
        }

        switch (e.group)
        {
        case GROUP.VARIABLE:
            if (e.isVARIABLE_ARRAY())
            {
                throw new SystemException("ERROR THE ARRAY IN THE MIDDLE OF POINTER ISN'T SUPPORTED.");
            }
            return(__ObjectGetPropaty(e, obj, e.raw));

        case GROUP.FUNCTION:
            if (_ObjectInvokeFunc(obj, e, scrObj, stack, out o))
            {
                return(o);
            }
            throw new SystemException("ERROR FUNCTION :" + e.ToString());

        default:
            throw new SystemException("ERROR NOT SUPPORTED :" + e.ToString());
        }
    }