From c5fcf682195b0b191d19a598844f734ebf5b2583 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 28 Dec 2009 20:55:18 +0000 Subject: 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. --- src/location.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/location.cpp (limited to 'src/location.cpp') 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 @@ +#include "location.h" +#include "build.tab.h" + +Location::Location() : + sFile("none"), + iStartRow( -1 ), + iStartCol( -1 ), + iEndRow( -1 ), + iEndCol( -1 ) +{ +} + +Location::Location( struct YYLTYPE &loc ) : + sFile("???"), + iStartRow( loc.first_line ), + iStartCol( loc.first_column ), + iEndRow( loc.last_line ), + iEndCol( loc.last_column ) +{ +} + +Location::Location( const Bu::FString &sFile, int iStartRow, int iStartCol, + int iEndRow, int iEndCol ) : + sFile( sFile ), + iStartRow( iStartRow ), + iStartCol( iStartCol ), + iEndRow( iEndRow ), + iEndCol( iEndCol ) +{ +} + +Location::~Location() +{ +} + -- cgit v1.2.3