From 30e50ab1951680a046c224c12f7cc29aed410e2a Mon Sep 17 00:00:00 2001 From: Jatty_ Date: Tue, 13 Sep 2022 18:38:03 +0700 Subject: [PATCH] stm32/make-stmconst.py: Support TypeDef's with a single char prefix. Update the regex to support parsing files from the STM32CubeU5 library. --- ports/stm32/make-stmconst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm32/make-stmconst.py b/ports/stm32/make-stmconst.py index 554d662384..aab4038e61 100644 --- a/ports/stm32/make-stmconst.py +++ b/ports/stm32/make-stmconst.py @@ -72,7 +72,7 @@ class Lexer: ("}", re.compile(r"}$")), ( "} TypeDef", - re.compile(r"} *(?P[A-Z][A-Za-z0-9_]+)_(?P([A-Za-z0-9_]+)?)TypeDef;$"), + re.compile(r"} *(?P[A-Z][A-Za-z0-9_]*)_(?P([A-Za-z0-9_]+)?)TypeDef;$"), ), ( "IO reg",