Basically everything should return errors with lists of codespan Diagnostics, which then get output at the top level. Handling of the Files structure might be kinda squirrelly, but I think it's doable.
There's two parts to this currently, which are kinda hilariously opposite:
So we need to do both: Parser needs to give Result's, and the HIR needs to contain span info for something resembling the expression it corresponds to.
Probably time to actually do something about this. :-P I need a good low-level design task that isn't giant tree transforms anyway.
Ok it's now better, at least. The AST and HIR contain origin code span info (mostly), though admittedly not source file info. I don't think I am interested enough in the problem to BRAIN my way through tracking origin info in the loop part of the pratt parser right now, so it's just left absent. That's fine for now.
Nothing actually uses this code span info yet, but that's a Small Matter Of Programming.