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

report error for missing closing tag token #287

Merged
merged 1 commit into from
Sep 18, 2021

Conversation

emi2k01
Copy link
Contributor

@emi2k01 emi2k01 commented Aug 30, 2021

image

As you can see, I used abort_call_site instead of adding a more appropriate span like the rustc one:

image

The reason is that I don't know how.

@emi2k01
Copy link
Contributor Author

emi2k01 commented Aug 30, 2021

I don't know how to make this a draft. The test failing is named "element-missing-body" but HTML tags are not required to have a body, I think.

Should I rename the test to non-closed-element?

Copy link
Owner

@lambda-fairy lambda-fairy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @emi2k01! Happy to merge once the comment is addressed (and the tests pass).

Should I rename the test to non-closed-element?

Sure, do it!

maud_macros/src/parse.rs Outdated Show resolved Hide resolved
@emi2k01
Copy link
Contributor Author

emi2k01 commented Sep 14, 2021

Btw, do you know if it's possible to create a diagnostic with whose span is just after the last token? Just like the second screenshot I added to the original comment.

@lambda-fairy
Copy link
Owner

Thanks!

Btw, do you know if it's possible to create a diagnostic with whose span is just after the last token?

There is Span::after, but it's unstable.

@lambda-fairy lambda-fairy merged commit 4b31795 into lambda-fairy:main Sep 18, 2021
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

Successfully merging this pull request may close these issues.

2 participants