Moves TextSpan

This commit is contained in:
2020-10-04 21:06:11 +02:00
parent 469c708788
commit 0ce2feee06
2 changed files with 1 additions and 1 deletions

View File

@@ -1,19 +0,0 @@
#ifndef ELOHIMSCRIPT_TEXTSPAN_HPP
#define ELOHIMSCRIPT_TEXTSPAN_HPP
#include <cstddef>
namespace ElohimScript {
class TextSpan {
size_t _start;
size_t _end;
public:
inline TextSpan(size_t start, size_t end) : _start(start), _end(end) {}
[[nodiscard]] inline size_t GetStart() const noexcept { return _start; }
[[nodiscard]] inline size_t GetEnd() const noexcept { return _end; }
inline bool operator==(const TextSpan& rhs) const { return _start == rhs._start && _end == rhs._end; }
inline bool operator!=(const TextSpan& rhs) const { return !(rhs == *this); }
};
}
#endif // ELOHIMSCRIPT_TEXTSPAN_HPP