2014-10-07 16:25:04 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
namespace dev {
|
|
|
|
namespace solidity {
|
|
|
|
|
2014-10-08 18:53:50 +00:00
|
|
|
/// Representation of an interval of source positions.
|
|
|
|
/// The interval includes start and excludes end.
|
2014-10-07 16:25:04 +00:00
|
|
|
struct Location {
|
2014-10-08 18:53:50 +00:00
|
|
|
Location(int _start, int _end) : start(_start), end(_end) { }
|
|
|
|
Location() : start(-1), end(-1) { }
|
2014-10-07 16:25:04 +00:00
|
|
|
|
2014-10-08 18:53:50 +00:00
|
|
|
bool IsValid() const { return start >= 0 && end >= start; }
|
2014-10-07 16:25:04 +00:00
|
|
|
|
2014-10-08 18:53:50 +00:00
|
|
|
int start;
|
|
|
|
int end;
|
2014-10-07 16:25:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} }
|