-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Description
Escaped double quotes are not properly recognized, leading to the string literal not being closed.
How to reproduce
Use the following code:
sqlString = "\"" (!"\"" .)* "\""
sqlInner
= chars:sqlChar+ {
return {
statement: chars.map((c) => c.char).join(""),
arguments: chars.flatMap((c) => (c.argNames ? c.argNames : [])),
};
}
Note that it contains escaped quotes on the first line, leading the subsequent lines to be recognized as part of the string:
Expected behaviour
To close the string, as when no escaped quotes are used:
sqlString = '"' (!'"' .)* '"'
sqlInner
= chars:sqlChar+ {
return {
statement: chars.map((c) => c.char).join(""),
arguments: chars.flatMap((c) => (c.argNames ? c.argNames : [])),
};
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

