Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94d32b1

Browse files
committed
ignore control-l in whitespace
1 parent a996b91 commit 94d32b1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Parser/tokenizer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ tok_get(tok, p_start, p_end)
424424
col++;
425425
else if (c == '\t')
426426
col = (col/tok->tabsize + 1) * tok->tabsize;
427+
else if (c == '\014') /* Control-L (formfeed) */
428+
col = 0; /* For Emacs users */
427429
else
428430
break;
429431
}
@@ -492,7 +494,7 @@ tok_get(tok, p_start, p_end)
492494
/* Skip spaces */
493495
do {
494496
c = tok_nextc(tok);
495-
} while (c == ' ' || c == '\t');
497+
} while (c == ' ' || c == '\t' || c == '\014');
496498

497499
/* Set start of current token */
498500
tok->start = tok->cur - 1;

0 commit comments

Comments
 (0)