MCPcopy Create free account
hub / github.com/KDE/kdevelop / parseResult

Method parseResult

plugins/debuggercommon/mi/miparser.cpp:162–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162bool MIParser::parseResult(Result *&result)
163{
164 // be less strict about the format, see e.g.:
165 // https://bugs.kde.org/show_bug.cgi?id=304730
166 // https://sourceware.org/bugzilla/show_bug.cgi?id=9659
167
168 std::unique_ptr<Result> res(new Result);
169
170 if (m_lex->lookAhead() == Token_identifier) {
171 res->variable = QString::fromUtf8(m_lex->currentTokenText());
172 m_lex->nextToken();
173
174 if (m_lex->lookAhead() != '=') {
175 result = res.release();
176 return true;
177 }
178
179 m_lex->nextToken();
180 }
181
182 Value *value = nullptr;
183 if (!parseValue(value))
184 return false;
185
186 res->value = value;
187 result = res.release();
188
189 return true;
190}
191
192bool MIParser::parseValue(Value *&value)
193{

Callers

nothing calls this directly

Calls 4

lookAheadMethod · 0.80
currentTokenTextMethod · 0.80
releaseMethod · 0.80
nextTokenMethod · 0.45

Tested by

no test coverage detected