Esempio n. 1
0
        public override SemanticCheckResult VisitIsvoid(ASTIsVoidNode IsVoid)
        {
            var res = IsVoid.Expression.Accept(this);

            IsVoid.SemanticCheckResult.EnsureReturnType(CompilationUnit.TypeEnvironment.Bool);
            return(IsVoid.SemanticCheckResult);
        }
Esempio n. 2
0
        public ASTCILNode VisitIsvoid(ASTIsVoidNode IsVoid)
        {
            var exp = (ASTCILExpressionNode)IsVoid.Expression.Accept(this);

            if (IsVoid.Expression.SemanticCheckResult.Type == compilationUnit.TypeEnvironment.Int || IsVoid.Expression.SemanticCheckResult.Type == compilationUnit.TypeEnvironment.Bool)
            {
                return(new ASTCILIsVoidNode(new ASTCILBoxingNode(exp, IsVoid.Expression.SemanticCheckResult.Type)));
            }
            return(new ASTCILIsVoidNode(exp));
        }
 public virtual T VisitIsvoid(ASTIsVoidNode IsVoid)
 {
     IsVoid.Expression.Accept(this);
     return(default(T));
 }