Source file
test/fixedbugs/issue71680.go
1
2
3
4
5
6
7 package p
8
9 type Parser struct{}
10 type Node struct{}
11
12 type parserState func(p *Parser) parserState
13
14 func parserStateData(root *Node) parserState {
15 return func(p *Parser) parserState {
16 return parserStateOpenMap(root)(p)
17 }
18 }
19
20 func parserStateOpenMap(root *Node) parserState {
21 return func(p *Parser) parserState {
22 switch {
23 case p != nil:
24 return parserStateData(root)(p)
25 }
26 return parserStateOpenMap(root)(p)
27 }
28 }
29
View as plain text