If you give the --output/-o option — as opposed to sticking with the stdout default — you can pair it with the --map option to produce an ECMA Source Map v3 format .map file alongside the --output file.
Although this format is associated with JavaScript, especially in conjunction with transpilers and compilers from other languages like Typescript, there are tools flexible enough to accept the niche file formats that rejig consumes and produces. All they care about is that the files on both sides of the mapping are text, and that the map file is in the right format.
I am not in a good position to recommend tools with this power, but in developing this feature, I made good use of Evan Wallace’s Source Map Visualization web app. Simply click its Upload Files button, then select both the --output file and the paired .map file. The latter includes the input text, so you don’t need to include that. (Indeed, it will get upset if you give it 3 files.)
What you get from this is a visual display showing how the input relates to the output for any combination of rejig text I/O formats. This feature’s value hits a maximum for RePIG input since the output form will differ considerably, but it can be informative even when you’re using rejig to translate between closely-related formats. For instance, it can help you detect when rejig is substituting a single op from the input for two or more ops in the output to paper over a feature gap.
(You may now wish to return to the rejig home page.)
License
This work is © 2026 by Warren Young and is licensed under CC BY-NC-SA 4.0