www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Just what is going on here? (Dmd Source Code)

according to the spec here: 
https://dlang.org/spec/expression.html#order-of-evaluation
++expr becomes ((expr) += 1)
expr++ becomes (ref T x){auto t = x; ++x; return t;}(expr)

Yet the PostExp is inheriting the binary expression while the 
preExp is inheriting the unary expression in the dmd source code.
Just what is going on here? Should it be preExp inheriting the 
Binary expression instead?

-Alex
Jun 03 2021