From 749858b824d0e8b83eaa49f817436b8cc14dc3eb Mon Sep 17 00:00:00 2001 From: Balazs Scheidler Date: Mon, 20 May 2024 09:40:59 +0200 Subject: [PATCH] pragma-grammar: add @line without arguments This pragma reverts to the original location, as if the previous @line was not even there. Signed-off-by: Balazs Scheidler --- lib/pragma-grammar.ym | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pragma-grammar.ym b/lib/pragma-grammar.ym index 8086f38881..a13cee2bd7 100644 --- a/lib/pragma-grammar.ym +++ b/lib/pragma-grammar.ym @@ -215,7 +215,12 @@ line_stmt cfg_lexer_set_file_location(lexer, $2, $3, $4); free($2); } + | KW_LINE LL_EOL + { + cfg_lexer_set_file_location(lexer, NULL, 0, 0); + } + ; /* INCLUDE_RULES */ %%