Skip to content

Commit

Permalink
Implement all known string escape sequences (#87)
Browse files Browse the repository at this point in the history
Fixes #32.
  • Loading branch information
yaakov-h authored Nov 7, 2023
1 parent 58fb2f1 commit 71f17b2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,16 @@ string ReadUntil(params char[] terminators)
{
next = next switch
{
'r' => '\r',
'n' => '\n',
't' => '\t',
'v' => '\v',
'b' => '\b',
'r' => '\r',
'f' => '\f',
'a' => '\a',
'\\' => '\\',
'?' => '?',
'\'' => '\'',
'"' => '"',
_ when options.EnableValveNullByteBugBehavior => '\0',
_ => throw new InvalidDataException($"Unknown escape sequence '\\{next}' at line {Line}, column {Column - 2}."),
Expand Down

0 comments on commit 71f17b2

Please sign in to comment.