xi2

a plain text language that compiles to MIDI
git clone https://git.ce9e.org/xi2.git

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 comments
   51    -1     # we have to escape linebreaks
   52    -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 comments
   56    -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)