3 ms·
Here's the source if you just want to dive in: http://golang.org/src/pkg/text/template/parse/lex.go http://golang.org/src/pkg/text/template/parse/lex.go. Havin
by wonderzombie 15y ago
Here's the source if you just want to dive in: http://golang.org/src/pkg/text/template/parse/lex.go http://golang.org/src/pkg/text/template/parse/lex.go.
Having "grown up" in OO-land, the stateFn pattern was a bit odd to me. However in practical terms this pattern is pretty neat.
- groovy2shoes 15y agoThat's pretty cool. The stateFn pattern seems a lot like recursive descent on a trampoline (iterative descent?).