public String nextName() {
    String result = nextNameOrNull();
    if (result == null) {
      throw createParseError("Expected a name but was " + peek());
    }
    return result;
  }
public String nextName()