Commit Diff


commit - d358df0e47d1b11ac78179b6541ef9377992e639
commit + 9a90a3d166d0ae512772ecb58d39629cd8250e37
blob - b73e7d1c0971d74dcf359d20c97fa71c812cb9d6
blob + be0229281e66c6155564c09923061e142c13fe7e
--- template/parse.y
+++ template/parse.y
@@ -73,6 +73,7 @@ extern int	 nodebug;
 static int	 block;
 static int	 in_define;
 static int	 errors;
+static int	 lastline = -1;
 
 typedef struct {
 	union {
@@ -667,6 +668,12 @@ dbg(void)
 	if (nodebug)
 		return;
 
+	if (yylval.lineno == lastline + 1) {
+		lastline = yylval.lineno;
+		return;
+	}
+	lastline = yylval.lineno;
+
 	printf("#line %d ", yylval.lineno);
 	printq(file->name);
 	putchar('\n');