Commit graph

37 commits

Author SHA1 Message Date
Zsolt Erhardt
ca2fae08a2 Bugfix/escaped character parsing (#32)
So as it turns out there's a nasty little piece of code in rapidjson's
source which breaks the preprocessor and will leave things a little bit
weird.

The test "preprocessor_parses_escaped_character" should prove
its validity.
2018-01-22 11:18:38 +01:00
Jonathan Müller
1e5271a4b7 Fix and improve C comment indent heuristic 2018-01-15 09:08:48 +01:00
Jonathan Müller
3e8b2b429c Better handling of include refs 2018-01-11 21:22:28 +01:00
Jonathan Müller
b2121b19c2 Add indentation C comment heuristics
See foonathan/standardese#84.
2017-12-06 19:34:36 +01:00
Jonathan Müller
49e63c4a9b Add format_diagnostic() function 2017-10-11 22:10:17 +02:00
Jonathan Müller
35293edc24 Add column to source_location 2017-10-11 21:56:02 +02:00
Jonathan Müller
0723bea947 Only generate line directive when necessary 2017-10-11 17:11:27 +02:00
Jonathan Müller
a2929c0020 Handle newlines inside C comments 2017-10-11 17:09:54 +02:00
Jonathan Müller
dd0a20c6d5 Support C-style doc comments with ! 2017-10-11 10:15:44 +02:00
Jonathan Müller
845ef61017 Use #line directive to enforce matching line numbers
clang preprocessing output is different on Windows for some reason...
2017-10-10 22:11:29 +02:00
Jonathan Müller
b28fff6c37 Fix preprocessor line numbers if includes aren't supported 2017-10-10 21:13:29 +02:00
Jonathan Müller
d088b44db6 Add line numbers to diagnostics 2017-10-10 17:16:10 +02:00
Jonathan Müller
7c30ba7c46 [breaking] Ensure matching line numbers after preprocessing
Unmatched documentation comments are not just a string, but also contain the line number as well.
2017-10-10 17:07:41 +02:00
Jonathan Müller
b3885bbb68 Remove comments in macro invocations
Just breaks to much.
2017-10-07 09:58:14 +02:00
Jonathan Müller
35c090e7c3 Put full path in quotes 2017-06-22 13:57:59 +02:00
Jonathan Müller
b0cd795836 Hide wrong warnings if header files are parsed directly 2017-06-20 22:17:44 +02:00
Jonathan Müller
d6e993a7b2 Optimize preprocessing string searching/comparing 2017-06-20 22:17:44 +02:00
Jonathan Müller
fd449dde4a Store full path of header as well 2017-06-20 22:17:44 +02:00
Jonathan Müller
017dbb3114 Update submodules 2017-05-27 10:16:18 +02:00
Jonathan Müller
bc9b8433c8 Skip character literals when preprocessing 2017-04-21 11:52:30 +02:00
Jonathan Müller
d1fafdaa92 Add appveyor.yml 2017-04-21 11:18:36 +02:00
Jonathan Müller
1420abc81b Add .travis.yml 2017-04-21 10:12:06 +02:00
Jonathan Müller
6e7a8c921c Skip strings when preprocessing 2017-04-19 16:52:56 +02:00
Jonathan Müller
b189c72280 Handle empty C comments in preprocessor 2017-04-19 16:38:18 +02:00
Jonathan Müller
f359885e87 Keep macro definitions when preprocessing
Other includes libclang encounters might depend on them.
2017-04-14 22:38:25 +02:00
Jonathan Müller
b6767ffdeb Force C++ and add current include dir when preprocessing 2017-04-12 17:44:50 +02:00
Jonathan Müller
4dc771ad6b Skip comments instead of writing them to output
This simplifies parsing.
2017-04-12 15:09:42 +02:00
Jonathan Müller
db20190fe4 Workaround clang bug with #undef output 2017-04-12 14:52:28 +02:00
Jonathan Müller
a8e2676f36 Fix error reporting in preprocessor 2017-04-10 19:58:17 +02:00
Jonathan Müller
9c46c96820 Fix and test include directive parsing 2017-04-03 09:49:29 +02:00
Jonathan Müller
d18070a799 Implement code generation 2017-03-29 19:51:02 +02:00
Jonathan Müller
183aeaafde Parse documentation comments 2017-03-16 11:49:37 +01:00
Jonathan Müller
f66fa70b1f Format preprocessor diagnostics 2017-02-19 20:51:08 +01:00
Jonathan Müller
108fd1b2ee Add diagnostic_logger 2017-02-16 22:08:56 +01:00
Jonathan Müller
a0c2eece5b Add and use libclang_error exception class 2017-02-16 21:33:41 +01:00
Jonathan Müller
2e1dce2ffd Fix include handling support
Can't be tested until clang 4.0.
2017-02-16 20:33:48 +01:00
Jonathan Müller
0684be5788 Add preprocessor
The parser now parses macros and inclusion directives.
2017-02-12 21:43:14 +01:00