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

Method match

output/java/1.4.14/STLexer.java:214–222  ·  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)+"'",
218 templateToken,
219 e);
220 }
221 consume();
222 }
223
224 protected void consume() {
225 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