Skip to content
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
kylef opened this issue Jun 11, 2019 · 0 comments
Open

Provide connivence accessors on SourceMap's for begin/end line/column #253

kylef opened this issue Jun 11, 2019 · 0 comments
Labels
core enhancement New feature or request

Comments

@kylef
Copy link
Member

kylef commented Jun 11, 2019

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}`)
    });
@kylef kylef added enhancement New feature or request core labels Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant