- commit
- 87a7a88e6b34138949f2f9ed8dfcdb070b305548
- parent
- 89439b0bd26b64261456a9a71b76087845b486ba
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-09-19 10:02
use python-style comments
Diffstat
| M | xi2.py | 9 | ++------- |
1 files changed, 2 insertions, 7 deletions
diff --git a/xi2.py b/xi2.py
@@ -47,13 +47,8 @@ if __name__ == '__main__': 47 47 ll = ''.join(lines) 48 48 # remove whitespace 49 49 ll = re.sub('[ \t]', '', ll)50 -1 # remove c++ style comments51 -1 # we have to escape linebreaks52 -1 ll = re.sub('\n', r'\\n', ll)53 -1 ll = re.sub('/\*[^(\*)]*\*/', '', ll)54 -1 ll = re.sub('\\\\n', '\n', ll)55 -1 # remove c style comments56 -1 ll = re.sub('//[^\n]*\n', '', ll)-1 50 # remove comments -1 51 ll = re.sub('#[^\n]*', '', ll) 57 52 58 53 # expand macros 59 54 ll = re.sub('\n', '\\\\n', ll)