From a1a9fa5560e01d97c7c33bbf8bb19fe4e76d3c28 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Fri, 30 Nov 2012 09:54:02 -0600 Subject: 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. --- preprocessor.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'preprocessor.py') 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) -- cgit v1.2.3