semantic: Implement getAttribute for classes and structs.