aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/cc/lexer/preprocessor.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-27 15:24:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-27 15:24:25 +0200
commit2e19434e09b819105055ddc8e58f69db98ec8669 (patch)
treee806e15f6e940a9135f0e7d8cf9ba08637512bd8 /unit-tests/cc/lexer/preprocessor.test
parentde417f02b2b1f3a02c5c9d206f399c574a93bf7f (diff)
Handle #line directives in C/C++ lexer
This way the parser now reports logical rather than physical location in diagnostics.
Diffstat (limited to 'unit-tests/cc/lexer/preprocessor.test')
-rw-r--r--unit-tests/cc/lexer/preprocessor.test20
1 files changed, 19 insertions, 1 deletions
diff --git a/unit-tests/cc/lexer/preprocessor.test b/unit-tests/cc/lexer/preprocessor.test
index e082062..a3fab9f 100644
--- a/unit-tests/cc/lexer/preprocessor.test
+++ b/unit-tests/cc/lexer/preprocessor.test
@@ -32,10 +32,28 @@ EOI
: line
:
-$* <<EOI
+$* -l <<EOI >>EOO
+;
# 1 "test.cxx" 2
+;
+ ;
+# 4
+;
#line 8 "z:\\tmp\\test.hxx"
+;
+#line 10
+;
+# 5 "test.cxx"
+;
EOI
+';' stdin:1:1
+';' test.cxx:1:1
+';' test.cxx:2:3
+';' test.cxx:4:1
+';' z:\tmp\test.hxx:8:1
+';' z:\tmp\test.hxx:10:1
+';' test.cxx:5:1
+EOO
: nested
: