Commit to get compatibility with the latest parsekit.

This commit is contained in:
Maurice Makaay 2019-05-24 16:01:35 +00:00
parent 3e0c9136c3
commit 3cc6fed3df
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ var (
func startKeyValuePair(p *parsekit.P) {
switch {
case p.On(a.WhitespaceAndNewlines).Skip().RouteRep().End():
case p.On(a.WhitespaceAndNewlines).Skip().RouteRepeat().End():
case p.On(a.Hash).RouteTo(startComment).ThenReturnHere().End():
case p.On(startOfKey).RouteTo(startKey).End():
default:

View File

@ -51,10 +51,10 @@ func parseBasicString(p *parsekit.P) {
switch {
case p.On(charThatMustBeEscaped).End():
p.EmitError("invalid character in basic string: %q (must be escaped)", p.LastMatch)
case p.On(validEscape).Accept().RouteRep().End():
case p.On(validEscape).Accept().RouteRepeat().End():
case p.On(a.Backslash).RouteReturn().End():
case p.On(a.DoubleQuote).RouteReturn().End():
case p.On(a.AnyRune).Accept().RouteRep().End():
case p.On(a.AnyRune).Accept().RouteRepeat().End():
}
}