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

Method match

output/java/1.4.12/STLexer.java:214–220  ·  view source on GitHub ↗

Consume if x is next character on the input stream.

(char x)

Source from the content-addressed store, hash-verified

212 */
213
214 public void match(char x) {
215 if ( c!= x ) {
216 NoViableAltException e = new NoViableAltException("", 0, 0, input);
217 errMgr.lexerError(input.getSourceName(), "expecting '"+x+"', found '"+str(c)+"'", templateToken, e);
218 }
219 consume();
220 }
221
222 protected void consume() {
223 input.consume();

Callers 5

insideMethod · 0.95
ESCAPEMethod · 0.95
UNICODEMethod · 0.95
COMMENTMethod · 0.95
LINEBREAKMethod · 0.95

Calls 4

strMethod · 0.95
consumeMethod · 0.95
lexerErrorMethod · 0.45
getSourceNameMethod · 0.45

Tested by

no test coverage detected