MCPcopy Index your code
hub / github.com/antlr/codebuff / COMMENT

Method COMMENT

output/java8/1.4.17/STLexer.java:613–628  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

611 }
612
613 Token COMMENT() {
614 match('!');
615 while ( !(c=='!' && input.LA(2)==delimiterStopChar) ) {
616 if ( c==EOF ) {
617 RecognitionException re = new MismatchedTokenException((int)'!', input);
618 re.line = input.getLine();
619 re.charPositionInLine = input.getCharPositionInLine();
620 errMgr.lexerError(input.getSourceName(), "Nonterminated comment starting at "+startLine+":"+startCharPositionInLine+": '!"+delimiterStopChar+"' missing", templateToken, re);
621 break;
622 }
623 consume();
624 }
625 consume();
626 consume(); // grab !>
627 return newToken(COMMENT);
628 }
629
630 void LINEBREAK() {
631 match('\\'); // only kill 2nd \ as ESCAPE() kills first one

Callers 1

outsideMethod · 0.95

Calls 7

matchMethod · 0.95
consumeMethod · 0.95
newTokenMethod · 0.95
getCharPositionInLineMethod · 0.80
getLineMethod · 0.45
lexerErrorMethod · 0.45
getSourceNameMethod · 0.45

Tested by

no test coverage detected