Use 'shared_ptr' for AST. Execute 'when' statements.
Execute 'when' statement.
Evaluate conditions atomically.
Add 'atomic' statement.