Is it possible to return an Expression.Constant(1) or Expression.Constant(0) depending on the result of an Expression.IfThenElse?
My language spec requires comparison operators to return 1 when true, and 0 when false.
print (1<2)==1 //this should print "1"
I looked in the ExpressionTree/UESamples solution and I rummaged around in the Ruby and Python code. If it is in there I wasn't looking in the right places.
I've been trying something like the code below. Not sure if I just need to tweek it.
I've also be writing incorrect code using Expression.Return. Not sure if I'm heading down the wrong path or not.
internal static Expression LessThan(Expression left, Expression right)
// Expression.LessThan(left, right),