Introduce source map
This commit is contained in:
parent
2ec7bf3b9a
commit
e42f0c644c
@ -29,6 +29,7 @@ macro_rules! bx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod util;
|
mod util;
|
||||||
|
mod source_map;
|
||||||
mod builtin;
|
mod builtin;
|
||||||
mod tokenizing;
|
mod tokenizing;
|
||||||
mod ast;
|
mod ast;
|
||||||
|
13
schala-lang/language/src/source_map.rs
Normal file
13
schala-lang/language/src/source_map.rs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
pub struct SourceMap<T> {
|
||||||
|
node: T,
|
||||||
|
data: SourceData
|
||||||
|
}
|
||||||
|
|
||||||
|
struct SourceData {
|
||||||
|
line_number: usize,
|
||||||
|
char_idx: usize
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user