From 4716975cb18795e4a953fc705cf0b7c74d6a1c95 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Apr 2007 10:08:05 +0000 Subject: More work done toward rearranging the utility code. --- context.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 context.h (limited to 'context.h') diff --git a/context.h b/context.h new file mode 100644 index 00000000..3851d073 --- /dev/null +++ b/context.h @@ -0,0 +1,28 @@ +#ifndef _CONTEXT_H +#define _CONTEXT_H + +namespace ledger { + +class context +{ +public: + string context; // ex: 'While parsing file "%R" at line %L' + + string resource; // ex: ledger.dat + long linenum_beg; // ex: 1010 + long linenum_end; // ex: 1010 + long colnum_beg; // ex: 8 + long colnum_end; // ex: 8 + long position_beg; + long position_end; + + string text; // ex: (The multi-line text of an entry) + long linenum_beg_off; // ex: 2 / -1 means start at beginning + long linenum_end_off; // ex: 2 / -1 means start at beginning + long colnum_beg_off; // ex: 8 / -1 means start + long colnum_end_off; // ex: 8 / -1 means start +}; + +} // namespace ledger + +#endif // _CONTEXT_H -- cgit v1.2.3