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

Method selectFromIntpState

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

Source from the content-addressed store, hash-verified

181}
182
183func (intp *Intp) selectFromIntpState(l *lexer) state {
184 l.start = l.pos
185 l.pos += 4
186 l.emit(TIntpFrom)
187
188 if l.accept(whitespace) < 1 {
189 l.emit(TIllegal)
190 return nil
191 }
192
193 l.start = l.pos
194 if !eatIdentifier(l) {
195 l.emit(TIllegal)
196 return nil
197 }
198
199 l.emit(TIdentifier)
200
201 l.accept(whitespace)
202
203 l.start = l.pos
204
205 c := l.next()
206 if c == byte('i') || c == byte('I') {
207 if l.hasPrefixI("NTO") {
208 l.pos += 3
209 if l.accept(whitespace) < 1 {
210 l.emit(TIllegal)
211 return nil
212 }
213 if l.hasPrefixI("O") && l.hasPrefixI("OUTFILE") {
214 l.pos += 7
215 return intp.selectFromIntoOutfileIntpState
216 }
217 }
218 }
219
220 l.start = l.pos
221
222 if c != semi {
223 l.emit(TIllegal)
224 return nil
225 }
226
227 l.emit(TSemi)
228 return nil
229}
230
231func (intp *Intp) selectFromIntoOutfileIntpState(l *lexer) state {
232 l.emit(TIntpIntoOutfile)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected