let y = f(2, 3)
And I add a start parenthesis like this: let y = f((2, 3)
There is no longer a valid tree and it is not obvious at that point where, I, the end-user, want the parenthesis construct to end. let y = f()(2, 3)
but there should be a different command to do (`alt-(` in paredit) let y = f((2, 3))
There should of course also be "slurp" and "barf" commands to add or remove items from the parentheses if you do the wrong thing first (or want to wrap multiple things in the parentheses) let y = f(()2, 3)
Which possibly wouldn't parse.I did, and after typing in the left-parens inside the already existing left-parens, tylr gave me a right-parens in the "backpack", the space above where I was typing, and then didn't let me move outside of the enclosing parens pair (ie, I had to "put down" the matching right-parens to either enclose the 2, or the 2,3 pair). If instead I put in the left-parens before the already existing one, tylr automatically added the right-parens after the existing right-parens (which makes sense, it's the only legal place for the left-parens I just added to be matched).
But again, you could just try it out.
It might help to think of restructuring mode, the mode automatically entered upon constructing `(`, as a transactional editing mode in which you specify your AST-to-AST transformation.