Skip to content
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
@kylef

Description

@kylef

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}`)
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions