summaryrefslogtreecommitdiff
path: root/src/mongo/gotools/common/json/nan.go
blob: 23219906ce36392e9f2b1e429344bb69f407aafe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package json

// Transition functions for recognizing NaN.
// Adapted from encoding/json/scanner.go.

// stateUpperNa is the state after reading `Na`.
func stateUpperNa(s *scanner, c int) int {
	if c == 'N' {
		s.step = stateEndValue
		return scanContinue
	}
	return s.error(c, "in literal NaN (expecting 'N')")
}