shift macro parsing out of generator