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

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

Closed
CatchABus opened this issue Oct 28, 2022 · 1 comment
Closed

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

CatchABus opened this issue Oct 28, 2022 · 1 comment

Comments

@CatchABus
Copy link

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}`);
@fb55
Copy link
Owner

fb55 commented Oct 29, 2022

That's very possible, but requires a bit of additional code on your side; see #919

@fb55 fb55 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants