Closed steinwaywhw closed 6 years ago
It is for handling multi-line strings. What literal string emitted by ATS is incorrect?
Oh my bad. It is \0
that is treated incorrectly. "\a\n\0foo\r"
is emitted as ATSPMVstring("\007\n")
A string in ATS cannot contain '\0' in the middle.
Ok, I see. Maybe in the future we can add support for \0
. Low priority.
https://github.com/githwxi/ATS-Postiats/blob/4fc41735fbca13b31868a6e13c10ba64a9387230/src/pats_lexing.dats#L1988-L1994
Is there a particular reason
\n
gets treated differently? I was hit by this while testing the simple dynamic string library wrapper in ATS, source code. The literal string emitted by ATS is incorrect.