コード例 #1
0
 @Override
 public void visitPrefixExpression(final PrefixExpression expression) {
   inAssignment = expression.getExpression() instanceof VariableExpression;
   super.visitPrefixExpression(expression);
   inAssignment = false;
   checkPrePostfixOperation(expression.getExpression(), expression);
 }
コード例 #2
0
 public void evaluatePrefixMethod(PrefixExpression expression) {
   int type = expression.getOperation().getType();
   switch (type) {
     case Types.PLUS_PLUS:
       evaluatePrefixMethod(type, "next", expression.getExpression(), expression);
       break;
     case Types.MINUS_MINUS:
       evaluatePrefixMethod(type, "previous", expression.getExpression(), expression);
       break;
   }
 }
コード例 #3
0
    @Override
    public void visitPrefixExpression(PrefixExpression expression) {
      // LOG.debug "Transforming expression '${expression}':"

      if (expression.getLineNumber() >= 0 && expression.getLineNumber() < lineNumbers.length) {
        // LOG.debug "   start from ${expression.lineNumber} to ${lineNumbers[expression.lineNumber
        // - 1]}"
        expression.setLineNumber(lineNumbers[expression.getLineNumber() - 1]);
      }

      if (expression.getLastLineNumber() > 0
          && expression.getLastLineNumber() < lineNumbers.length) {
        // LOG.debug "   end from ${expression.lastLineNumber} to
        // ${lineNumbers[expression.lastLineNumber - 1]}"
        expression.setLastLineNumber(lineNumbers[expression.getLastLineNumber() - 1]);
      }
      super.visitPrefixExpression(expression);
    }
コード例 #4
0
 public void visitPrefixExpression(PrefixExpression expression) {
   expression.getExpression().visit(this);
 }