You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
more preprocessor comments
This commit is contained in:
@@ -544,6 +544,7 @@ def macro_translator(macro, token, line):
|
|||||||
index += 1
|
index += 1
|
||||||
|
|
||||||
def include_file(asm):
|
def include_file(asm):
|
||||||
|
"""This is more reliable than rgbasm/rgbds including files on its own."""
|
||||||
filename = asm.split("\"")
|
filename = asm.split("\"")
|
||||||
filename = filename[1].replace("\"","").replace("\n","")
|
filename = filename[1].replace("\"","").replace("\n","")
|
||||||
lines = open(filename, 'r').readlines()
|
lines = open(filename, 'r').readlines()
|
||||||
@@ -558,11 +559,12 @@ def read_line(l):
|
|||||||
asm = l
|
asm = l
|
||||||
comment = None
|
comment = None
|
||||||
|
|
||||||
|
# handle INCLUDE as a special case
|
||||||
if "INCLUDE \"" in asm:
|
if "INCLUDE \"" in asm:
|
||||||
include_file(asm)
|
include_file(asm)
|
||||||
|
|
||||||
elif "\"" in asm:
|
|
||||||
# convert text to bytes when a quote appears (not in a comment)
|
# convert text to bytes when a quote appears (not in a comment)
|
||||||
|
elif "\"" in asm:
|
||||||
quote_translator(asm)
|
quote_translator(asm)
|
||||||
|
|
||||||
# check against other preprocessor features
|
# check against other preprocessor features
|
||||||
|
Reference in New Issue
Block a user