collect paths for enum and struct patterns