This patch adds a new method that returns positions of the first and the last bytes of a Token (byte span).
It comes in handy e.g. when building smart code viewer apps (PPI::Element->location() is not precise enough) or working with code analysis libraries (all libraries I'm aware of require byte offsets).
This patch adds a new method that returns positions of the first and the last bytes of a Token (byte span). It comes in handy e.g. when building smart code viewer apps (
PPI::Element->location()
is not precise enough) or working with code analysis libraries (all libraries I'm aware of require byte offsets).