Fix C parser crashing on #endif at EOF

This commit is contained in:
GriffinR 2022-12-31 12:26:32 -05:00
parent 5af662a49e
commit 600af6dc72

View file

@ -467,8 +467,8 @@ namespace fex
while (index_ < tokens_.size())
{
while (Next().type() != Token::Type::kConst)
;
if (Next().type() != Token::Type::kConst)
continue;
Next(); // struct
std::string type = Next().string_value();
@ -497,8 +497,8 @@ namespace fex
while (index_ < tokens_.size())
{
while (Next().type() != Token::Type::kConst)
;
if (Next().type() != Token::Type::kConst)
continue;
Next(); // struct
Next(); // type