diff options
Diffstat (limited to 'src/location.cpp')
-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 | |||