Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant