SHARE
TWEET

Untitled

a guest Aug 12th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public JAST analyze(Context context) {
  2.         Iterator<JBlock> catchBody = catchBlockList.iterator();
  3.         Iterator<JFormalParameter> catchParam = catchFormalParameterList.iterator();
  4.         if (tryBlock != null) {
  5.             tryBlock = (JBlock) tryBlock.analyze(context);
  6.         }
  7.        
  8.         if (finallyBlock != null) {
  9.             finallyBlock = (JBlock) finallyBlock.analyze(context);
  10.         }
  11.        
  12.         for(; catchBody.hasNext() && catchParam.hasNext(); ) {
  13.             JFormalParameter param = catchParam.next();
  14.             JBlock catchBlock = catchBody.next();
  15.             this.context = new LocalContext(context);
  16.            
  17.             param.setType((param.type()).resolve(context));
  18.             this.context.addEntry(param.line, param.name(), new LocalVariableDefn(param.type(), this.context
  19.                     .nextOffset()));
  20.             catchBlock = (JBlock) catchBlock.analyze(this.context);
  21.         }
  22.  
  23.         return this;
  24.     }
RAW Paste Data
Top