diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-08-31 10:17:25 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-08-31 10:17:25 -0500 |
commit | ba67d3ba4675ed4f4a918264707788f9c4979c9b (patch) | |
tree | c7a3065394032d748bdf4808582df57b850de88e | |
parent | ebb591a7ec624acce35d0378201c641724ac8d4c (diff) | |
parent | 5118fb757879f7ccf177b7d84582d85c6dd5d14c (diff) |
Merge branch 'master' into preprocessor-asserts
-rw-r--r-- | preprocessor.py | 12 | ||||
-rw-r--r-- | prequeue.py | 9 |
2 files changed, 9 insertions, 12 deletions
diff --git a/preprocessor.py b/preprocessor.py index a31386801..3a3633002 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -31,12 +31,6 @@ macros += movement_command_classes macros += music_classes macros += effect_classes -# show lines before preprocessing in stdout -show_original_lines = False - -# helpful for debugging macros -do_macro_sanity_check = False - chars = { "ガ": 0x05, "ギ": 0x06, @@ -444,11 +438,13 @@ def is_based_on(something, base): options += [something.__name__] return (base in options) -def macro_translator(macro, token, line): +def macro_translator(macro, token, line, show_original_lines=False, do_macro_sanity_check=False): """ Converts a line with a macro into a rgbasm-compatible line. - """ + @param show_original_lines: show lines before preprocessing in stdout + @param do_macro_sanity_check: helpful for debugging macros + """ if macro.macro_name != token: raise MacroException("macro/token mismatch") diff --git a/prequeue.py b/prequeue.py index c9a9a8bcc..ec6cd9e39 100644 --- a/prequeue.py +++ b/prequeue.py @@ -1,8 +1,9 @@ # coding: utf-8 - -# Starting a new python process to preprocess each source file -# creates too much overhead. Instead, a list of files to preprocess -# is fed into a script run from a single process. +""" +Starting a new python process to preprocess each source file creates too much +overhead. Instead, a list of files to preprocess is fed into a script run from +a single process. +""" import os import sys |