nextKey method
Determine the next key value depending on the last encountered token.
Implementation
String nextKey(List<String> keys, Type token) {
switch (token) {
case ListOpeningBracketToken:
currentKey = "$currentKey.0";
break;
case ListClosingBracketToken:
currentKey = currentKey.substring(0, currentKey.lastIndexOf("."));
break;
case ListValueSeparatorToken:
incrementWidth;
}
return currentKey;
}