give preprocessor.py a main()

This commit is contained in:
Bryan Bishop 2013-08-31 12:12:09 -05:00
parent a74462bc52
commit 6191559c53
1 changed files with 5 additions and 2 deletions

View File

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