summaryrefslogtreecommitdiff
path: root/src/context.h
blob: 3851d073aaf48f8dccdd48423815be31c98cbd29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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