make include_file faster in the preprocessor

This commit is contained in:
Bryan Bishop 2013-01-10 15:52:18 -06:00
parent 662f442221
commit fe8476d6bc

View File

@ -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)