this.scribe.printNextToken(operator, this.preferences.insert_space_before_unary_operator);
if (this.preferences.insert_space_after_unary_operator) {
this.scribe.space();
}
Expression expression = unaryExpression.expression;
if (expression instanceof PrefixExpression) {
PrefixExpression prefixExpression = (PrefixExpression) expression;
final int numberOfParensForExpression = (prefixExpression.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
if (numberOfParensForExpression == 0) {
switch(operatorValue) {
case OperatorIds.PLUS:
if (prefixExpression.operator == OperatorIds.PLUS) {
this.scribe.space();
}
break;
case OperatorIds.MINUS:
if (prefixExpression.operator == OperatorIds.MINUS) {
this.scribe.space();
}
break;
}
}
} else if (expression instanceof UnaryExpression) {
UnaryExpression unaryExpression2 = (UnaryExpression) expression;
final int numberOfParensForExpression = (unaryExpression2.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
if (numberOfParensForExpression == 0) {
int operatorValue2 = (unaryExpression2.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT;
switch(operatorValue) {
case OperatorIds.PLUS:
if (operatorValue2 == OperatorIds.PLUS) {
this.scribe.space();
}
break;
case OperatorIds.MINUS:
if (operatorValue2 == OperatorIds.MINUS) {
this.scribe.space();
}
break;
}
}
}
expression.traverse(this, scope);
if (numberOfParens > 0) {
manageClosingParenthesizedExpression(unaryExpression, numberOfParens);
}
return false;