Add copy and move assignment operators for ASTs.
Nit.
Dissect query and keep state for each component.