C++ target implementation for [c695ed2].

This commit is contained in:
Mike Lischke 2016-11-27 13:35:07 +01:00
parent fa14b9aad8
commit 9eb2a31179
1 changed files with 2 additions and 3 deletions

View File

@ -384,18 +384,17 @@ std::string BufferedTokenStream::getSourceName() const
}
std::string BufferedTokenStream::getText() {
lazyInit();
fill();
return getText(misc::Interval(0U, size() - 1));
}
std::string BufferedTokenStream::getText(const misc::Interval &interval) {
lazyInit();
fill();
size_t start = interval.a;
size_t stop = interval.b;
if (start == INVALID_INDEX || stop == INVALID_INDEX) {
return "";
}
lazyInit();
if (stop >= _tokens.size()) {
stop = _tokens.size() - 1;
}