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

Function untilSemiStateBuilder

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

Source from the content-addressed store, hash-verified

179}
180
181func untilSemiStateBuilder(emit lexItemType, ret state) state {
182 return func(l *lexer) state {
183 l.start = l.pos
184
185 if l.until(semi) {
186 l.rewind()
187 l.emit(emit)
188 l.start = l.pos
189 l.pos++
190 l.emit(TSemi)
191 } else {
192 l.emit(TIllegal)
193 return nil
194 }
195
196 return ret
197 }
198}
199
200func untilNewlineStateBuilder(emit lexItemType, ret state) state {
201 return func(l *lexer) state {

Callers 2

StartIntpStateMethod · 0.85
StartStateFunction · 0.85

Calls 3

untilMethod · 0.80
rewindMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected