Skip to content

Commit

Permalink
stm32/make-stmconst.py: Support TypeDef's with a single char prefix.
Browse files Browse the repository at this point in the history
Update the regex to support parsing files from the STM32CubeU5 library.
  • Loading branch information
jandriea authored and dpgeorge committed Sep 23, 2022
1 parent 25ff5b5 commit 30e50ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/stm32/make-stmconst.py
Expand Up @@ -72,7 +72,7 @@ class Lexer:
("}", re.compile(r"}$")),
(
"} TypeDef",
re.compile(r"} *(?P<id>[A-Z][A-Za-z0-9_]+)_(?P<global>([A-Za-z0-9_]+)?)TypeDef;$"),
re.compile(r"} *(?P<id>[A-Z][A-Za-z0-9_]*)_(?P<global>([A-Za-z0-9_]+)?)TypeDef;$"),
),
(
"IO reg",
Expand Down

0 comments on commit 30e50ab

Please sign in to comment.