| 1048 | } |
| 1049 | |
| 1050 | bool Reader::pushError(const Value &value, const String &message) { |
| 1051 | ptrdiff_t const length = end_ - begin_; |
| 1052 | if (value.getOffsetStart() > length || value.getOffsetLimit() > length) |
| 1053 | return false; |
| 1054 | Token token; |
| 1055 | token.type_ = tokenError; |
| 1056 | token.start_ = begin_ + value.getOffsetStart(); |
| 1057 | token.end_ = end_ + value.getOffsetLimit(); |
| 1058 | ErrorInfo info; |
| 1059 | info.token_ = token; |
| 1060 | info.message_ = message; |
| 1061 | info.extra_ = nullptr; |
| 1062 | errors_.push_back(info); |
| 1063 | return true; |
| 1064 | } |
| 1065 | |
| 1066 | bool Reader::pushError(const Value &value, const String &message, |
| 1067 | const Value &extra) { |
nothing calls this directly
no test coverage detected