diff options
author | Ben Bridle <ben@derelict.engineering> | 2024-10-31 17:33:01 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2024-10-31 17:33:01 +1300 |
commit | d534d6ae11d6f08bdbc3e73525d8f797b9b9cf74 (patch) | |
tree | 0a6244b1d5cca35cc39304c4e1bf7d1b0a60a006 /src/symbol_resolver.rs | |
parent | 617c7df875171cd7b14983b14f4368120f265cce (diff) | |
download | bedrock-asm-d534d6ae11d6f08bdbc3e73525d8f797b9b9cf74.zip |
Add location() method to SourceSpan struct
A SourceSpan contains up to two SourceLocations: the location of the
span in the parsed source file (called in_merged), and the location of
the span in an original source file as per a path comment in the parsed
source file (called in_source). In places where only one location can
be reported, the in_source location is preferred but is not guaranteed
to exist, so the in_merged location is used as a fallback.
Because this pattern is used in multiple places, it was added as a
method to SourceSpan and all occurrences of the pattern were replaced
with a method call.
Diffstat (limited to 'src/symbol_resolver.rs')
0 files changed, 0 insertions, 0 deletions