Just run clang format (#1025)

This commit is contained in:
Jordan Bayles
2019-09-16 12:37:14 -07:00
committed by GitHub
parent 18f790fbe7
commit 81ae1d55f7
6 changed files with 64 additions and 68 deletions

View File

@@ -36,7 +36,8 @@ namespace Json {
*
* \deprecated Use CharReader and CharReaderBuilder.
*/
class [[deprecated("deprecated Use CharReader and CharReaderBuilder.")]] JSON_API Reader {
class [[deprecated(
"deprecated Use CharReader and CharReaderBuilder.")]] JSON_API Reader {
public:
typedef char Char;
typedef const Char* Location;
@@ -74,8 +75,8 @@ public:
* \return \c true if the document was successfully parsed, \c false if an
* error occurred.
*/
bool
parse(const std::string& document, Value& root, bool collectComments = true);
bool parse(const std::string& document, Value& root,
bool collectComments = true);
/** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
* document.
@@ -93,14 +94,12 @@ public:
* \return \c true if the document was successfully parsed, \c false if an
* error occurred.
*/
bool parse(const char* beginDoc,
const char* endDoc,
Value& root,
bool parse(const char* beginDoc, const char* endDoc, Value& root,
bool collectComments = true);
/// \brief Parse from input stream.
/// \see Json::operator>>(std::istream&, Json::Value&).
bool parse(IStream& is, Value& root, bool collectComments = true);
bool parse(IStream & is, Value & root, bool collectComments = true);
/** \brief Returns a user friendly string that list errors in the parsed
* document.
@@ -110,8 +109,8 @@ public:
* occurred during parsing.
* \deprecated Use getFormattedErrorMessages() instead (typo fix).
*/
[[deprecated("Use getFormattedErrorMessages() instead.")]]
String getFormatedErrorMessages() const;
[[deprecated("Use getFormattedErrorMessages() instead.")]] String
getFormatedErrorMessages() const;
/** \brief Returns a user friendly string that list errors in the parsed
* document.
@@ -191,7 +190,7 @@ private:
typedef std::deque<ErrorInfo> Errors;
bool readToken(Token& token);
bool readToken(Token & token);
void skipSpaces();
bool match(const Char* pattern, int patternLength);
bool readComment();
@@ -200,35 +199,30 @@ private:
bool readString();
void readNumber();
bool readValue();
bool readObject(Token& token);
bool readArray(Token& token);
bool decodeNumber(Token& token);
bool decodeNumber(Token& token, Value& decoded);
bool decodeString(Token& token);
bool decodeString(Token& token, String& decoded);
bool decodeDouble(Token& token);
bool decodeDouble(Token& token, Value& decoded);
bool decodeUnicodeCodePoint(Token& token,
Location& current,
Location end,
bool readObject(Token & token);
bool readArray(Token & token);
bool decodeNumber(Token & token);
bool decodeNumber(Token & token, Value & decoded);
bool decodeString(Token & token);
bool decodeString(Token & token, String & decoded);
bool decodeDouble(Token & token);
bool decodeDouble(Token & token, Value & decoded);
bool decodeUnicodeCodePoint(Token & token, Location & current, Location end,
unsigned int& unicode);
bool decodeUnicodeEscapeSequence(Token& token,
Location& current,
Location end,
unsigned int& unicode);
bool decodeUnicodeEscapeSequence(Token & token, Location & current,
Location end, unsigned int& unicode);
bool addError(const String& message, Token& token, Location extra = nullptr);
bool recoverFromError(TokenType skipUntilToken);
bool addErrorAndRecover(const String& message,
Token& token,
bool addErrorAndRecover(const String& message, Token& token,
TokenType skipUntilToken);
void skipUntilSpace();
Value& currentValue();
Char getNextChar();
void
getLocationLineAndColumn(Location location, int& line, int& column) const;
void getLocationLineAndColumn(Location location, int& line, int& column)
const;
String getLocationLineAndColumn(Location location) const;
void addComment(Location begin, Location end, CommentPlacement placement);
void skipCommentTokens(Token& token);
void skipCommentTokens(Token & token);
static bool containsNewLine(Location begin, Location end);
static String normalizeEOL(Location begin, Location end);