MCPcopy Index your code
hub / github.com/beanshell/beanshell / EnhancedForStatement

Method EnhancedForStatement

src/bsh/Parser.java:3324–3385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3322 e.g. for( a : arrayOfInts ) { }
3323*/
3324 final public void EnhancedForStatement() throws ParseException {
3325 /*@bgen(jjtree) EnhancedForStatement */
3326 BSHEnhancedForStatement jjtn000 = new BSHEnhancedForStatement(JJTENHANCEDFORSTATEMENT);
3327 boolean jjtc000 = true;
3328 jjtree.openNodeScope(jjtn000);
3329 jjtreeOpenNodeScope(jjtn000);Token t = null;
3330 try {
3331 if (jj_2_30(4)) {
3332 jj_consume_token(FOR);
3333 jj_consume_token(LPAREN);
3334 t = jj_consume_token(IDENTIFIER);
3335 jj_consume_token(COLON);
3336 Expression();
3337 jj_consume_token(RPAREN);
3338 Statement();
3339 jjtree.closeNodeScope(jjtn000, true);
3340 jjtc000 = false;
3341 jjtreeCloseNodeScope(jjtn000);
3342 jjtn000.varName = t.image;
3343 } else {
3344 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
3345 case FOR:
3346 jj_consume_token(FOR);
3347 jj_consume_token(LPAREN);
3348 Type();
3349 t = jj_consume_token(IDENTIFIER);
3350 jj_consume_token(COLON);
3351 Expression();
3352 jj_consume_token(RPAREN);
3353 Statement();
3354 jjtree.closeNodeScope(jjtn000, true);
3355 jjtc000 = false;
3356 jjtreeCloseNodeScope(jjtn000);
3357 jjtn000.varName = t.image;
3358 break;
3359 default:
3360 jj_la1[82] = jj_gen;
3361 jj_consume_token(-1);
3362 throw new ParseException();
3363 }
3364 }
3365 } catch (Throwable jjte000) {
3366 if (jjtc000) {
3367 jjtree.clearNodeScope(jjtn000);
3368 jjtc000 = false;
3369 } else {
3370 jjtree.popNode();
3371 }
3372 if (jjte000 instanceof RuntimeException) {
3373 {if (true) throw (RuntimeException)jjte000;}
3374 }
3375 if (jjte000 instanceof ParseException) {
3376 {if (true) throw (ParseException)jjte000;}
3377 }
3378 {if (true) throw (Error)jjte000;}
3379 } finally {
3380 if (jjtc000) {
3381 jjtree.closeNodeScope(jjtn000, true);

Callers 1

StatementMethod · 0.95

Calls 12

jjtreeOpenNodeScopeMethod · 0.95
jj_2_30Method · 0.95
jj_consume_tokenMethod · 0.95
ExpressionMethod · 0.95
StatementMethod · 0.95
jjtreeCloseNodeScopeMethod · 0.95
jj_ntkMethod · 0.95
TypeMethod · 0.95
openNodeScopeMethod · 0.80
closeNodeScopeMethod · 0.80
clearNodeScopeMethod · 0.80
popNodeMethod · 0.45

Tested by

no test coverage detected