don't use globals in the preprocessor

Macros are now passed around as lists and dicts.
This commit is contained in:
Bryan Bishop
2013-08-28 17:53:26 -05:00
parent 16bfc01124
commit e4d3ea7256
2 changed files with 18 additions and 17 deletions

View File

@ -13,4 +13,4 @@ if __name__ == '__main__':
dest = os.path.splitext(source)[0] + '.tx'
sys.stdin = open(source, 'r')
sys.stdout = open(dest, 'w')
preprocessor.preprocess()
preprocessor.preprocess(preprocessor.macros)