WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
44.8k stars 1.95k forks source link

[Bug] Parser error when using TemplateStruct<...> @ ... #1415

Open arcusmaximus opened 12 months ago

arcusmaximus commented 12 months ago

Operating System

Windows

What's the issue you encountered?

When defining a placed anonymous field with a templated structure as the type, ImHex fails with a parser error. (This error doesn't happen when using a non-templated structure)

How can the issue be reproduced?

struct TemplateStruct<auto value>
{
};

struct File
{
    TemplateStruct<0> @ 0;
};

File file @ 0;

This results in the following:

   --> <Source Code>:7:21
E: 7 |     TemplateStruct<0> @ 0;
E:                         ^
E:                         Expected N2pl4core5Token10IdentifierE, got N2pl4core5Token8OperatorE.
E: 
E: hint: This is a serious parsing bug. Please open an issue on GitHub!

ImHex Version

1.31.0 7d53636

ImHex Build Type

Installation type

Portable

Additional context?

No response

github-actions[bot] commented 3 weeks ago

This issue is marked stale as it has been open for 11 months without activity. Please try the latest ImHex version. (Avaiable here: https://imhex.download/ for release and https://imhex.download/#nightly for development version) If the issue persists on the latest version, please make a comment on this issue again

Without response, this issue will be closed in one month.