lexer holds the state of the scanner.
| 62 | |
| 63 | // lexer holds the state of the scanner. |
| 64 | type lexer struct { |
| 65 | name string // used only for error reports. |
| 66 | input string // the string being scanned. |
| 67 | start int // start position of this item. |
| 68 | pos int // current position in the input. |
| 69 | width int // width of last rune read from input. |
| 70 | items chan item // channel of scanned items. |
| 71 | last item |
| 72 | } |
| 73 | |
| 74 | func lex(name, input string) (*lexer, chan item) { |
| 75 | l := &lexer{ |
nothing calls this directly
no outgoing calls
no test coverage detected