solidity/BaseTypes.h
2014-10-09 12:36:17 +02:00

20 lines
369 B
C++

#pragma once
namespace dev {
namespace solidity {
/// Representation of an interval of source positions.
/// The interval includes start and excludes end.
struct Location {
Location(int _start, int _end) : start(_start), end(_end) { }
Location() : start(-1), end(-1) { }
bool IsValid() const { return start >= 0 && end >= start; }
int start;
int end;
};
} }