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

datamodel: implement PSL string literal grammar proposal #2996

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

tomhoule
Copy link
Contributor

@tomhoule tomhoule commented Jun 21, 2022

Simplify pest grammar of string literals

We want to tokenize invalid escape sequences and report them as such
later in validation.

This results in better error messages across the board.

closes prisma/prisma#4167

and confirm that user issue is closed by the combination of the new postgres default parsing code from the
scalar list defaults work and the new string literal code in PSL.

closes prisma/prisma#12095

Simplify pest grammar of string literals

We want to tokenize invalid escape sequences and report them as such
later in validation.

This results in better error messages across the board.

closes prisma/prisma#4167
...by the combination of the new postgres default parsing code from the
scalar list defaults work and the new string literal code in PSL.

closes prisma/prisma#12095
@tomhoule tomhoule marked this pull request as ready for review June 22, 2022 10:04
@tomhoule tomhoule requested a review from a team as a code owner June 22, 2022 10:04
@@ -1,20 +1,26 @@
use diagnostics::Diagnostics;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

extra line

// References:
// - https://www.ietf.org/rfc/rfc4627.txt
// - https://www.json.org/json-en.html
UNICODE_CONTROL_CHARACTER = _{ '\u{0000}'..'\u{001F}' }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be called ASCII_CONTROL_CHARACTER

Copy link
Contributor

@pimeys pimeys left a comment

Choose a reason for hiding this comment

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

nevermind, looks good.

@tomhoule tomhoule merged commit bd4d62f into main Jun 22, 2022
@tomhoule tomhoule deleted the psl-string-grammar branch June 22, 2022 10:46
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.

Postgres Single Quote Escaping Breaking Migrations PSL: define the grammar of string literals
2 participants