| 1055 | } |
| 1056 | |
| 1057 | bool Reader::pushError(const Value& value, const std::string& message) { |
| 1058 | size_t length = end_ - begin_; |
| 1059 | if(value.getOffsetStart() > length |
| 1060 | || value.getOffsetLimit() > length) |
| 1061 | return false; |
| 1062 | Token token; |
| 1063 | token.type_ = tokenError; |
| 1064 | token.start_ = begin_ + value.getOffsetStart(); |
| 1065 | token.end_ = end_ + value.getOffsetLimit(); |
| 1066 | ErrorInfo info; |
| 1067 | info.token_ = token; |
| 1068 | info.message_ = message; |
| 1069 | info.extra_ = 0; |
| 1070 | errors_.push_back(info); |
| 1071 | return true; |
| 1072 | } |
| 1073 | |
| 1074 | bool Reader::pushError(const Value& value, const std::string& message, const Value& extra) { |
| 1075 | size_t length = end_ - begin_; |
nothing calls this directly
no test coverage detected