Package org.aspectj.org.eclipse.jdt.internal.compiler.ast

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.BinaryExpression


}
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {

  // optimizing assignment like: i = i + 1 or i = 1 + i
  if (assignment.expression.isCompactableOperation()) {
    BinaryExpression operation = (BinaryExpression) assignment.expression;
    int operator = (operation.bits & OperatorMASK) >> OperatorSHIFT;
    SingleNameReference variableReference;
    if ((operation.left instanceof SingleNameReference) && ((variableReference = (SingleNameReference) operation.left).binding == this.binding)) {
      // i = i + value, then use the variable on the right hand side, since it has the correct implicit conversion
      variableReference.generateCompoundAssignment(currentScope, codeStream, this.syntheticAccessors == null ? null : this.syntheticAccessors[WRITE], operation.right, operator, operation.implicitConversion, valueRequired);
View Full Code Here


      } else if (e instanceof BinaryExpression) {
        if (expressionLevel != 0) {
          output.append('(');
        }
        expressionLevel++;
        BinaryExpression be = (BinaryExpression) e;
        printExpression(be.left).append(' ').append(be.operatorToString()).append(' ');
        printExpression(be.right);
        expressionLevel--;
        if (expressionLevel != 0) {
          output.append(')');
        }
View Full Code Here

      this.addRealFragment(combinedBinaryExpression.left);
      this.operatorsList.add(new Integer(TerminalTokens.TokenNamePLUS));
      this.addRealFragment(combinedBinaryExpression.right);
      return false;
    }
    BinaryExpression cursor = combinedBinaryExpression.referencesTable[0];
    if (cursor.left instanceof CombinedBinaryExpression) {
      this.visit((CombinedBinaryExpression) cursor.left, scope);
    } else {
      this.addRealFragment(cursor.left);
    }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.ast.BinaryExpression

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.