Fix expectSeparator

This commit is contained in:
MrLetsplay 2024-03-11 22:08:03 +01:00
parent c22fa66492
commit 3917dc6adc
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg

View File

@ -135,7 +135,7 @@ func expectSeparator(tokens []LexToken, separators ...Separator) (Separator, []L
separator := tokens[0]
if separator.Type != Type_Separator || !slices.Contains(separators, separator.Value.(Separator)) {
return InvalidValue, nil, errors.New("expected one of " + strings.Join(separatorNames, ", "))
return InvalidValue, nil, errors.New("expected one of " + strings.Join(separatorNames, " "))
}
return separator.Value.(Separator), tokens[1:], nil