//
// textspan.h
// Text position and span classes
// F.J. Alberti
// 30/04/2001
//

#ifndef _TEXTSPAN_H_
#define _TEXTSPAN_H_


#include "base.h"


class TextPosition {
public:
  TextPosition(uint _line, uint _off);
  TextPosition();
  ~TextPosition();

  uint line;        // Line #
  uint off;         // Offset relative to beginning of source
};


inline TextPosition::TextPosition()
  : line(0), off(0)
{
}

inline TextPosition::TextPosition(uint _line, uint _off)
  : line(_line), off(_off)
{
}

inline TextPosition::~TextPosition()
{
}



class TextSpan {
public:
  TextSpan(const TextPosition& _beg, const TextPosition& _end);
  TextSpan();
  ~TextSpan();
  
  TextPosition beg;
  TextPosition end;
};


inline TextSpan::TextSpan(const TextPosition& _beg, const TextPosition& _end)
  : beg(_beg), end(_end)
{
}

inline TextSpan::TextSpan()
{
}

inline TextSpan::~TextSpan()
{
}


#endif // textspan.h