Skip to content

Commit

Permalink
Add translation modifier to lexer.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed Sep 27, 2024
1 parent d703267 commit 696b5b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,12 @@ int ctr_clex_tok() {
return CTR_TOKEN_NUMBER;
}
while( !ctr_clex_is_delimiter( ctr_code ) && ctr_code!=ctr_eofcode ) {
ctr_clex_buffer[i] = c; ctr_clex_tokvlen++;
ctr_clex_buffer[i] = c;
if (c == '#' && i > 0) {
i = 0;
ctr_clex_tokvlen = 0;
}
ctr_clex_tokvlen++;
i++;
if (i > ctr_clex_bflmt) {
ctr_clex_emit_error( CTR_ERR_TOKBUFF );
Expand Down

0 comments on commit 696b5b3

Please sign in to comment.