diff options
| -rw-r--r-- | src/source.cc | 6 | ||||
| -rw-r--r-- | src/token.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/source.cc b/src/source.cc index b8c04a7..41458af 100644 --- a/src/source.cc +++ b/src/source.cc @@ -1,17 +1,16 @@ #ifndef SOURCE_CC #define SOURCE_CC -#include "array.cc" #include "common.cc" #include "memory.cc" typedef u32 Source_Id; struct Span { - Source_Id id; + String file; usize start, end; - Span(Source_Id id, usize start, usize end) : id(id), start(start), end(end) {} + Span(String file, usize start, usize end) : file(file), start(start), end(end) {} }; struct Buffer { @@ -89,7 +88,6 @@ bool buffer_stack_pop(Buffer_Stack* manager, Buffer** b) { Link* next = link->prev; link_remove(link); - manager->stack = next; Buffer* buffer = containerof(Buffer, link, link); diff --git a/src/token.cc b/src/token.cc index 4a218ef..ea0a4e5 100644 --- a/src/token.cc +++ b/src/token.cc @@ -1,6 +1,7 @@ #ifndef TOKEN_CC #define TOKEN_CC +#include "source.cc" #include "common.cc" #define TOKEN_KINDS_NOLEX \ @@ -25,6 +26,7 @@ enum Token_Kind { struct Token { Token_Kind kind; String text; + Span span; }; #endif |
