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

Method showCreateTableIntpState

interpreter.go:48–90  ·  view source on GitHub ↗
(l *lexer)

Source from the content-addressed store, hash-verified

46}
47
48func (intp *Intp) showCreateTableIntpState(l *lexer) state {
49 l.pos += 6
50
51 if l.accept(whitespace) < 1 {
52 l.emit(TIllegal)
53 return nil
54 }
55
56 l.start = l.pos
57
58 if !l.hasPrefixI("TABLE") {
59 l.emit(TIllegal)
60 return nil
61 }
62 l.pos += 5
63 l.emit(TIntpShowCreateTable)
64 // TODO emit non-existing T_TABLE?
65
66 if l.accept(whitespace) < 1 {
67 l.emit(TIllegal)
68 return nil
69 }
70
71 l.start = l.pos
72
73 if eatIdentifier(l) {
74 l.emit(TIdentifier)
75 } else {
76 l.emit(TIllegal)
77 return nil
78 }
79
80 l.accept(whitespace)
81 l.start = l.pos
82
83 c := l.next()
84 if c != semi {
85 l.emit(TIllegal)
86 return nil
87 }
88
89 return nil
90}
91
92func (intp *Intp) showColumnsIntpState(l *lexer) state {
93 l.pos += 7

Callers

nothing calls this directly

Calls 5

eatIdentifierFunction · 0.85
acceptMethod · 0.80
emitMethod · 0.80
hasPrefixIMethod · 0.80
nextMethod · 0.80

Tested by

no test coverage detected