| 298 | } |
| 299 | |
| 300 | func 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 | |
| 330 | func createTableParamTypeEnumValuesState(l *lexer) state { |
| 331 | if l.accept([]byte{lprn}) != 1 { |