[preproc] support C23 enum underlying type syntax (#2043)
This commit is contained in:
parent
6d24d8a78f
commit
fcc067e515
1 changed files with 11 additions and 0 deletions
|
@ -524,6 +524,17 @@ bool AsmFile::ParseEnum()
|
||||||
long enumCounter = 0;
|
long enumCounter = 0;
|
||||||
long symbolCount = 0;
|
long symbolCount = 0;
|
||||||
|
|
||||||
|
if (m_buffer[m_pos] == ':') // : <type>
|
||||||
|
{
|
||||||
|
m_pos++;
|
||||||
|
std::string underlyingType;
|
||||||
|
do {
|
||||||
|
currentHeaderLine += SkipWhitespaceAndEol();
|
||||||
|
underlyingType = ReadIdentifier();
|
||||||
|
} while (!underlyingType.empty());
|
||||||
|
currentHeaderLine += SkipWhitespaceAndEol();
|
||||||
|
}
|
||||||
|
|
||||||
if (m_buffer[m_pos] != '{') // assume assembly macro, otherwise assume enum and report errors accordingly
|
if (m_buffer[m_pos] != '{') // assume assembly macro, otherwise assume enum and report errors accordingly
|
||||||
{
|
{
|
||||||
m_pos = fallbackPosition - 4;
|
m_pos = fallbackPosition - 4;
|
||||||
|
|
Loading…
Reference in a new issue