Beispiel #1
0
        public static SteExpression ResetAsArrayAccess(this SteExpression expr, string arrayName, bool clearArgs = true)
        {
            var headSpecs = new SteArrayAccessHeadSpecs(arrayName);

            if (clearArgs)
            {
                expr.Reset(headSpecs);
            }
            else
            {
                expr.ResetHead(headSpecs);
            }

            return(expr);
        }
Beispiel #2
0
        public static SteExpression ResetAsOperator(this SteExpression expr, SteOperatorSpecs opHeadSpecs, bool clearArgs = true)
        {
            var headSpecs = opHeadSpecs;

            if (clearArgs)
            {
                expr.Reset(headSpecs);
            }
            else
            {
                expr.ResetHead(headSpecs);
            }

            return(expr);
        }
Beispiel #3
0
        public static SteExpression ResetAsFunction(this SteExpression expr, string funcName, bool clearArgs = true)
        {
            var headSpecs = new SteFunctionHeadSpecs(funcName);

            if (clearArgs)
            {
                expr.Reset(headSpecs);
            }
            else
            {
                expr.ResetHead(headSpecs);
            }

            return(expr);
        }