Allow expected in MessageEnd
This commit is contained in:
parent
9673903dd7
commit
4455c34735
@ -118,7 +118,9 @@ func (m Message) String() string {
|
|||||||
|
|
||||||
func MessageOK(pos uint64) Message { return Message{pos: pos} }
|
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] {
|
func MakeState[In any](c cursor.Cursor[In]) State[In] {
|
||||||
return State[In]{cursor: c}
|
return State[In]{cursor: c}
|
||||||
|
Loading…
Reference in New Issue
Block a user