Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public JAST analyze(Context context) {
- Iterator<JBlock> catchBody = catchBlockList.iterator();
- Iterator<JFormalParameter> catchParam = catchFormalParameterList.iterator();
- if (tryBlock != null) {
- tryBlock = (JBlock) tryBlock.analyze(context);
- }
- if (finallyBlock != null) {
- finallyBlock = (JBlock) finallyBlock.analyze(context);
- }
- for(; catchBody.hasNext() && catchParam.hasNext(); ) {
- JFormalParameter param = catchParam.next();
- JBlock catchBlock = catchBody.next();
- this.context = new LocalContext(context);
- param.setType((param.type()).resolve(context));
- this.context.addEntry(param.line, param.name(), new LocalVariableDefn(param.type(), this.context
- .nextOffset()));
- catchBlock = (JBlock) catchBlock.analyze(this.context);
- }
- return this;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement