Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Some boards do not parse correctly #99

Open
DeadSix27 opened this issue Oct 16, 2022 · 0 comments
Open

[BUG] Some boards do not parse correctly #99

DeadSix27 opened this issue Oct 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@DeadSix27
Copy link

DeadSix27 commented Oct 16, 2022

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.

@DeadSix27 DeadSix27 added the bug Something isn't working label Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant