Lines 5204-5210
Link Here
|
5204 |
* Print the operator |
5204 |
* Print the operator |
5205 |
*/ |
5205 |
*/ |
5206 |
int operator; |
5206 |
int operator; |
5207 |
switch((unaryExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT) { |
5207 |
int operatorValue = (unaryExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT; |
|
|
5208 |
switch(operatorValue) { |
5208 |
case OperatorIds.PLUS: |
5209 |
case OperatorIds.PLUS: |
5209 |
operator = TerminalTokens.TokenNamePLUS; |
5210 |
operator = TerminalTokens.TokenNamePLUS; |
5210 |
break; |
5211 |
break; |
Lines 5222-5228
Link Here
|
5222 |
if (this.preferences.insert_space_after_unary_operator) { |
5223 |
if (this.preferences.insert_space_after_unary_operator) { |
5223 |
this.scribe.space(); |
5224 |
this.scribe.space(); |
5224 |
} |
5225 |
} |
5225 |
unaryExpression.expression.traverse(this, scope); |
5226 |
Expression expression = unaryExpression.expression; |
|
|
5227 |
|
5228 |
if (expression instanceof PrefixExpression) { |
5229 |
PrefixExpression prefixExpression = (PrefixExpression) expression; |
5230 |
final int numberOfParensForExpression = (prefixExpression.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; |
5231 |
if (numberOfParensForExpression == 0) { |
5232 |
switch(operatorValue) { |
5233 |
case OperatorIds.PLUS: |
5234 |
if (prefixExpression.operator == OperatorIds.PLUS) { |
5235 |
this.scribe.space(); |
5236 |
} |
5237 |
break; |
5238 |
case OperatorIds.MINUS: |
5239 |
if (prefixExpression.operator == OperatorIds.MINUS) { |
5240 |
this.scribe.space(); |
5241 |
} |
5242 |
break; |
5243 |
} |
5244 |
} |
5245 |
expression.traverse(this, scope); |
5246 |
} else { |
5247 |
expression.traverse(this, scope); |
5248 |
} |
5226 |
|
5249 |
|
5227 |
if (numberOfParens > 0) { |
5250 |
if (numberOfParens > 0) { |
5228 |
manageClosingParenthesizedExpression(unaryExpression, numberOfParens); |
5251 |
manageClosingParenthesizedExpression(unaryExpression, numberOfParens); |