Refactor isWhiteSpace at streaming decoding

This commit is contained in:
Masaaki Goshima 2021-02-06 20:08:18 +09:00
parent 0c1e7c61e0
commit 6f972bcc9d
1 changed files with 3 additions and 3 deletions

View File

@ -85,11 +85,11 @@ func (s *stream) read() bool {
func (s *stream) skipWhiteSpace() {
LOOP:
c := s.char()
if isWhiteSpace[c] {
switch s.char() {
case ' ', '\n', '\t', '\r':
s.cursor++
goto LOOP
} else if c == nul {
case nul:
if s.read() {
goto LOOP
}