Skip to content

[BUG]: Can't get array_sizewhen the number inside the parentheses() #84

Description

@rkocjh1997

Problem description

First, I have a header file, just like:

#define POINT_SIZE (80)

typedef struct
{
    uint32_t lat[POINT_SIZE];
    uint32_t lon[POINT_SIZE];
} LINEAR_OBJECT;

Then, I preprocessed the header by using PCPP, the header:

typedef struct
{
    uint32_t lat[(80)];
    uint32_t lon[(80)];
} LINEAR_OBJECT;

I parse this header, but I can't get array_size.
After investigation, the code that caused this problem was found(line 3326). If modify it like this, the problem can be solved

                    # self.nameStack[: bracePos + 1] + self.nameStack[endParen + 1 :] # original code
                    self.nameStack[: bracePos + 1] + self.nameStack[parenPos + 1 : endParen] + self.nameStack[endParen + 1 :] # modified code

Operating System

Linux

Installed Python Packages

No response

Reproducible example code

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions