MCPcopy Index your code
hub / github.com/Shopify/go-lua / readDecimalEscape

Method readDecimalEscape

scanner.go:336–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334}
335
336func (s *scanner) readDecimalEscape() (r rune) {
337 b := [3]rune{}
338 for c, i := s.current, 0; i < len(b) && isDecimal(c); i, c = i+1, s.current {
339 b[i], r = c, 10*r+c-'0'
340 s.advance()
341 }
342 if r > math.MaxUint8 {
343 s.escapeError(b[:], "decimal escape too large")
344 }
345 return
346}
347
348func (s *scanner) readString() token {
349 delimiter := s.current

Callers 1

readStringMethod · 0.95

Calls 3

advanceMethod · 0.95
escapeErrorMethod · 0.95
isDecimalFunction · 0.85

Tested by

no test coverage detected