2020-04-23 19:39:20 +03:00
|
|
|
package json
|
|
|
|
|
2020-04-30 13:08:50 +03:00
|
|
|
var (
|
|
|
|
isWhiteSpace = [256]bool{}
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
isWhiteSpace[' '] = true
|
|
|
|
isWhiteSpace['\n'] = true
|
|
|
|
isWhiteSpace['\t'] = true
|
|
|
|
isWhiteSpace['\r'] = true
|
|
|
|
}
|
|
|
|
|
2020-05-06 20:37:29 +03:00
|
|
|
func skipWhiteSpace(buf []byte, cursor int) int {
|
2020-05-07 07:44:41 +03:00
|
|
|
LOOP:
|
|
|
|
if isWhiteSpace[buf[cursor]] {
|
|
|
|
cursor++
|
|
|
|
goto LOOP
|
2020-04-23 19:39:20 +03:00
|
|
|
}
|
2020-05-07 07:44:41 +03:00
|
|
|
return cursor
|
2020-04-23 19:39:20 +03:00
|
|
|
}
|