traverse_mut runs semantic to build scope tree.
If semantic finds errors, transforming should not proceed as the transformer makes the assumption that the AST is valid, and may panic or produce invalid output.
But how should traverse_mut behave if there are errors?
- Panic?
- Return a
Result?
- Add errors to transformer's
errors vec?