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

Method ImportDeclaration

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

Source from the content-addressed store, hash-verified

478 }
479
480 final public void ImportDeclaration() throws ParseException {
481 /*@bgen(jjtree) ImportDeclaration */
482 BSHImportDeclaration jjtn000 = new BSHImportDeclaration(JJTIMPORTDECLARATION);
483 boolean jjtc000 = true;
484 jjtree.openNodeScope(jjtn000);
485 jjtreeOpenNodeScope(jjtn000);Token s = null;
486 Token t = null;
487 try {
488 if (jj_2_3(3)) {
489 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
490 case STATIC:
491 s = jj_consume_token(STATIC);
492 break;
493 default:
494 jj_la1[9] = jj_gen;
495 ;
496 }
497 jj_consume_token(IMPORT);
498 AmbiguousName();
499 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
500 case DOT:
501 t = jj_consume_token(DOT);
502 jj_consume_token(STAR);
503 break;
504 default:
505 jj_la1[10] = jj_gen;
506 ;
507 }
508 jj_consume_token(SEMICOLON);
509 jjtree.closeNodeScope(jjtn000, true);
510 jjtc000 = false;
511 jjtreeCloseNodeScope(jjtn000);
512 if ( s != null ) jjtn000.staticImport = true;
513 if ( t != null ) jjtn000.importPackage = true;
514 } else {
515 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
516 case IMPORT:
517 jj_consume_token(IMPORT);
518 jj_consume_token(STAR);
519 jj_consume_token(SEMICOLON);
520 jjtree.closeNodeScope(jjtn000, true);
521 jjtc000 = false;
522 jjtreeCloseNodeScope(jjtn000);
523 jjtn000.superImport = true;
524 break;
525 default:
526 jj_la1[11] = jj_gen;
527 jj_consume_token(-1);
528 throw new ParseException();
529 }
530 }
531 } catch (Throwable jjte000) {
532 if (jjtc000) {
533 jjtree.clearNodeScope(jjtn000);
534 jjtc000 = false;
535 } else {
536 jjtree.popNode();
537 }

Callers 1

BlockStatementMethod · 0.95

Calls 10

jjtreeOpenNodeScopeMethod · 0.95
jj_2_3Method · 0.95
jj_ntkMethod · 0.95
jj_consume_tokenMethod · 0.95
AmbiguousNameMethod · 0.95
jjtreeCloseNodeScopeMethod · 0.95
openNodeScopeMethod · 0.80
closeNodeScopeMethod · 0.80
clearNodeScopeMethod · 0.80
popNodeMethod · 0.45

Tested by

no test coverage detected