MCPcopy Create free account
hub / github.com/beanshell/beanshell / jj_consume_token

Method jj_consume_token

src/bsh/Parser.java:6099–6121  ·  view source on GitHub ↗
(int kind)

Source from the content-addressed store, hash-verified

6097 }
6098
6099 final private Token jj_consume_token(int kind) throws ParseException {
6100 Token oldToken;
6101 if ((oldToken = token).next != null) token = token.next;
6102 else token = token.next = token_source.getNextToken();
6103 jj_ntk = -1;
6104 if (token.kind == kind) {
6105 jj_gen++;
6106 if (++jj_gc > 100) {
6107 jj_gc = 0;
6108 for (int i = 0; i < jj_2_rtns.length; i++) {
6109 JJCalls c = jj_2_rtns[i];
6110 while (c != null) {
6111 if (c.gen < jj_gen) c.first = null;
6112 c = c.next;
6113 }
6114 }
6115 }
6116 return token;
6117 }
6118 token = oldToken;
6119 jj_kind = kind;
6120 throw generateParseException();
6121 }
6122
6123 static private final class LookaheadSuccess extends java.lang.Error { }
6124 final private LookaheadSuccess jj_ls = new LookaheadSuccess();

Callers 15

LineMethod · 0.95
ModifiersMethod · 0.95
ClassDeclarationMethod · 0.95
MethodDeclarationMethod · 0.95
PackageDeclarationMethod · 0.95
ImportDeclarationMethod · 0.95
VariableDeclaratorMethod · 0.95
VariableInitializerMethod · 0.95
ArrayInitializerMethod · 0.95
FormalParametersMethod · 0.95
FormalParameterMethod · 0.95
TypeMethod · 0.95

Calls 2

getNextTokenMethod · 0.45

Tested by

no test coverage detected