Extendable macro expander