Open wtdcode opened 3 years ago
C file:
typedef enum Test { A1L2, A = A1L2, } Test;
Script:
from pyclibrary import CParser print(CParser(["/tmp/test.h"]).defs)
Get
{'types': {'Test': Type('enum Test A1L2 A A1L2')}, 'variables': {}, 'fnmacros': {}, 'macros': {}, 'structs': {}, 'unions': {}, 'enums': {}, 'functions': {}, 'values': {'A1L2': 0, 'A': None}}
When evaluating the value, the 1L in A1L2 is treated as an integer literal and thus rstripped.
1L
A1L2
C file:
Script:
Get