MCPcopy Create free account
hub / github.com/donatj/sqlread / createTableParamTypeState

Function createTableParamTypeState

states.go:300–328  ·  view source on GitHub ↗
(l *lexer)

Source from the content-addressed store, hash-verified

298}
299
300func createTableParamTypeState(l *lexer) state {
301 l.accept(whitespace)
302 l.start = l.pos
303
304 for {
305 c := l.next()
306 r := rune(c)
307
308 if !unicode.IsLetter(r) {
309 if l.start == l.pos-1 {
310 l.emit(TIllegal)
311 return nil
312 }
313
314 l.rewind()
315 li := l.emit(TColumnType)
316
317 if c == lprn {
318 if li.Val == "enum" {
319 return createTableParamTypeEnumValuesState
320 }
321
322 return createTableParamTypeSizeState
323 }
324
325 return createTableParamDetailsState
326 }
327 }
328}
329
330func createTableParamTypeEnumValuesState(l *lexer) state {
331 if l.accept([]byte{lprn}) != 1 {

Callers

nothing calls this directly

Calls 4

acceptMethod · 0.80
nextMethod · 0.80
emitMethod · 0.80
rewindMethod · 0.80

Tested by

no test coverage detected