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

Method incrementLineNumber

scanner.go:112–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110}
111
112func (s *scanner) incrementLineNumber() {
113 old := s.current
114 s.assert(isNewLine(old))
115 if s.advance(); isNewLine(s.current) && s.current != old {
116 s.advance()
117 }
118 if s.lineNumber++; s.lineNumber >= maxInt {
119 s.syntaxError("chunk has too many lines")
120 }
121}
122
123func (s *scanner) advance() {
124 if c, err := s.r.ReadByte(); err != nil {

Callers 3

readMultiLineMethod · 0.95
readStringMethod · 0.95
scanMethod · 0.95

Calls 4

assertMethod · 0.95
advanceMethod · 0.95
syntaxErrorMethod · 0.95
isNewLineFunction · 0.85

Tested by

no test coverage detected