diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-28 20:55:18 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-28 20:55:18 +0000 |
commit | c5fcf682195b0b191d19a598844f734ebf5b2583 (patch) | |
tree | 9fb24ddc20aaee06ee4990e84725b33a3e213207 /src/location.cpp | |
parent | e27c94b51a2e315ed5f529ba0c8c0d1bf354143c (diff) | |
download | build-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.cpp | 35 |
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 | |||
4 | Location::Location() : | ||
5 | sFile("none"), | ||
6 | iStartRow( -1 ), | ||
7 | iStartCol( -1 ), | ||
8 | iEndRow( -1 ), | ||
9 | iEndCol( -1 ) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | Location::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 | |||
22 | Location::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 | |||
32 | Location::~Location() | ||
33 | { | ||
34 | } | ||
35 | |||