(p *Parser)
| 32 | } |
| 33 | |
| 34 | func (q *QueryParser) ParseStart(p *Parser) parseState { |
| 35 | for { |
| 36 | c, ok := p.scan() |
| 37 | if !ok { |
| 38 | break |
| 39 | } |
| 40 | |
| 41 | if isOfAny(c, TIntpSelect) { |
| 42 | return q.parseSelect |
| 43 | } |
| 44 | |
| 45 | if isOfAny(c, TIntpShowTables) { |
| 46 | return q.parseShowTables |
| 47 | } |
| 48 | |
| 49 | if isOfAny(c, TIntpShowColumns) { |
| 50 | return q.parseShowColumns |
| 51 | } |
| 52 | |
| 53 | if isOfAny(c, TIntpShowCreateTable) { |
| 54 | return q.parseShowCreateTable |
| 55 | } |
| 56 | |
| 57 | if isOfAny(c, TIntpQuit) { |
| 58 | return q.parseQuit |
| 59 | } |
| 60 | |
| 61 | p.errorUnexpectedLex(c, TIntpSelect, TIntpShowTables, TIntpQuit) |
| 62 | return nil |
| 63 | } |
| 64 | |
| 65 | return nil |
| 66 | } |
| 67 | |
| 68 | func (q *QueryParser) parseQuit(p *Parser) parseState { |
| 69 | x, ok := p.scan() |
nothing calls this directly
no test coverage detected