|
|
|
|
@ -1673,6 +1673,7 @@ SimpleNonInvocationExpression<out Expression pexpr>
@@ -1673,6 +1673,7 @@ SimpleNonInvocationExpression<out Expression pexpr>
|
|
|
|
|
| /* 11.4.5 */ "AddressOf" Expr<out expr> (. pexpr = new AddressOfExpression(expr); .) |
|
|
|
|
| /* 11.5.1 */ "GetType" "(" GetTypeTypeName<out type> ")" (. pexpr = new TypeOfExpression(type); .) |
|
|
|
|
| /* 11.5.2 */ "TypeOf" SimpleExpr<out expr> "Is" TypeName<out type> (. pexpr = new TypeOfIsExpression(expr, type); .) |
|
|
|
|
| /* 11.22 */ IF (la.kind == Tokens.If) ConditionalExpression<out pexpr> |
|
|
|
|
) |
|
|
|
|
| |
|
|
|
|
/* this form only occurs in WithStatements*/ |
|
|
|
|
@ -1680,6 +1681,40 @@ SimpleNonInvocationExpression<out Expression pexpr>
@@ -1680,6 +1681,40 @@ SimpleNonInvocationExpression<out Expression pexpr>
|
|
|
|
|
) |
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
ConditionalExpression<out Expression expr> |
|
|
|
|
(. |
|
|
|
|
ConditionalExpression conditionalExpression = new ConditionalExpression(); |
|
|
|
|
BinaryOperatorExpression binaryOperatorExpression = new BinaryOperatorExpression(); |
|
|
|
|
conditionalExpression.StartLocation = binaryOperatorExpression.StartLocation = la.Location; |
|
|
|
|
|
|
|
|
|
Expression condition = null; |
|
|
|
|
Expression trueExpr = null; |
|
|
|
|
Expression falseExpr = null; |
|
|
|
|
.) |
|
|
|
|
= |
|
|
|
|
"If" "(" Expr<out condition> "," Expr<out trueExpr> [ "," Expr<out falseExpr> ] ")" |
|
|
|
|
(. |
|
|
|
|
if(falseExpr != null) |
|
|
|
|
{ |
|
|
|
|
conditionalExpression.Condition = condition; |
|
|
|
|
conditionalExpression.TrueExpression = trueExpr; |
|
|
|
|
conditionalExpression.FalseExpression = falseExpr; |
|
|
|
|
conditionalExpression.EndLocation = t.EndLocation; |
|
|
|
|
|
|
|
|
|
expr = conditionalExpression; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
binaryOperatorExpression.Left = condition; |
|
|
|
|
binaryOperatorExpression.Right = trueExpr; |
|
|
|
|
binaryOperatorExpression.Op = BinaryOperatorType.NullCoalescing; |
|
|
|
|
binaryOperatorExpression.EndLocation = t.EndLocation; |
|
|
|
|
|
|
|
|
|
expr = binaryOperatorExpression; |
|
|
|
|
} |
|
|
|
|
.) |
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
InvocationExpression<ref Expression pexpr> |
|
|
|
|
(. List<TypeReference> typeParameters = new List<TypeReference>(); |
|
|
|
|
List<Expression> parameters = null; |
|
|
|
|
|