Package javassist.compiler.ast

Examples of javassist.compiler.ast.ASTList


/*      */   }
/*      */
/*      */   public ASTList parseMember1(SymbolTable tbl)
/*      */     throws CompileError
/*      */   {
/*   43 */     ASTList mods = parseMemberMods();
/*      */
/*   45 */     boolean isConstructor = false;
/*      */     Declarator d;
/*   46 */     if ((this.lex.lookAhead() == 400) && (this.lex.lookAhead(1) == 40)) {
/*   47 */       Declarator d = new Declarator(344, 0);
View Full Code Here


/*   80 */       expr = parseExpression(tbl);
/*      */     }
/*      */
/*   83 */     int c = this.lex.get();
/*   84 */     if (c == 59)
/*   85 */       return new FieldDecl(mods, new ASTList(d, new ASTList(expr)));
/*   86 */     if (c == 44) {
/*   87 */       throw new CompileError("only one field can be declared in one declaration", this.lex);
/*      */     }
/*      */
/*   90 */     throw new SyntaxError(this.lex);
View Full Code Here

/*      */     throws CompileError
/*      */   {
/*  107 */     if (this.lex.get() != 40) {
/*  108 */       throw new SyntaxError(this.lex);
/*      */     }
/*  110 */     ASTList parms = null;
/*  111 */     if (this.lex.lookAhead() != 41) {
/*      */       while (true) {
/*  113 */         parms = ASTList.append(parms, parseFormalParam(tbl));
/*  114 */         int t = this.lex.lookAhead();
/*  115 */         if (t == 44)
/*  116 */           this.lex.get();
/*  117 */         else if (t == 41)
/*      */             break;
/*      */       }
/*      */     }
/*  121 */     this.lex.get();
/*  122 */     d.addArrayDim(parseArrayDimension());
/*  123 */     if ((isConstructor) && (d.getArrayDim() > 0)) {
/*  124 */       throw new SyntaxError(this.lex);
/*      */     }
/*  126 */     ASTList throwsList = null;
/*  127 */     if (this.lex.lookAhead() == 341) {
/*  128 */       this.lex.get();
/*      */       while (true) {
/*  130 */         throwsList = ASTList.append(throwsList, parseClassType(tbl));
/*  131 */         if (this.lex.lookAhead() != 44) break;
/*  132 */         this.lex.get();
/*      */       }
/*      */
/*      */     }
/*      */
/*  138 */     return new MethodDecl(mods, new ASTList(d, ASTList.make(parms, throwsList, null)));
/*      */   }
View Full Code Here

/*  157 */     return md;
/*      */   }
/*      */
/*      */   private ASTList parseMemberMods()
/*      */   {
/*  167 */     ASTList list = null;
/*      */     while (true) {
/*  169 */       int t = this.lex.lookAhead();
/*  170 */       if ((t != 300) && (t != 315) && (t != 332) && (t != 331) && (t != 330) && (t != 338) && (t != 335) && (t != 345) && (t != 342) && (t != 347)) {
/*      */         break;
/*      */       }
/*  173 */       list = new ASTList(new Keyword(this.lex.get()), list);
/*      */     }
/*      */
/*  178 */     return list;
/*      */   }
View Full Code Here

/*  186 */       this.lex.get();
/*  187 */       int dim = parseArrayDimension();
/*  188 */       return new Declarator(t, dim);
/*      */     }
/*      */
/*  191 */     ASTList name = parseClassType(tbl);
/*  192 */     int dim = parseArrayDimension();
/*  193 */     return new Declarator(name, dim);
/*      */   }
View Full Code Here

/*  310 */       elsep = parseStatement(tbl);
/*      */     }
/*      */     else {
/*  313 */       elsep = null;
/*      */     }
/*  315 */     return new Stmnt(t, expr, new ASTList(thenp, new ASTList(elsep)));
/*      */   }
View Full Code Here

/*      */     }
/*  377 */     if (this.lex.get() != 41) {
/*  378 */       throw new CompileError(") is missing", this.lex);
/*      */     }
/*  380 */     Stmnt body = parseStatement(tbl2);
/*  381 */     return new Stmnt(t, expr1, new ASTList(expr2, new ASTList(expr3, body)));
/*      */   }
View Full Code Here

/*      */   private Stmnt parseTry(SymbolTable tbl)
/*      */     throws CompileError
/*      */   {
/*  471 */     this.lex.get();
/*  472 */     Stmnt block = parseBlock(tbl);
/*  473 */     ASTList catchList = null;
/*  474 */     while (this.lex.lookAhead() == 305) {
/*  475 */       this.lex.get();
/*  476 */       if (this.lex.get() != 40) {
/*  477 */         throw new SyntaxError(this.lex);
/*      */       }
View Full Code Here

/*      */     }
/*  576 */     if (t == 400) {
/*  577 */       int i = nextIsClassType(0);
/*  578 */       if ((i >= 0) &&
/*  579 */         (this.lex.lookAhead(i) == 400)) {
/*  580 */         ASTList name = parseClassType(tbl);
/*  581 */         int dim = parseArrayDimension();
/*  582 */         return parseDeclarators(tbl, new Declarator(name, dim));
/*      */       }
/*      */     }
/*      */     Stmnt expr;
View Full Code Here

/*  790 */       this.lex.get();
/*  791 */       int dim = parseArrayDimension();
/*  792 */       return new InstanceOfExpr(t, dim, expr);
/*      */     }
/*      */
/*  795 */     ASTList name = parseClassType(tbl);
/*  796 */     int dim = parseArrayDimension();
/*  797 */     return new InstanceOfExpr(name, dim, expr);
/*      */   }
View Full Code Here

TOP

Related Classes of javassist.compiler.ast.ASTList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.