This repository was archived by the owner on Nov 8, 2024. It is now read-only.
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
Provide connivence accessors on SourceMap's for begin/end line/column #253
Open
Description
I am sure we can make a more intutive syntax for this, here's exerp from the Paw API Blueprint importer:
parseResult.errors.forEach((error) => {
const start = error.attributes.get('sourceMap').get(0).get(0).get(0);
const line = start.attributes.get('line');
const column = start.attributes.get('column');
throw new Error(`${error.toValue()} on line ${line}:${column}`)
});