Move TextSpan into the compiler layer.