()
| 597 | } |
| 598 | |
| 599 | Token COMMENT() { |
| 600 | match('!'); |
| 601 | while ( !(c=='!' && input.LA(2)==delimiterStopChar) ) { |
| 602 | if ( c==EOF ) { |
| 603 | RecognitionException re = new MismatchedTokenException((int)'!', input); |
| 604 | re.line = input.getLine(); |
| 605 | re.charPositionInLine = input.getCharPositionInLine(); |
| 606 | errMgr.lexerError(input.getSourceName(), |
| 607 | "Nonterminated comment starting at " + |
| 608 | startLine +":" + |
| 609 | startCharPositionInLine + |
| 610 | ": '!" + |
| 611 | delimiterStopChar + |
| 612 | "' missing" , templateToken, re); |
| 613 | break; |
| 614 | } |
| 615 | consume(); |
| 616 | } |
| 617 | consume(); |
| 618 | consume(); // grab !> |
| 619 | return newToken(COMMENT); |
| 620 | } |
| 621 | |
| 622 | void LINEBREAK() { |
| 623 | match('\\'); // only kill 2nd \ as ESCAPE() kills first one |
no test coverage detected