Painless parses the script into an AST and mutates while processing. Correlation with user provided script is difficult as we don't have the raw representation. Keeping the original AST around without mutating it will enable better error messages and other IDE-like functionality.