From 86a3448b554e2c9963eed87a43b2db2a8156f842 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 19 Mar 2022 23:09:24 -0700 Subject: Handle situations when cpp breaks a line into pieces. There are situations in which GNU cpp breaks a single line of input into multiple lines. These are indicated by linemarkers that repeat the current line number, for instance: # 3 "file" this # 3 "file" is # 3 "file" all line three line four line five We now remove these repeat linemarkers and collapse the indicated lines back into one line, also eliminating the leading whitespace that tries to preserve the column. --- testcases | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'testcases') diff --git a/testcases b/testcases index 091f19d..8b7dc81 100644 --- a/testcases +++ b/testcases @@ -161,3 +161,12 @@ abc'def BEGIN { print __cppawk_ver >= 20220318 }' : 1 +-- +30: +./cppawk ' +#include +BEGIN { + print INT_MIN, INT_MIN, INT_MIN +}' +: +-2147483648 -2147483648 -2147483648 -- cgit v1.2.3