Skip to content

Incorrect parsing of multiple declarators in a single declaration #85

@d3dave

Description

@d3dave

The definition struct X { int x : 16, y : 16; } gets parsed incorrectly into the following tokens:

[<Token.STRUCT value='struct'>,
 <Token.IDENTIFIER value='X'>,
 <Token.BLOCK value='{'>,
 <Token.IDENTIFIER value='int'>,
 <Token.IDENTIFIER value='x'>,
 <Token.NAME value='y : 16'>,
 <Token.EOL value=';'>,
 <Token.BLOCK value='}'>]

As you can see, x : 16 is mistakenly truncated and treated as an identifier instead of a name like y : 16.

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