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

Highlight missing <endif> #22

Closed
Clashsoft opened this issue Dec 19, 2019 · 4 comments
Closed

Highlight missing <endif> #22

Clashsoft opened this issue Dec 19, 2019 · 4 comments

Comments

@Clashsoft
Copy link

Clashsoft commented Dec 19, 2019

Since there is no completion (#20) yet, it is easy to miss an <endif>. As such, it would be very useful if this fact were highlighted with an error indicator.

At runtime, this problem is reported as premature EOF at a seemingly random line in the file, which is very hard to figure out.

Screenshot 2019-12-19 at 12 59 47

@Clashsoft
Copy link
Author

As of 0.7, it now looks like this:

Screenshot 2020-06-12 at 00 22 21

The error message is not perfectly clear but it's better than nothing.

@bjansen
Copy link
Collaborator

bjansen commented Jun 20, 2020

I'm not sure how we could tell the parser to report a better error message. I believe the message is intentionally "vague" because at this point there could be <elseif>, <else> or <endif>, all of which start with the LDELIM token. @parrt what do you think?

@parrt
Copy link
Member

parrt commented Jun 20, 2020

Yes, the parser only knows that it has to have a tag to go with that and, as it likely is missing < as a token (not a char), probalby best we can do

@Clashsoft
Copy link
Author

Alright then, if it's too much work. I'm personally already happy with that error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants