[python] upgrade to micropython 1.12

This commit is contained in:
Émilie Feral
2020-04-06 14:57:17 +02:00
committed by LeaNumworks
parent 010fb1894f
commit 7df8c2935a
83 changed files with 3516 additions and 1284 deletions

View File

@@ -279,9 +279,11 @@ def parse_input_headers(infiles):
# get the qstr value
qstr = match.group(1)
# special case to specify control characters
# special cases to specify control characters
if qstr == '\\n':
qstr = '\n'
elif qstr == '\\r\\n':
qstr = '\r\n'
# work out the corresponding qstr name
ident = qstr_escape(qstr)
@@ -337,7 +339,7 @@ def print_qstr_data(qcfgs, qstrs):
print('')
# add NULL qstr with no hash or data
print('QDEF(MP_QSTR_NULL, (const byte*)"%s%s" "")' % ('\\x00' * cfg_bytes_hash, '\\x00' * cfg_bytes_len))
print('QDEF(MP_QSTRnull, (const byte*)"%s%s" "")' % ('\\x00' * cfg_bytes_hash, '\\x00' * cfg_bytes_len))
# go through each qstr and print it out
for order, ident, qstr in sorted(qstrs.values(), key=lambda x: x[0]):