Navigation Menu

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

Improve escaping and interpolating in string and charlist literals in Elixir lexer #1308

Merged

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Aug 19, 2019

The Elixir lexer does not properly handle escaping and interpolating in string ("foo") and charlist ('foo') literals.

This PR adds general escaping rules for use in strings as well as adding support for escaping and interpolating to charlist literals. It also rationalises the states used for string literals. Examples to confirm correct behaviour have been added to the visual sample.

This fixes #1306.

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Aug 19, 2019
@pyrmont pyrmont changed the title Improve escaping and interpolating in string and charlist literals Improve escaping and interpolating in string and charlist literals in Elixir lexer Aug 19, 2019
@pyrmont
Copy link
Contributor Author

pyrmont commented Aug 19, 2019

@julp How does this look to you?

@julp
Copy link
Contributor

julp commented Aug 19, 2019

Seems ok to me

@pyrmont pyrmont merged commit 690f9ec into rouge-ruby:master Aug 19, 2019
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Aug 19, 2019
@pyrmont pyrmont deleted the bugfix.elixir-strings-and-charlists branch January 8, 2020 20:08
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.

Lexing of # in Elixir lexer
2 participants