X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OperatorExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OperatorExpression.java deleted file mode 100644 index deacaf5..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/OperatorExpression.java +++ /dev/null @@ -1,89 +0,0 @@ -package net.sourceforge.phpdt.internal.compiler.ast; - -/** - * Any expression that have an operator. - * @author Matthieu Casanova - */ -public abstract class OperatorExpression - extends Expression - implements OperatorIds { - - public int operator; - - public OperatorExpression(int operator, int sourceStart, int sourceEnd) { - super(sourceStart, sourceEnd); - this.operator = operator; - } - - public String operatorToString() { - switch (operator) { - case EQUAL_EQUAL: - return "=="; //$NON-NLS-1$ - case LESS_EQUAL: - return "<="; //$NON-NLS-1$ - case GREATER_EQUAL: - return ">="; //$NON-NLS-1$ - case NOT_EQUAL: - return "!="; //$NON-NLS-1$ - case LEFT_SHIFT: - return "<<"; //$NON-NLS-1$ - case RIGHT_SHIFT: - return ">>"; //$NON-NLS-1$ - case UNSIGNED_RIGHT_SHIFT: - return ">>>"; //$NON-NLS-1$ - case OR_OR: - return "||"; //$NON-NLS-1$ - case AND_AND: - return "&&"; //$NON-NLS-1$ - case PLUS: - return "+"; //$NON-NLS-1$ - case MINUS: - return "-"; //$NON-NLS-1$ - case NOT: - return "!"; //$NON-NLS-1$ - case REMAINDER: - return "%"; //$NON-NLS-1$ - case XOR: - return "^"; //$NON-NLS-1$ - case AND: - return "&"; //$NON-NLS-1$ - case MULTIPLY: - return "*"; //$NON-NLS-1$ - case OR: - return "|"; //$NON-NLS-1$ - case TWIDDLE: - return "~"; //$NON-NLS-1$ - case DIVIDE: - return "/"; //$NON-NLS-1$ - case GREATER: - return ">"; //$NON-NLS-1$ - case LESS: - return "<"; //$NON-NLS-1$ - case ORL: - return "OR"; //$NON-NLS-1$ - case ANDL: - return "AND"; //$NON-NLS-1$ - case DOT: - return "."; //$NON-NLS-1$ - case DIF: - return "<>"; //$NON-NLS-1$ - case BANG_EQUAL_EQUAL: - return "!=="; //$NON-NLS-1$ - case EQUAL_EQUAL_EQUAL: - return "==="; //$NON-NLS-1$ - case EQUAL: - return "="; //$NON-NLS-1$ - case AT: - return "@"; //$NON-NLS-1$ - } - ; - return "unknown operator"; //$NON-NLS-1$ - } - - public String toStringExpression() { - //subclass redefine toStringExpressionNoParenthesis() - return "(" + toStringExpressionNoParenthesis() + ")"; //$NON-NLS-2$ //$NON-NLS-1$ - } - - public abstract String toStringExpressionNoParenthesis(); -}