Closed naltun closed 3 years ago
Describe the bug echo and print do not respect escape sequences in String literals.
To Reproduce Steps to reproduce the behavior:
Expected behavior The escape sequences should be respected.
Screenshots If applicable, add screenshots to help explain your problem.
Environment:
Additional context This is a REPL bug.
Here is a small program to demonstrate how this is not a bug when compiling:
/tmp $ cat hello.kaos str a = "Hello\n\tWorld!" echo a print a echo "Hello\n\tWorld!" print "Hello\n\tWorld!" /tmp $ ./build/hello Hello World!Hello World! Hello World!Hello World!
@naltun it was actually not only a REPL bug but an interpreter bug in general. I've fixed it with https://github.com/chaos-lang/chaos/commit/8dc78d0e2fe030c89e2be1689cd54c3a27deb674
Describe the bug echo and print do not respect escape sequences in String literals.
To Reproduce Steps to reproduce the behavior:
Expected behavior The escape sequences should be respected.
Screenshots If applicable, add screenshots to help explain your problem.
Environment:
Additional context This is a REPL bug.
Here is a small program to demonstrate how this is not a bug when compiling: