split macroexpand-1 logic to ease reading