I thought your example code makes it pretty clear:
```js
// x++
// =>
// $0 = x, x = $0 + 1, $0
```
To me the natural mapping for unary ++ is to the binary plus. (Esp. since
you used create() on the assignments).
If we assign tree.location to all of the new trees it just tells the
debugger: if you get into this output, here is the closest input spot.


On Fri, Mar 7, 2014 at 12:49 PM, Erik Arvidsson <notifications@github.com>wrote:

> In src/codegeneration/ExplodeExpressionTransformer.js:
>
> > +
> > +    // What else do we need to support?
> > +    assert(tree.operand.type === IDENTIFIER_EXPRESSION);
> > +
> > +    // x++
> > +    // =>
> > +    // $0 = x, x = $0 + 1, $0
> > +
> > +    var operand = tree.operand
> > +    var tmp = this.addTempVar();
> > +    var operator = tree.operator.type === PLUS_PLUS ? PLUS : MINUS;
> > +
> > +    var expressions = [
> > +      createAssignmentExpression(tmp, operand),
> > +      createAssignmentExpression(operand,
> > +          new BinaryOperator(null, tmp, createOperatorToken(operator),
>
> It wasn't really clear which location to use here?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/google/traceur-compiler/pull/831/files#r10399329>
> .
>