Fix a bug that produced a lot of NONEs in the syntaxtree
This commit is contained in:
parent
96acb9df26
commit
6e1de39a2e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user