I've been thinking about this issue too... I was thinking we should just attach the URL to the SourceFile. Then we could get the URL out of location. Something like:

```js
class ParseTree {
  ...
  get url() {
    return this.location && this.location.start.source.url;
  }
}
```

Still, I think your current solution is a step in the right direction so no need to undo it.