Fix labels expecting a name instead of '::' to close

This commit is contained in:
0x4261756D 2024-02-21 15:08:50 +01:00
parent 6193441621
commit c7ac2cf091

View File

@ -830,7 +830,7 @@ class Parser
{
throw new Exception($"Index {index} out of bounds of {tokens.Length}, expected `::` after label name starting at {startRegion}");
}
if(tokens[index].type != TokenType.Name)
if(tokens[index].type != TokenType.ColonColon)
{
throw new Exception($"{tokens[index].region}: Expected `::` after label name starting at {startRegion}, got {tokens[index].type}");
}