A Locator for the source code position between offset and line/column.
- Position locator
- Line parser
- Comment parser
npm i monocart-locator
const locator = new Locator(source);
console.log(locator.lines);
console.log(locator.comments);
const offset = locator.locationToOffset({ line: 1, column: 1 });
const loc = locator.offsetToLocation(10);