Fix for wrong tokens for GNU/MSVC attribute captures (parse_attributes)

Also a fix for a typo in the readme...
This commit is contained in:
2023-08-08 15:35:06 -04:00
parent c7647ab00f
commit 67d02c1f62
4 changed files with 13 additions and 11 deletions

View File

@ -1428,16 +1428,16 @@ CodeAttributes parse_attributes()
else if ( check(TokType::Decl_GNU_Attribute) )
{
eat(TokType::BraceCurly_Open);
eat(TokType::BraceCurly_Open);
eat(TokType::Capture_Start);
eat(TokType::Capture_Start);
while ( left && currtok.Type != TokType::BraceCurly_Close )
while ( left && currtok.Type != TokType::Capture_End )
{
eat(currtok.Type);
}
eat(TokType::BraceCurly_Close);
eat(TokType::BraceCurly_Close);
eat(TokType::Capture_End);
eat(TokType::Capture_End);
s32 len = ( (sptr)prevtok.Text + prevtok.Length ) - (sptr)start.Text;
}
@ -1445,14 +1445,14 @@ CodeAttributes parse_attributes()
else if ( check(TokType::Decl_MSVC_Attribute) )
{
eat( TokType::Decl_MSVC_Attribute );
eat( TokType::BraceCurly_Open);
eat( TokType::Capture_Start);
while ( left && currtok.Type != TokType::BraceCurly_Close )
while ( left && currtok.Type != TokType::Capture_End )
{
eat(currtok.Type);
}
eat(TokType::BraceCurly_Close);
eat(TokType::Capture_End);
s32 len = ( (sptr)prevtok.Text + prevtok.Length ) - (sptr)start.Text;
}