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

Add regex support to Lua lexer #1403

Merged
merged 2 commits into from
Feb 1, 2020
Merged

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Jan 22, 2020

The Lua lexer does not currently provide any support for tokenising regular expressions. This PR adds support for regular expressions.

It fixes #1401.

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Jan 22, 2020
@pyrmont pyrmont self-assigned this Jan 22, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Jan 22, 2020

@VADemon I've basically borrowed the regular expression code from the JavaScript lexer (I left out the bits where it lexed mistakes as errors; I don't think checking syntactic correctness is necessary for our purposes here).

I'm sure that I've got things wrong, though. Could you have a look and see where it can be improved? If anything is unclear, let me know!

@pyrmont pyrmont marked this pull request as ready for review January 27, 2020 00:26
@pyrmont pyrmont merged commit 835f83f into rouge-ruby:master Feb 1, 2020
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Feb 1, 2020
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.

Lua lexer handles escape string in regex incorrectly
1 participant