ref: 1e6f29557348eee31cdcf2bcaadbcd93dfe236bf
parent: 9b4718d0c77a98aa7c3492e4f176c3210dd2459f
author: Bryan Bishop <[email protected]>
date: Fri Nov 30 04:58:57 EST 2012
more preprocessor comments
--- a/preprocessor.py
+++ b/preprocessor.py
@@ -544,6 +544,7 @@
index += 1
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()
@@ -558,11 +559,12 @@
asm = l
comment = None
+ # handle INCLUDE as a special case
if "INCLUDE \"" in asm:
include_file(asm)
+ # convert text to bytes when a quote appears (not in a comment)
elif "\"" in asm:
- # convert text to bytes when a quote appears (not in a comment)
quote_translator(asm)
# check against other preprocessor features