File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -591,7 +591,6 @@ void write_elf(FILE* out_file) {
591591 .type = sym .type ,
592592 .sym = sym .symbol -> index ,
593593 .addend = -4 ,
594-
595594 };
596595 memcpy (& sections [sections_len ], & entry , sizeof entry );
597596 sections_len += sizeof entry ;
Original file line number Diff line number Diff line change @@ -64,9 +64,11 @@ bool shunting_yard(ExprToken out_queue[], size_t* out_queue_size) {
6464 // visit to advance ctx.token_pos, record operand_pos to "replay" emit later
6565 expr_token .token_pos = ctx .token_pos ;
6666
67- size_t text_pos = ctx . text_len ;
67+ Context ctx_old = ctx ;
6868 Expr operand = visit_operand ();
69- ctx .text_len = text_pos ;
69+ size_t token_pos_end = ctx .token_pos ;
70+ ctx = ctx_old ;
71+ ctx .token_pos = token_pos_end ;
7072
7173 if (!operand .ok ) return false;
7274 out_queue [(* out_queue_size )++ ] = expr_token ;
You can’t perform that action at this time.
0 commit comments