// Using returns an Emitter that uses a given Lexer for parsing and emitting.
Using returns an Emitter that uses a given Lexer for parsing and emitting.
// Using returns an Emitter that uses a given Lexer for parsing and emitting .
func Using(lexer Lexer) Emitter {
	return EmitterFunc(func(groups []string, _ Lexer) Iterator {
		it, err := lexer.Tokenise(&TokeniseOptions{State: "root", Nested: true}, groups[0])
		if err != nil {
			panic(err)
		}
		return it
	})
}
func Using ( lexer Lexer ) Emitter { return EmitterFunc ( func ( groups [ ] string , _ Lexer ) Iterator { it , err := lexer . Tokenise ( & TokeniseOptions { State : " " , Nested : true } , groups [ 0 ] ) if err != nil { panic ( err ) } return it } ) }
Using returns an Emitter that uses a given Lexer for parsing and emitting.
Using returns an Emitter that uses a given Lexer for parsing and emitting .