Convert custom attributes to macros.