MCPcopy
hub / github.com/pquerna/ffjson / lexString

Method lexString

fflib/v1/lexer.go:260–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258}
259
260func (ffl *FFLexer) lexString() FFTok {
261 if ffl.captureAll {
262 ffl.buf.Reset()
263 err := ffl.reader.SliceString(&ffl.buf)
264
265 if err != nil {
266 ffl.BigError = err
267 return FFTok_error
268 }
269
270 WriteJson(ffl.Output, ffl.buf.Bytes())
271
272 return FFTok_string
273 } else {
274 err := ffl.reader.SliceString(ffl.Output)
275
276 if err != nil {
277 ffl.BigError = err
278 return FFTok_error
279 }
280
281 return FFTok_string
282 }
283}
284
285func (ffl *FFLexer) lexNumber() FFTok {
286 var numRead int = 0

Callers 1

ScanMethod · 0.95

Calls 4

WriteJsonFunction · 0.85
SliceStringMethod · 0.80
ResetMethod · 0.65
BytesMethod · 0.65

Tested by

no test coverage detected