Implement most of Regexp parser

This commit is contained in:
2024-09-10 16:46:31 -06:00
parent a7495bde87
commit 96d178efef
3 changed files with 54 additions and 0 deletions

View File

@ -57,6 +57,10 @@ func (s State[In]) Pos() uint64 {
return s.cursor.Pos()
}
func (s State[In]) At(pos uint64) State[In] {
return State[In]{cursor: s.cursor.At(pos)}
}
type Parser[In, Out any] func(State[In]) (consumed bool, reply Result[In, Out], err error)
func Return[In, Out any](value Out) Parser[In, Out] {