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

rephrase algorithm lint rules in terms of parsed lines #498

Merged
merged 8 commits into from
Nov 27, 2022

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Nov 23, 2022

The algorithm lint rules were written before the addition of the expression parser in #464.

The expression parser is smarter than the bare ecmarkdown parser, particularly around the handling of <ins>/<del> (specifically, it silently inlines the contents of <ins> and discards the contents of <del> [as of #494] so that you're linting against the intended spec text). By rewriting the algorithm lint rules in terms of the expression parser, we get correct handling of <ins>/<del> for free. That also lets us rip out some gross and incomplete logic for handling <ins>/<del> from algorithm-line-style.ts.

The expression parser wasn't surfacing location information, and had an annoying intermediate node type, so it needed to be tweaked too.

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