From 1e6f29557348eee31cdcf2bcaadbcd93dfe236bf Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Fri, 30 Nov 2012 09:58:57 -0600 Subject: [PATCH] more preprocessor comments --- preprocessor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/preprocessor.py b/preprocessor.py index cb474a182..f5e0b75ab 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -544,6 +544,7 @@ def macro_translator(macro, token, line): 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 @@ def read_line(l): 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