use shared_ptr for AST instead of unique_ptr