Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cleanup and Refactor Locators #1013
This pull request refactors the behaviour of locators. In particular, it turns locators into a new class
The locator class also improves upon the old locators and is internally a quintuple consisting of
This means that an instance of a locator class can refer either to a point, or an entire range in the source file. When requesting a Locator from the Mouth, the code tries to estimate the location and length of the last token, thereby returning a range.
The new locator class also has a toAttribute method, that turns an instance of a locator into an XPointer and thereby supersedes #739.
Travis doesn't like your PR? Also, I am happy there is no new command-line option proposed, or I would need to link to the "ultimate PR response video", which Bruce countered me with some time ago.
Here it is for reference, and artistic enjoyment: