Skip to content

Commit

Permalink
allow parsing null chars as '\0'
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTaelin committed Oct 20, 2024
1 parent 0173609 commit 43512c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Kind/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ parseTxtChr :: Parser Char
parseTxtChr = P.choice
[ P.try $ do
char_skp '\\'
c <- oneOf "\\\"nrtbf"
c <- oneOf "\\\"nrtbf0"
return $ case c of
'\\' -> '\\'
'"' -> '"'
Expand All @@ -425,6 +425,7 @@ parseTxtChr = P.choice
't' -> '\t'
'b' -> '\b'
'f' -> '\f'
'0' -> '\0'
, P.try $ do
string_skp "\\u"
code <- P.count 4 P.hexDigit
Expand Down

0 comments on commit 43512c5

Please sign in to comment.