Requires N:M mapping

This mapping has 4 all-to-all groups: every node on one side corresponds to every node on the other, and none is deleted or inserted. Each member carries an all N:M badge; selecting one highlights all of its counterparts, in the tree and in the code view alike.

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1const user = {
2 name: 'Alice',
3 age: 30,
4 email: 'alice@example.com'
5};
6
7const name = user.name;
8const age = user.age;
9const email = user.email;
10
11console.log(name, age, email);
12

After

1const user = {
2 name: 'Alice',
3 age: 30,
4 email: 'alice@example.com'
5};
6
7const { name, age, email } = user;
8
9console.log(name, age, email);
10

Before

program
lexical_declaration (+29 nodes collapsed)
lexical_declaration
const "const" all 3:1
variable_declarator
identifier "name"
= "=" all 3:1
member_expression
identifier "user" all 3:1
. "."
property_identifier "name"
; ";" all 3:1
lexical_declaration
const "const" all 3:1
variable_declarator
identifier "age"
= "=" all 3:1
member_expression
identifier "user" all 3:1
. "."
property_identifier "age"
; ";" all 3:1
lexical_declaration
const "const" all 3:1
variable_declarator
identifier "email"
= "=" all 3:1
member_expression
identifier "user" all 3:1
. "."
property_identifier "email"
; ";" all 3:1
expression_statement
call_expression
member_expression
identifier "console"
. "."
property_identifier "log"
arguments
( "("
identifier "name"
, ","
identifier "age"
, ","
identifier "email"
) ")"
; ";"

After

program
lexical_declaration (+29 nodes collapsed)
lexical_declaration
const "const" all 3:1
variable_declarator
object_pattern
{ "{"
shorthand_property_identifier_pattern "name"
, ","
shorthand_property_identifier_pattern "age"
, ","
shorthand_property_identifier_pattern "email"
} "}"
= "=" all 3:1
identifier "user" all 3:1
; ";" all 3:1
expression_statement
call_expression
member_expression
identifier "console"
. "."
property_identifier "log"
arguments
( "("
identifier "name"
, ","
identifier "age"
, ","
identifier "email"
) ")"
; ";"