summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-12 01:45:40 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-12 01:45:40 +0300
commit734f5f08b4925a36a4044e8b1e0cb4fb9cff6d6f (patch)
tree279610be2227d66bcf72db93f9cde0c4e2c835e3
parent4e5eab4fd9a5d743b956ac3dfc48bd4a6309acd3 (diff)
downloaddeheader-734f5f08b4925a36a4044e8b1e0cb4fb9cff6d6f.tar.gz
deheader-734f5f08b4925a36a4044e8b1e0cb4fb9cff6d6f.tar.bz2
deheader-734f5f08b4925a36a4044e8b1e0cb4fb9cff6d6f.tar.xz
deheader-734f5f08b4925a36a4044e8b1e0cb4fb9cff6d6f.zip
Add support for #else derictive, but for now it can give false positives.
Because all #if/#ifdef blocks not allowed to parse, it always allow parse #else
-rwxr-xr-xdeheader2
1 files changed, 2 insertions, 0 deletions
diff --git a/deheader b/deheader
index a3140bd..857ed0e 100755
--- a/deheader
+++ b/deheader
@@ -1282,6 +1282,8 @@ class InclusionMap:
if c is not False:
allow_parse_includes = False
conditions.append((c, allow_parse_includes))
+ elif match_preproc("else", line) is not False:
+ allow_parse_includes = not allow_parse_includes
elif match_preproc("endif", line) is not False:
conditions.pop()
if len(conditions) == 0: