give preprocessor.py a main()

This commit is contained in:
Bryan Bishop 2013-08-31 12:12:09 -05:00
parent a74462bc52
commit 6191559c53

View File

@ -658,8 +658,11 @@ def preprocess(macro_table, lines=None):
for l in lines: for l in lines:
read_line(l, macro_table) read_line(l, macro_table)
# only run against stdin when not included as a module def main():
if __name__ == "__main__":
macros = load_pokecrystal_macros() macros = load_pokecrystal_macros()
macro_table = make_macro_table(macros) macro_table = make_macro_table(macros)
preprocess(macro_table) preprocess(macro_table)
# only run against stdin when not included as a module
if __name__ == "__main__":
main()