summaryrefslogtreecommitdiff
path: root/src/context.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-30 06:26:38 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:33 -0400
commitc8899addfd2deed3d84be2de234681db64987722 (patch)
tree07f9a5eb603ff4ec83fe18c83083575d2b7a439a /src/context.h
parentaa9cc125796711afcaa459898e95527fdae8e912 (diff)
downloadfork-ledger-c8899addfd2deed3d84be2de234681db64987722.tar.gz
fork-ledger-c8899addfd2deed3d84be2de234681db64987722.tar.bz2
fork-ledger-c8899addfd2deed3d84be2de234681db64987722.zip
Rearranged the sources a bit.
Diffstat (limited to 'src/context.h')
-rw-r--r--src/context.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/context.h b/src/context.h
new file mode 100644
index 00000000..3851d073
--- /dev/null
+++ b/src/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