diff --git a/src/parser.c b/src/parser.c index 896774e..c4acd57 100644 --- a/src/parser.c +++ b/src/parser.c @@ -17,6 +17,7 @@ tSyntaxElement* parse(FILE* file) { bool incomment = false; bool instring = false; bool intoken = false; + bool inescape = false; tExtstring* exttoken = NULL; tExtstring* extstring = NULL; @@ -34,7 +35,7 @@ tSyntaxElement* parse(FILE* file) { } if (instring) { - if (symbol == '"') { + if (symbol == '"' && !inescape) { if (extstring == NULL) { extstring = malloc(sizeof(tExtstring)); @@ -52,6 +53,10 @@ tSyntaxElement* parse(FILE* file) { } else { + inescape = false; + if (symbol == '\\') + inescape = true; + if (extstring == NULL) { extstring = malloc(sizeof(tExtstring));