Fix suffixexp.argsfirstarg expecting ')' instead of name after ':'

This commit is contained in:
0x4261756D 2024-02-21 15:10:37 +01:00
parent 3a6e024c9b
commit ae4a3e9993

View File

@ -1018,7 +1018,7 @@ class Parser
{
throw new Exception($"Index {index} out of bounds of {tokens.Length}, expected name as first arg after `:` in args suffix in suffix-expression starting at {suffixStartRegion}");
}
if(tokens[index].type != TokenType.RoundClosed)
if(tokens[index].type != TokenType.Name)
{
throw new Exception($"{tokens[index].region}: Expected name as first arg after `:` in args suffix in suffix-expression at {suffixStartRegion}, got {tokens[index].type}");
}