public override TypeNode EvaluateType(API api, TypeNode type, bool isStatic)
        {
            TypeNode tdn = primary.EvaluateType(api, null, true);

            if (tdn.getComparativeType() != Utils.Int && tdn.getComparativeType() != Utils.Float && tdn.getComparativeType() != Utils.Char)
            {
                Utils.ThrowError("Invalid operation. Cant make post unary expression of a type '" + tdn.ToString() + "'. " + token.getLine());
            }
            return(tdn);
        }
Exemple #2
0
        public override TypeNode EvaluateType(API api, TypeNode type, bool isStatic)
        {
            if (api.contextManager.currentContext.contextName == "if:line(58,17)" && this.primary.ToString() == "Name")
            {
                Console.Write("");
            }
            var      isStaticNew = isStatic;
            TypeNode t           = primary.EvaluateType(api, type, isStatic);

            if (nextExpression != null)
            {
                t = nextExpression.EvaluateType(api, t, api.isNextStaticContext);
            }

            returnType = t;
            return(t);
        }