aboutsummaryrefslogtreecommitdiff
path: root/src/location.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-28 20:55:18 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-28 20:55:18 +0000
commitc5fcf682195b0b191d19a598844f734ebf5b2583 (patch)
tree9fb24ddc20aaee06ee4990e84725b33a3e213207 /src/location.cpp
parente27c94b51a2e315ed5f529ba0c8c0d1bf354143c (diff)
downloadbuild-c5fcf682195b0b191d19a598844f734ebf5b2583.tar.gz
build-c5fcf682195b0b191d19a598844f734ebf5b2583.tar.bz2
build-c5fcf682195b0b191d19a598844f734ebf5b2583.tar.xz
build-c5fcf682195b0b191d19a598844f734ebf5b2583.zip
Location data is being tracked (for the most part, filenames...not as much),
but it isn't being used in errors yet, I should add some new exceptions for now.
Diffstat (limited to '')
-rw-r--r--src/location.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/location.cpp b/src/location.cpp
new file mode 100644
index 0000000..03b8b43
--- /dev/null
+++ b/src/location.cpp
@@ -0,0 +1,35 @@
1#include "location.h"
2#include "build.tab.h"
3
4Location::Location() :
5 sFile("none"),
6 iStartRow( -1 ),
7 iStartCol( -1 ),
8 iEndRow( -1 ),
9 iEndCol( -1 )
10{
11}
12
13Location::Location( struct YYLTYPE &loc ) :
14 sFile("???"),
15 iStartRow( loc.first_line ),
16 iStartCol( loc.first_column ),
17 iEndRow( loc.last_line ),
18 iEndCol( loc.last_column )
19{
20}
21
22Location::Location( const Bu::FString &sFile, int iStartRow, int iStartCol,
23 int iEndRow, int iEndCol ) :
24 sFile( sFile ),
25 iStartRow( iStartRow ),
26 iStartCol( iStartCol ),
27 iEndRow( iEndRow ),
28 iEndCol( iEndCol )
29{
30}
31
32Location::~Location()
33{
34}
35