mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
speed up text conversion in preprocessor
This commit is contained in:
parent
458709fc77
commit
01f48a54e8
@ -344,6 +344,7 @@ def quote_translator(asm):
|
|||||||
sys.stdout.write(asm)
|
sys.stdout.write(asm)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
output = ""
|
||||||
even = False
|
even = False
|
||||||
i = 0
|
i = 0
|
||||||
for token in asms:
|
for token in asms:
|
||||||
@ -384,15 +385,18 @@ def quote_translator(asm):
|
|||||||
char = char + token[0]
|
char = char + token[0]
|
||||||
token = token[1:]
|
token = token[1:]
|
||||||
|
|
||||||
sys.stdout.write("${0:02X}".format(chars[char]))
|
output += ("${0:02X}".format(chars[char]))
|
||||||
|
|
||||||
if len(token):
|
if len(token):
|
||||||
sys.stdout.write(", ")
|
output += (", ")
|
||||||
# if not even
|
# if not even
|
||||||
else:
|
else:
|
||||||
sys.stdout.write(token)
|
output += (token)
|
||||||
|
|
||||||
even = not even
|
even = not even
|
||||||
|
|
||||||
|
sys.stdout.write(output)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def extract_token(asm):
|
def extract_token(asm):
|
||||||
|
Loading…
Reference in New Issue
Block a user