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

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

// stateUpperMa is the state after reading `Ma`.
func stateUpperMa(s *scanner, c int) int {
	if c == 'x' {
		s.step = generateState("MaxKey", []byte("Key"), stateOptionalConstructor)
		return scanContinue
	}
	return s.error(c, "in literal MaxKey (expecting 'x')")
}