示例#1
0
 private void buildReturnStatement(ReturnStatementTree tree) {
   ReturnStatementTree s = tree;
   currentBlock = createUnconditionalJump(s, exitBlock);
   ExpressionTree expression = s.expression();
   if (expression != null) {
     build(expression);
   }
 }
 @Override
 public void visitReturnStatement(ReturnStatementTree tree) {
   ExpressionTree expression = tree.expression();
   if (expression == null || !isIncrementOrDecrement(expression)) {
     scan(expression);
   }
 }
 @Override
 public void visitReturnStatement(ReturnStatementTree syntaxNode) {
   SymbolicValue currentVal = programState.peekValue();
   if (currentVal != null) {
     final ExpressionTree expression = syntaxNode.expression();
     if (expression != null) {
       if (expression.is(Tree.Kind.IDENTIFIER)) {
         final IdentifierTree identifier = (IdentifierTree) expression;
         currentVal = programState.getValue(identifier.symbol());
       } else {
         currentVal = programState.peekValue();
       }
       programState = closeResource(programState, currentVal);
     }
   }
 }