From 9f2f6be9bba4603cc2f5b2b117f99f859f6f1289 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 20 May 2018 16:11:36 -0400 Subject: [PATCH] include doublequote characters in string literal token text --- src/parser/parser.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parser/parser.l b/src/parser/parser.l index 0cf1686..533af6e 100644 --- a/src/parser/parser.l +++ b/src/parser/parser.l @@ -150,12 +150,13 @@ L?\" { { delete build_string; } - build_string = new std::string(); + build_string = new std::string("\""); BEGIN(str); } { \" { BEGIN(INITIAL); + *build_string += "\""; (*yylval)->token.text = build_string; build_string = nullptr; return STRING_LITERAL;