Open DeadSix27 opened 2 years ago
Took me a while to get into it but I figured out your RegEx is missing some different type of pin definitions..
For example my Metro ESP32 uses this format:
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
Which your regex:
\s*{\s*MP_ROM_QSTR\(MP_QSTR_(?P<name>[^\)]*)\)\s*,\s*MP_ROM_PTR\((?P<value>[^\)]*)\).*
.. is not capturing..
thus an edit like this
\s*{\s*MP_(?:OBJ_NEW|ROM)_QSTR\(MP_QSTR_(?P<name>[^\)]*)\)\s*,\s*MP_ROM_PTR\((?P<value>[^\)]*)\).*
should do the trick, I use that on my local fork at least.
Took me a while to get into it but I figured out your RegEx is missing some different type of pin definitions..
For example my Metro ESP32 uses this format:
Which your regex:
.. is not capturing..
thus an edit like this
should do the trick, I use that on my local fork at least.