We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Python 3.8.10 pyclibrary just installed with pip
Sample header file:
#define MP_STRINGIFY(A) #A #define MICROPY_VERSION_MAJOR 1 #define MICROPY_VERSION_MINOR 20 #define MICROPY_VERSION_MICRO 0 #define MICROPY_VERSION_STRING MP_STRINGIFY(MICROPY_VERSION_MAJOR) "." MP_STRINGIFY(MICROPY_VERSION_MINOR) "." MP_STRINGIFY(MICROPY_VERSION_MICRO)
I process the file with
parser = CParser(filename) parser.process_all() print(parser.defs["values"])
The output is
{'MICROPY_VERSION_MAJOR': 1, 'MICROPY_VERSION_MINOR': 20, 'MICROPY_VERSION_MICRO': 0, 'MICROPY_VERSION_STRING': None}
Problem: MICROPY_VERSION_STRING isn't evaluated.
I tried also with this definition
#define MP_STRINGIFY(A) str(A) #define str(A) #A
Please, can you help me to solve it?
The text was updated successfully, but these errors were encountered:
Addendum
Parsing the file with MP_STRINGIFY, I get this warning
:1: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
Is 1 the line number? These are the first lines of the real file...
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT)
Second observation. Looking at fnmacros I see
fnmacros {'str': ('#{}', [0]), 'MP_STRINGIFY': ('#{}', [0]), etc...
Sorry, something went wrong.
No branches or pull requests
Python 3.8.10
pyclibrary just installed with pip
Sample header file:
I process the file with
The output is
Problem: MICROPY_VERSION_STRING isn't evaluated.
I tried also with this definition
Please, can you help me to solve it?
The text was updated successfully, but these errors were encountered: