Lexer generator logic problem, leaving emit ptr in wrong location after output chunk ends

master
Allen Webster 2020-02-01 18:30:23 -08:00
parent 7eb66774f8
commit 5fa6570f33
2 changed files with 428 additions and 434 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3531,12 +3531,12 @@ gen_SLOW_action_list__cont_flow(Arena *scratch, Token_Kind_Set tokens, Flag_Set
fprintf(out, "token_list_push(arena, list, &token);\n");
fprintf(out, "emit_counter += 1;\n");
fprintf(out, "state.emit_ptr = state.ptr;\n");
if (context != ActionContext_EndOfFile){
fprintf(out, "if (emit_counter == max){\n");
fprintf(out, "goto end;\n");
fprintf(out, "}\n");
}
fprintf(out, "state.emit_ptr = state.ptr;\n");
fprintf(out, "}\n");
}break;
}