template<class BaseClass>
class freetensor::TrackStmt< BaseClass >
A context for Visitor or Mutator that tracks the visiting statements stack
Inherit this class to use. E.g., inherit TrackStmt<Visitor> or TrackStmt<Mutator>
This class will automatically maintains the statement stack if the sub-class calls TrackStmt::visitStmt, which is the suggested usage
However, in some cases, this is impossible, e.g., when the sub-class needs to recurse into different sub-trees manually. In these cases, the sub-class should explicitly call the pushStmt / popStmt methods