Introduce source map

This commit is contained in:
greg 2018-11-16 03:56:55 -08:00
parent 2ec7bf3b9a
commit e42f0c644c
2 changed files with 14 additions and 0 deletions

View File

@ -29,6 +29,7 @@ macro_rules! bx {
}
mod util;
mod source_map;
mod builtin;
mod tokenizing;
mod ast;

View File

@ -0,0 +1,13 @@
pub struct SourceMap<T> {
node: T,
data: SourceData
}
struct SourceData {
line_number: usize,
char_idx: usize
}