aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-06-24 18:04:38 +0200
committerOmar Polo <op@omarpolo.com>2021-06-24 18:04:38 +0200
commitc86d164e89788d2e0c3509f3e3901ec1a4f5a815 (patch)
tree0351fbc6702805a3d38bff34cbf0787c36023aed
parent6e8a284fb2fc62682de6ee271af8d9d3bbf760d6 (diff)
downloadtelescope-c86d164e89788d2e0c3509f3e3901ec1a4f5a815.tar.gz
telescope-c86d164e89788d2e0c3509f3e3901ec1a4f5a815.tar.bz2
ignore \r
otherwise it would complain about a syntax error (it would treat \r as a string of one character.) Found by TheGnuserland, thanks!!
-rw-r--r--parse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index c5cb9c1..d9597ba 100644
--- a/parse.y
+++ b/parse.y
@@ -179,6 +179,9 @@ repeat:
/* check for special one-character constructions */
switch (c) {
+ case '\r':
+ /* silently eat up any \r */
+ goto repeat;
case '\n':
yylval.colno = 0;
yylval.lineno++;