Allow expected in MessageEnd

This commit is contained in:
Brandon Dyck 2024-09-17 21:37:07 -06:00
parent 9673903dd7
commit 4455c34735

View File

@ -118,7 +118,9 @@ func (m Message) String() string {
func MessageOK(pos uint64) Message { return Message{pos: pos} }
func MessageEnd(pos uint64) Message { return Message{pos: pos, got: "end of input"} }
func MessageEnd(pos uint64, expected ...string) Message {
return Message{pos: pos, got: "end of input", expected: expected}
}
func MakeState[In any](c cursor.Cursor[In]) State[In] {
return State[In]{cursor: c}