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

Method COMMENT

output/java8/1.4.13/STLexer.java:589–604  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

587 }
588
589 Token COMMENT() {
590 match('!');
591 while ( !(c=='!' && input.LA(2)==delimiterStopChar) ) {
592 if ( c==EOF ) {
593 RecognitionException re = new MismatchedTokenException((int)'!', input);
594 re.line = input.getLine();
595 re.charPositionInLine = input.getCharPositionInLine();
596 errMgr.lexerError(input.getSourceName(), "Nonterminated comment starting at "+startLine+":"+startCharPositionInLine+": '!"+delimiterStopChar+"' missing", templateToken, re);
597 break;
598 }
599 consume();
600 }
601 consume();
602 consume(); // grab !>
603 return newToken(COMMENT);
604 }
605
606 void LINEBREAK() {
607 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