1 #include "ast/source_traceable.h"
2 #include "source_file/token.h"
4 using namespace tanlang;
6 TokenSpan::TokenSpan(uint32_t start, uint32_t end) : _start(start), _end(end) {}
10 uint32_t SourceTraceable::start()
const {
return _span._start; }
12 uint32_t SourceTraceable::end()
const {
return _span._end; }
14 void SourceTraceable::set_start(uint32_t val) { _span._start = val; }
16 void SourceTraceable::set_end(uint32_t val) { _span._end = val; }
Different from SourceSpan, TokenSpan operates on the token level.
Different from SourceFile, TokenizedSourceFile manages the tokenized text of a source file.