public override ABT.Expr GetExpr(ABT.Env env) {
ABT.Expr expr = this.Expr.GetExpr(env);
String name = this.Member;
if (expr.Type.Kind != ABT.ExprTypeKind.STRUCT_OR_UNION) {
throw new InvalidOperationException("Must get the attribute from a struct or union.");
}
ABT.Utils.StoreEntry entry = (expr.Type as ABT.StructOrUnionType).Attribs.First(_ => _.name == name);
ABT.ExprType type = entry.type;
return new ABT.Attribute(expr, name, type);
}
}