Fix expectSeparator
This commit is contained in:
parent
c22fa66492
commit
3917dc6adc
@ -135,7 +135,7 @@ func expectSeparator(tokens []LexToken, separators ...Separator) (Separator, []L
|
|||||||
|
|
||||||
separator := tokens[0]
|
separator := tokens[0]
|
||||||
if separator.Type != Type_Separator || !slices.Contains(separators, separator.Value.(Separator)) {
|
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
|
return separator.Value.(Separator), tokens[1:], nil
|
||||||
|
Loading…
Reference in New Issue
Block a user