Package javassist.compiler.ast

Examples of javassist.compiler.ast.Stmnt


/*      */
/*      */   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);
/*      */       }
/*  479 */       SymbolTable tbl2 = new SymbolTable(tbl);
/*  480 */       Declarator d = parseFormalParam(tbl2);
/*  481 */       if ((d.getArrayDim() > 0) || (d.getType() != 307)) {
/*  482 */         throw new SyntaxError(this.lex);
/*      */       }
/*  484 */       if (this.lex.get() != 41) {
/*  485 */         throw new SyntaxError(this.lex);
/*      */       }
/*  487 */       Stmnt b = parseBlock(tbl2);
/*  488 */       catchList = ASTList.append(catchList, new Pair(d, b));
/*      */     }
/*      */
/*  491 */     Stmnt finallyBlock = null;
/*  492 */     if (this.lex.lookAhead() == 316) {
/*  493 */       this.lex.get();
/*  494 */       finallyBlock = parseBlock(tbl);
/*      */     }
/*      */
View Full Code Here


/*      */
/*      */   private Stmnt parseReturn(SymbolTable tbl)
/*      */     throws CompileError
/*      */   {
/*  503 */     int t = this.lex.get();
/*  504 */     Stmnt s = new Stmnt(t);
/*  505 */     if (this.lex.lookAhead() != 59) {
/*  506 */       s.setLeft(parseExpression(tbl));
/*      */     }
/*  508 */     if (this.lex.get() != 59) {
/*  509 */       throw new CompileError("; is missing", this.lex);
/*      */     }
/*  511 */     return s;
View Full Code Here

/*  517 */     int t = this.lex.get();
/*  518 */     ASTree expr = parseExpression(tbl);
/*  519 */     if (this.lex.get() != 59) {
/*  520 */       throw new CompileError("; is missing", this.lex);
/*      */     }
/*  522 */     return new Stmnt(t, expr);
/*      */   }
View Full Code Here

/*      */
/*      */   private Stmnt parseContinue(SymbolTable tbl)
/*      */     throws CompileError
/*      */   {
/*  538 */     int t = this.lex.get();
/*  539 */     Stmnt s = new Stmnt(t);
/*  540 */     int t2 = this.lex.get();
/*  541 */     if (t2 == 400) {
/*  542 */       s.setLeft(new Symbol(this.lex.getString()));
/*  543 */       t2 = this.lex.get();
/*      */     }
/*      */
/*  546 */     if (t2 != 59) {
/*  547 */       throw new CompileError("; is missing", this.lex);
View Full Code Here

/*  580 */         ASTList name = parseClassType(tbl);
/*  581 */         int dim = parseArrayDimension();
/*  582 */         return parseDeclarators(tbl, new Declarator(name, dim));
/*      */       }
/*      */     }
/*      */     Stmnt expr;
/*      */     Stmnt expr;
/*  587 */     if (exprList)
/*  588 */       expr = parseExprList(tbl);
/*      */     else {
/*  590 */       expr = new Stmnt(69, parseExpression(tbl));
/*      */     }
/*  592 */     if (this.lex.get() != 59) {
/*  593 */       throw new CompileError("; is missing", this.lex);
/*      */     }
/*  595 */     return expr;
View Full Code Here

/*      */   }
/*      */
/*      */   private Stmnt parseExprList(SymbolTable tbl)
/*      */     throws CompileError
/*      */   {
/*  601 */     Stmnt expr = null;
/*      */     while (true) {
/*  603 */       Stmnt e = new Stmnt(69, parseExpression(tbl));
/*  604 */       expr = (Stmnt)ASTList.concat(expr, new Stmnt(66, e));
/*  605 */       if (this.lex.lookAhead() == 44)
/*  606 */         this.lex.get();
/*      */       else
/*  608 */         return expr;
/*      */     }
View Full Code Here

/*      */   }
/*      */
/*      */   private Stmnt parseDeclarators(SymbolTable tbl, Declarator d)
/*      */     throws CompileError
/*      */   {
/*  617 */     Stmnt decl = null;
/*      */     while (true) {
/*  619 */       decl = (Stmnt)ASTList.concat(decl, new Stmnt(68, parseDeclarator(tbl, d)));
/*      */
/*  621 */       int t = this.lex.get();
/*  622 */       if (t == 59)
/*  623 */         return decl;
/*  624 */       if (t != 44)
View Full Code Here

TOP

Related Classes of javassist.compiler.ast.Stmnt

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.