aboutsummaryrefslogtreecommitdiffstats
path: root/src/script/remove_comment.py
blob: 673f3b3a4275864624473ce32696f03ab0170a74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3

import sys
import re

def convert_release():
    skip_flag = False
    for line in sys.stdin:
        line = line.rstrip()
        if not skip_flag:
            if re.search(r'// +remove +doxygen +{', line):
                skip_flag = True
                continue
        else:
            if re.search(r'// +}', line):
                skip_flag = False
            continue
        print(line)

if __name__ == '__main__':
    convert_release()

# end of file