setup
Initializes lexical preservation for the given CompilationUnit. This method must be called before making any modifications to the AST if you want to preserve the original formatting. The setup process involves: 1. Parsing the original source code into tokens 2. Creating NodeText representations for each AST node 3. Establishing relationships between tokens and nodes 4. Setting up change observers to track future modifications
Return
The same CompilationUnit with lexical preservation enabled
Parameters
cu
The CompilationUnit to setup for lexical preservation