Added comments

This commit is contained in:
Benoit Blanchon
2014-07-22 20:28:59 +02:00
parent 805c0741e6
commit 649f292ea7
3 changed files with 41 additions and 26 deletions

View File

@ -1,3 +1,7 @@
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
#include "JsonToken.h"
@ -5,14 +9,19 @@ using namespace ArduinoJson::Parser;
JsonToken JsonToken::nextSibling() const
{
// start with current token
jsmntok_t* t = token;
// count the number of token to skip
int yetToVisit = 1;
// skip all nested tokens
while (yetToVisit)
{
yetToVisit += t->size - 1;
t++;
}
// build a JsonToken at the new location
return JsonToken(json, t);
}