()
| 216 | } |
| 217 | |
| 218 | func (l *Scanner) fetchComment() (ok bool) { |
| 219 | l.pos++ |
| 220 | |
| 221 | n := ScanPairGreedy(l.data[l.pos:], '(', ')') |
| 222 | if n == -1 { |
| 223 | l.err = true |
| 224 | return false |
| 225 | } |
| 226 | |
| 227 | l.itemType = ItemComment |
| 228 | l.itemBytes = RemoveByte(l.data[l.pos:l.pos+n], '\\') |
| 229 | l.pos += n + 1 |
| 230 | |
| 231 | return true |
| 232 | } |
| 233 | |
| 234 | // ScanUntil scans for first non-escaped character c in given data. |
| 235 | // It returns index of matched c and -1 if c is not found. |