diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-03-11 16:18:01 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-03-11 16:18:01 +1300 |
commit | a9e9dd452e23fa2e816df926a56c1f743eb32488 (patch) | |
tree | 633665f936b41f1289104dc23e299a8135f990be /src/tokeniser.rs | |
parent | bd7955cbc1c1746f37dcb0742603994fd2e04c90 (diff) | |
download | assembler-a9e9dd452e23fa2e816df926a56c1f743eb32488.zip |
Implement source chains
A SourceSpan can now contain a child SourceSpan, ad infinitum, in order
to represent a chain of locations. The report_source_issue function
has been changed to print the entire chain, instead of just one
SourceSpan.
The report_source_issue function has also been changed to correctly
print SourceSpans that extend across multiple source lines.
Diffstat (limited to 'src/tokeniser.rs')
-rw-r--r-- | src/tokeniser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tokeniser.rs b/src/tokeniser.rs index e09a439..0061e7a 100644 --- a/src/tokeniser.rs +++ b/src/tokeniser.rs @@ -221,7 +221,7 @@ impl Tokeniser { }; let string = self.get_chars(&self.start, &self.end).iter().collect(); - SourceSpan { string, in_merged, in_source } + SourceSpan { string, in_merged, in_source, child: None } } } |