MCPcopy Create free account
hub / github.com/antlr/codebuff / COMMENT

Method COMMENT

output/java/1.4.19/STLexer.java:617–636  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

615 }
616
617 Token COMMENT() {
618 match('!');
619 while ( !(c=='!' && input.LA(2)==delimiterStopChar) ) {
620 if ( c==EOF ) {
621 RecognitionException re = new MismatchedTokenException((int)'!', input);
622 re.line = input.getLine();
623 re.charPositionInLine = input.getCharPositionInLine();
624 errMgr.lexerError(input.getSourceName(), "Nonterminated comment starting at " +
625 startLine +":"+startCharPositionInLine +
626 ": '!" +
627 delimiterStopChar +
628 "' missing", templateToken, re);
629 break;
630 }
631 consume();
632 }
633 consume();
634 consume(); // grab !>
635 return newToken(COMMENT);
636 }
637
638 void LINEBREAK() {
639 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