#ifndef _CONTEXT_H #define _CONTEXT_H namespace ledger { class context { public: string context; // ex: 'While parsing file "%R" at line %L' }; class file_context : public context { public: path pathname; // ex: ledger.dat optional linenum_beg; // ex: 1010 optional linenum_end; // ex: 1010 optional colnum_beg; // ex: 8 optional colnum_end; // ex: 8 optional position_beg; optional position_end; }; class string_context : public context { public: string text; // ex: (The multi-line text of an entry) optional linenum_beg_off; // ex: 2 / none means start at beginning optional linenum_end_off; // ex: 2 / none means start at beginning optional colnum_beg_off; // ex: 8 / none means start optional colnum_end_off; // ex: 8 / none means start }; } // namespace ledger #endif // _CONTEXT_H