diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-03-18 11:50:19 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-03-18 11:50:29 +1300 |
commit | f8a694267d3981b0437c05fc248406116ea9ec06 (patch) | |
tree | e7c0426f4278481490e269be7ccb0a710c22ebae /src/types/context.rs | |
parent | 87cdf5e88fd1d0aaddb91e216c47344effd63ed3 (diff) | |
download | assembler-f8a694267d3981b0437c05fc248406116ea9ec06.zip |
Large restructure
Files were moved to be better organised, error messages were changed to
be more general, and a Compiler type was added to the library.
Diffstat (limited to 'src/types/context.rs')
-rw-r--r-- | src/types/context.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/types/context.rs b/src/types/context.rs new file mode 100644 index 0000000..c015c7e --- /dev/null +++ b/src/types/context.rs @@ -0,0 +1,8 @@ +use crate::*; + + +/// Source context for a token. +pub struct Context<'a> { + pub source_code: &'a str, + pub source: &'a SourceSpan, +} |