Skip to content

Get the line number of line that is currently being parsed #1333

@CatchABus

Description

@CatchABus

I wonder if it would be possible to get the number of the line that is currently being parsed.
This way one can throw custom syntax errors like:

throw new Error(`Invalid element 'slot' inside div at line ${lineNumber}`);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions