diff options
| -rw-r--r-- | ports/stm32/make-stmconst.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ports/stm32/make-stmconst.py b/ports/stm32/make-stmconst.py index 770033ef5..5601eb0af 100644 --- a/ports/stm32/make-stmconst.py +++ b/ports/stm32/make-stmconst.py @@ -41,7 +41,10 @@ class Lexer: r"#define +(?P<id>[A-Z0-9_]+) +\(?(\(uint32_t\))?(?P<hex>0x[0-9A-F]+)U?L?\)?($| */\*)" ), ), - ("#define X", re.compile(r"#define +(?P<id>[A-Z0-9_]+) +(?P<id2>[A-Z0-9_]+)($| +/\*)")), + ( + "#define X", + re.compile(r"#define +(?P<id>[A-Z0-9_]+) +\(?(?P<id2>[A-Z0-9_]+)\)?($| +/\*)"), + ), ( "#define X+hex", re.compile( |
