mes: reader: Support "#\nl" and "#\np".

* src/reader.c (reader_read_character): Handle the "nl" and "np"
character names.
This commit is contained in:
Timothy Sample 2022-04-25 23:57:06 -06:00
parent 46d4ab25a6
commit 227f3aaf95
1 changed files with 4 additions and 0 deletions

View File

@ -340,8 +340,12 @@ reader_read_character ()
c = '\b';
else if (strcmp (buf, "ht") == 0)
c = '\t';
else if (strcmp (buf, "nl") == 0)
c = '\n';
else if (strcmp (buf, "vt") == 0)
c = '\v';
else if (strcmp (buf, "np") == 0)
c = '\f';
else if (strcmp (buf, "cr") == 0)
/* Nyacc bug
c = '\r'; */