summaryrefslogtreecommitdiff
path: root/ast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ast.cpp')
-rw-r--r--ast.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/ast.cpp b/ast.cpp
index 88d716a..68d4d4b 100644
--- a/ast.cpp
+++ b/ast.cpp
@@ -199,9 +199,10 @@ ostream& operator<<(ostream &os,const AST &ast){
os<<'"';
for(char c : ast.strval){
switch(c){
- case 9: os<<"\\t"; break;
- case 10: os<<"\\n"; break;
- case 13: os<<"\\r"; break;
+ case '\t': os<<"\\t"; break;
+ case '\n': os<<"\\n"; break;
+ case '\r': os<<"\\r"; break;
+ case '"': os<<"\\\""; break;
default:
if(c>=32&&c<=126){
os<<c;