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

feat: Improve quote handling in lexer #3274

Merged
merged 8 commits into from
Aug 11, 2023
Merged

Conversation

max-sixty
Copy link
Member

Improvements described inline

@max-sixty
Copy link
Member Author

Chumsky errors were actually decipherable once I got used to them!

Comment on lines +412 to +414
// Escape each inner quote depending on the outer quote
assert_snapshot!(quoted_string(true).parse(r#""\"hello\"""#).unwrap(), @r###""hello""###);
assert_snapshot!(quoted_string(true).parse(r#"'\'hello\''"#).unwrap(), @"'hello'");
Copy link
Member Author

Choose a reason for hiding this comment

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

This was previously handled incorrectly, IIUC

@max-sixty
Copy link
Member Author

@aljazerzen the gentlest of pings, no real rush

Copy link
Member

@aljazerzen aljazerzen left a comment

Choose a reason for hiding this comment

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

Much better and faster probably. And it handles arbitrary many opening quotes.

@max-sixty max-sixty merged commit cec2c64 into PRQL:main Aug 11, 2023
18 checks passed
@max-sixty max-sixty deleted the chumsky-string branch August 11, 2023 17:03
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.

None yet

2 participants