crushkv/crushmap/text_space.go
Vasiliy Tolstov 24f641df0d initial rewrite
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-04-18 23:13:04 +03:00

17 lines
260 B
Go

package crushmap
import "fmt"
func spaceState(l *lex) stateFn {
r := l.lexNext()
if r != ' ' && r != '\t' && r != '\n' && r != '\r' {
l.lexErr(fmt.Sprintf("unexpected token %q", r))
return nil
}
l.lexTake(" \t")
l.lexIgnore()
return l.lexPop()
}