diff --git a/src/parser.c b/src/parser.c index 609402b..cd1c361 100644 --- a/src/parser.c +++ b/src/parser.c @@ -37,7 +37,6 @@ tSyntaxElement* parse(FILE* file) { continue; } if (instring) { - syntaxtree = se_next(syntaxtree); if (symbol == '"') { if (extstring == NULL) { extstring = malloc(sizeof(tExtstring)); @@ -61,7 +60,6 @@ tSyntaxElement* parse(FILE* file) { continue; } if (intoken) { - syntaxtree = se_next(syntaxtree); if (isspace(symbol) || symbol == '(' || symbol == ')') { intoken = false; syntaxtree->type = TOKEN; @@ -93,9 +91,11 @@ tSyntaxElement* parse(FILE* file) { incomment = true; continue; case '"': + syntaxtree = se_next(syntaxtree); instring = true; continue; default: + syntaxtree = se_next(syntaxtree); exttoken = malloc(sizeof(tExtstring)); exttoken->symbol = symbol; exttoken->next = NULL;