summaryrefslogtreecommitdiff
path: root/preprocessor.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-11-30 09:54:02 -0600
committerBryan Bishop <kanzure@gmail.com>2012-11-30 09:54:02 -0600
commita1a9fa5560e01d97c7c33bbf8bb19fe4e76d3c28 (patch)
tree9ee6f9505d5e056e76c6af587dfdaa265d05bdc7 /preprocessor.py
parentbdad293da37598386c2fd5be4ea1188cd2989f84 (diff)
move allowed_lengths for music macros out
This moves the allowed_lengths setting out of the preprocessor. Special cases should not be hardcoded in the preprocessor.
Diffstat (limited to 'preprocessor.py')
-rw-r--r--preprocessor.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/preprocessor.py b/preprocessor.py
index 5758db323..7c1decd37 100644
--- a/preprocessor.py
+++ b/preprocessor.py
@@ -490,12 +490,6 @@ def macro_translator(macro, token, line):
else:
allowed_lengths = [allowed_length]
- if macro.macro_name == "notetype":
- allowed_lengths = [1,2]
- elif macro.macro_name == "togglenoise" \
- or macro.macro_name == "sfxtogglenoise":
- allowed_lengths = [0,1]
-
assert len(params) in allowed_lengths, \
"mismatched number of parameters on this line: " + \
original_line
@@ -589,4 +583,4 @@ def read_line(l):
sys.stdout.write(comment)
for l in sys.stdin:
- read_line(l) \ No newline at end of file
+ read_line(l)