|
|
@ -1823,19 +1823,19 @@ UnaryExpr<out Expression uExpr> |
|
|
|
/* IF (Tokens.UnaryOp[la.kind] || IsTypeCast()) */ |
|
|
|
/* IF (Tokens.UnaryOp[la.kind] || IsTypeCast()) */ |
|
|
|
( |
|
|
|
( |
|
|
|
"+" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus) { StartLocation = t.Location }); .) |
|
|
|
"+" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus) { StartLocation = t.Location }); .) |
|
|
|
| "-" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus) { StartLocation = t.Location })); .) |
|
|
|
| "-" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus) { StartLocation = t.Location }); .) |
|
|
|
| "!" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not) { StartLocation = t.Location })); .) |
|
|
|
| "!" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not) { StartLocation = t.Location }); .) |
|
|
|
| "~" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot) { StartLocation = t.Location })); .) |
|
|
|
| "~" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot) { StartLocation = t.Location }); .) |
|
|
|
| "*" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Dereference) { StartLocation = t.Location })); .) |
|
|
|
| "*" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Dereference) { StartLocation = t.Location }); .) |
|
|
|
| "++" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment) { StartLocation = t.Location })); .) |
|
|
|
| "++" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment) { StartLocation = t.Location }); .) |
|
|
|
| "--" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement) { StartLocation = t.Location })); .) |
|
|
|
| "--" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement) { StartLocation = t.Location }); .) |
|
|
|
| "&" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.AddressOf) { StartLocation = t.Location })); .) |
|
|
|
| "&" (. expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.AddressOf) { StartLocation = t.Location }); .) |
|
|
|
|
|
|
|
|
|
|
|
/*--- cast expression: */ |
|
|
|
/*--- cast expression: */ |
|
|
|
/* Problem: "(" Type ")" from here and * |
|
|
|
/* Problem: "(" Type ")" from here and * |
|
|
|
* "(" Expr ")" from PrimaryExpr * |
|
|
|
* "(" Expr ")" from PrimaryExpr * |
|
|
|
* Solution: (in IsTypeCast()) */ |
|
|
|
* Solution: (in IsTypeCast()) */ |
|
|
|
| IF (IsTypeCast()) "(" Type<out type> ")" (. expressions.Add(new CastExpression(type) { StartLocation = t.Location })); .) |
|
|
|
| IF (IsTypeCast()) "(" Type<out type> ")" (. expressions.Add(new CastExpression(type) { StartLocation = t.Location }); .) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|