()
| 110 | } |
| 111 | |
| 112 | func (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 | |
| 123 | func (s *scanner) advance() { |
| 124 | if c, err := s.r.ReadByte(); err != nil { |
no test coverage detected