AST copy mechanism

The AST copy mechanism is to deep-copy parts of an AST.


The AST copy mechanism is supported by a member function on each IR node called copy. A parameter to the copy member function permits the user to tailor the copy mechanism to do deep or shallow copies within selected portions of the AST.

Collaboration diagram for AST copy mechanism: