AST.Dereference.GetExpr C# (CSharp) Метод

GetExpr() публичный Метод

public GetExpr ( ABT env ) : ABT.Expr
env ABT
Результат ABT.Expr
        public override ABT.Expr GetExpr(ABT.Env env) {
            ABT.Expr expr = this.Expr.GetExpr(env);

            if (expr.Type.Kind != ABT.ExprTypeKind.POINTER) {
                throw new InvalidOperationException("Expected a pointer.");
            }

            ABT.ExprType type = ((ABT.PointerType)expr.Type).RefType;
            if (type.Kind == ABT.ExprTypeKind.STRUCT_OR_UNION && !((ABT.StructOrUnionType)type).IsComplete) {
                throw new InvalidOperationException("Cannot dereference incomplete Type.");
            }

            return new ABT.Dereference(expr, type);
        }
    }