-
Notifications
You must be signed in to change notification settings - Fork 7
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
Incorrect handling of enums #24
Comments
I forgot to remove |
It looks like there is a problem with the regex: litgen/src/litgen/internal/cpp_to_python.py Line 753 in 6eb5fd3
I think it should be like this (?:[^a-zA-Z0-9]|\b)([+-]?[0-9]+(?:\.[0-9]*)?|\.[0-9]+)([df]?)\b |
pthom
added a commit
that referenced
this issue
Nov 29, 2024
Hello, thanks for letting me know ! I corrected it. FYI, the final regex is even more complex:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The litgen tool does not correctly preserve the comments for enum values in the generated .pyi file. Specifically, if the enum value has a comment with the letter "E" or "F" (e.g.,
SHT_MIPS_OPTIONS = enum.auto() # (= 0x7000000)
), these comments are omitted in the generated .pyi file, making the output incorrect and less informative.Processed C++ enum
Generated Pyi file
The problem appears in the comments for
SHT_MIPS_OPTIONS
,SHT_MIPS_DELTACLASS
,SHT_MIPS_DELTADECL
The text was updated successfully, but these errors were encountered: