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

Function untilNewlineStateBuilder

states.go:200–217  ·  view source on GitHub ↗
(emit lexItemType, ret state)

Source from the content-addressed store, hash-verified

198}
199
200func untilNewlineStateBuilder(emit lexItemType, ret state) state {
201 return func(l *lexer) state {
202 l.start = l.pos
203
204 if l.until('\n') {
205 l.rewind()
206 l.emit(emit)
207 l.start = l.pos
208 l.pos++
209 l.emit(TSemi)
210 } else {
211 l.emit(TIllegal)
212 return nil
213 }
214
215 return ret
216 }
217}
218
219func createTableState(l *lexer) state {
220 l.start = l.pos

Callers 1

StartStateFunction · 0.85

Calls 3

untilMethod · 0.80
rewindMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected