1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed reformat removing errors in switch block

This commit is contained in:
Brian Fiete 2020-10-11 07:49:54 -07:00
parent c337bee05c
commit 0d05b81a69

View file

@ -3304,9 +3304,11 @@ BfSwitchStatement* BfReducer::CreateSwitchStatement(BfTokenNode* tokenNode)
token = tokenNode->GetToken();
if ((tokenNode == NULL) ||
((token != BfToken_Case) && (token != BfToken_When) && (token != BfToken_Default)))
{
{
Fail("Expected 'case'", child);
return switchStatement;
AddErrorNode(child);
isDone = !mVisitorPos.MoveNext();
continue;
}
//TODO: This error was getting annoying... Put back?