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

Method COMMENT

output/java/1.4.14/STLexer.java:610–630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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