public override ResolveResult Resolve(CppResolver resolver)
        {
            ResolveResult lhs = left.Resolve(resolver);
            ResolveResult rhs = right.Resolve(resolver);

            return(resolver.ResolveBinaryOperator(operatorType, lhs, rhs));
        }
Exemple #2
0
        bool AreEqualConstants(ResolveResult c1, ResolveResult c2)
        {
            if (c1 == null || c2 == null || !c1.IsCompileTimeConstant || !c2.IsCompileTimeConstant)
            {
                return(false);
            }
            CppResolver   r = new CppResolver(typeResolveContext);
            ResolveResult c = r.ResolveBinaryOperator(BinaryOperatorType.Equality, c1, c2);

            return(c.IsCompileTimeConstant && (c.ConstantValue as bool?) == true);
        }