From e42f0c644cd89cc62f6e351b192281af26076da0 Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 16 Nov 2018 03:56:55 -0800 Subject: [PATCH] Introduce source map --- schala-lang/language/src/lib.rs | 1 + schala-lang/language/src/source_map.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 schala-lang/language/src/source_map.rs diff --git a/schala-lang/language/src/lib.rs b/schala-lang/language/src/lib.rs index 93a10b8..5258dc2 100644 --- a/schala-lang/language/src/lib.rs +++ b/schala-lang/language/src/lib.rs @@ -29,6 +29,7 @@ macro_rules! bx { } mod util; +mod source_map; mod builtin; mod tokenizing; mod ast; diff --git a/schala-lang/language/src/source_map.rs b/schala-lang/language/src/source_map.rs new file mode 100644 index 0000000..211673f --- /dev/null +++ b/schala-lang/language/src/source_map.rs @@ -0,0 +1,13 @@ + +pub struct SourceMap { + node: T, + data: SourceData +} + +struct SourceData { + line_number: usize, + char_idx: usize +} + + +