skipPartialObject method
void
skipPartialObject()
Skips the remaining values in the current map.
Implementation
void skipPartialObject() {
var level = 1;
var i = _offset;
while (true) {
switch (buffer[i++]) {
case tokenDoubleQuote: // If inside string, skip it
_offset = i;
_skipString();
i = _offset;
break;
case tokenLBrace: // If open symbol, increase level
level++;
break;
case tokenRBrace: // If close symbol, decrease level
level--;
// If we have returned to the original level, we're done
if (level == 0) {
_offset = i;
return;
}
break;
}
}
}