Skip to content
Snippets Groups Projects
Commit a62cdf65 authored by Clemens Paumgarten's avatar Clemens Paumgarten
Browse files

Formatting

parent 4bde5d0d
No related branches found
No related tags found
No related merge requests found
......@@ -123,12 +123,12 @@ identifier [a-zA-Z_][a-zA-Z0-9_]*
{string_literal} { /* https://stackoverflow.com/questions/14185172/lex-how-to-eliminate-double-quotes-from-a-string-literal */
char* str = malloc(sizeof(char) * yyleng+3);
strcpy(str, "\\");
strncpy(str+1, yytext, yyleng-1);
strcpy(str+yyleng, "\\\"");
str[yyleng+2] = '\0';
yylval->TK_STRING_LITERAL = str;
return TK_STRING_LITERAL; }
strcpy(str, "\\");
strncpy(str+1, yytext, yyleng-1);
strcpy(str+yyleng, "\\\"");
str[yyleng+2] = '\0';
yylval->TK_STRING_LITERAL = str;
return TK_STRING_LITERAL; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment