assembler: great leap forwards (more like the Cultural Revolution)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
//! This file contains information on where a [`Token`] or [`Node`] is within the source
|
||||
//! code for more informative errors. This will likely be attached to a [`Token`] which
|
||||
//! will in turn be attached to an AST [`Node`].
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Information on where the token is within the source.
|
||||
#[derive(Debug)]
|
||||
pub struct SourceInfo {
|
||||
/// The line number within the source file underpinned by `module_id`.
|
||||
pub line_no: usize,
|
||||
/// The ID of the module containing this token. This will be looked up in the global
|
||||
/// hashmap of [`Module`]'s.
|
||||
pub module_id: Uuid,
|
||||
/// The indexes where this token may be found (line-local).
|
||||
pub span: std::ops::Range<usize>,
|
||||
}
|
||||
Reference in New Issue
Block a user