Added escape sequences

This commit is contained in:
2024-07-31 17:50:31 +02:00
parent cdbfa744b7
commit c8824e699a
12 changed files with 87 additions and 7 deletions

View File

@ -0,0 +1,9 @@
main() {
assert '\0' == 0
assert '\t' == 9
assert '\n' == 10
assert '\r' == 13
assert '\"' == 34
assert '\'' == 39
assert '\\' == 92
}

View File

@ -0,0 +1,10 @@
main() {
str := "\0\t\n\r\"\'\\"
assert str[0] == '\0'
assert str[1] == '\t'
assert str[2] == '\n'
assert str[3] == '\r'
assert str[4] == '\"'
assert str[5] == '\''
assert str[6] == '\\'
}