diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-01-10 15:52:18 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-01-10 15:52:18 -0600 |
commit | fe8476d6bc241a0bb40cde980693cb46d9395c91 (patch) | |
tree | caeb03ea5eb1ae5fb77230133dd425a2331df642 | |
parent | 662f442221945819dc5cc17e45639e4352517b10 (diff) |
make include_file faster in the preprocessor
-rw-r--r-- | preprocessor.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/preprocessor.py b/preprocessor.py index 533615889..c4fdb47fb 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -556,9 +556,9 @@ def macro_translator(macro, token, line): def include_file(asm): """This is more reliable than rgbasm/rgbds including files on its own.""" - filename = asm.split("\"") - filename = filename[1].replace("\"","").replace("\n","") - lines = open(filename, 'r').readlines() + filename = asm.split("\"")[1] + + lines = open(filename, "r").readlines() for line in lines: read_line(line) |