PEG.jl
PEG.jl copied to clipboard
File locations in production rules
In a production function (e.g. the rhs of > or |>) is it possible to get the location in the file that's currently being parsed? It would be very useful to be able to extract ideally byte ranges, or at least a character-line position a la the error message for use in downstream error messages. I tried to figure out how to get this information out of the same logic that's used to generate the error messages but it doesn't seem to be present in the production rule logic?