diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2015-01-06 17:31:21 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2015-01-22 23:33:13 -0800 |
commit | 2cd52ab17ee1b830bc53321b112411122dddc1c8 (patch) | |
tree | 43666d3295c55ae6b395c5d8cd3fd026e71468a3 /src/io/span.cpp | |
parent | e1418f378c66343a35db3791cbf0d54a4be3fbd3 (diff) | |
download | tmwa-2cd52ab17ee1b830bc53321b112411122dddc1c8.tar.gz tmwa-2cd52ab17ee1b830bc53321b112411122dddc1c8.tar.bz2 tmwa-2cd52ab17ee1b830bc53321b112411122dddc1c8.tar.xz tmwa-2cd52ab17ee1b830bc53321b112411122dddc1c8.zip |
Use Spanned<T> while parsing config
Diffstat (limited to 'src/io/span.cpp')
-rw-r--r-- | src/io/span.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/io/span.cpp b/src/io/span.cpp index f4752f0..6d116c7 100644 --- a/src/io/span.cpp +++ b/src/io/span.cpp @@ -31,6 +31,20 @@ namespace tmwa { namespace io { + io::LineSpan Line::to_span() const + { + io::LineSpan rv; + rv.begin.text = this->text; + rv.begin.filename = this->filename; + rv.begin.line = this->line; + rv.begin.column = 1; + rv.end.text = this->text; + rv.end.filename = this->filename; + rv.end.line = this->line; + rv.end.column = this->text.size(); + return rv; + } + AString Line::message_str(ZString cat, ZString msg) const { MString out; |