Pump any '\t' and ' ' to buf, handle any following comment, and if the next character is '\n', discard it. @return Whether a '\n' was found and discarded.
()
| 323 | * @return Whether a '\n' was found and discarded. |
| 324 | */ |
| 325 | private boolean readForNewLine() { |
| 326 | final int savedTabs = tabs; |
| 327 | char c = peek(); |
| 328 | while (!EOF && (c == '\t' || c == ' ')) { |
| 329 | buf.append(nextChar()); |
| 330 | c = peek(); |
| 331 | } |
| 332 | |
| 333 | if (c == '/') { |
| 334 | buf.append(nextChar()); |
| 335 | c = peek(); |
| 336 | if (c == '*') { |
| 337 | buf.append(nextChar()); |
| 338 | handleMultiLineComment(); |
| 339 | } else if (c == '/') { |
| 340 | buf.append(nextChar()); |
| 341 | handleSingleLineComment(); |
| 342 | return true; |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | c = peek(); |
| 347 | if (c == '\n') { |
| 348 | // eat it |
| 349 | nextChar(); |
| 350 | tabs = savedTabs; |
| 351 | return true; |
| 352 | } |
| 353 | return false; |
| 354 | } |
| 355 | |
| 356 | |
| 357 | /** |
no test coverage detected