Esempio n. 1
0
 @Override
 public void visit(AstModule n) {
   node(n);
   for (AstFunction f : n.functions) {
     f.accept(this);
   }
   endNode();
 }
Esempio n. 2
0
 /*
  * Function
  * Namespace:Name(a,b,c)
  */
 public final void Function() throws ParseException {
   /*@bgen(jjtree) Function */
   AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t0 = null;
   Token t1 = null;
   try {
     t0 = jj_consume_token(IDENTIFIER);
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case FUNCTIONSUFFIX:
         t1 = jj_consume_token(FUNCTIONSUFFIX);
         break;
       default:
         jj_la1[30] = jj_gen;
         ;
     }
     if (t1 != null) {
       jjtn000.setPrefix(t0.image);
       jjtn000.setLocalName(t1.image.substring(1));
     } else {
       jjtn000.setLocalName(t0.image);
     }
     jj_consume_token(LPAREN);
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case INTEGER_LITERAL:
       case FLOATING_POINT_LITERAL:
       case STRING_LITERAL:
       case TRUE:
       case FALSE:
       case NULL:
       case LPAREN:
       case NOT0:
       case NOT1:
       case EMPTY:
       case MINUS:
       case IDENTIFIER:
         Expression();
         label_10:
         while (true) {
           switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
             case COMMA:;
               break;
             default:
               jj_la1[31] = jj_gen;
               break label_10;
           }
           jj_consume_token(COMMA);
           Expression();
         }
         break;
       default:
         jj_la1[32] = jj_gen;
         ;
     }
     jj_consume_token(RPAREN);
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }