Factor macro argument parsing into helper methods and add support for .irp.