Utility to wrap contents in block with pushScope and popScope respectively. Preserves the parent scope prev.
block
prev
void wrapScope(Scope prev, {required Function() block}) { pushScope(prev); block(); popScope(); }