@@ -31,7 +31,7 @@ namespace Json {
31
31
class JSON_API Reader {
32
32
public:
33
33
typedef char Char;
34
- typedef const Char * Location;
34
+ typedef const Char* Location;
35
35
36
36
/* * \brief An error tagged with where in the JSON text it was encountered.
37
37
*
@@ -53,7 +53,7 @@ class JSON_API Reader {
53
53
/* * \brief Constructs a Reader allowing the specified feature set
54
54
* for parsing.
55
55
*/
56
- Reader (const Features & features);
56
+ Reader (const Features& features);
57
57
58
58
/* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
59
59
* document.
@@ -70,7 +70,7 @@ class JSON_API Reader {
70
70
* error occurred.
71
71
*/
72
72
bool
73
- parse (const std::string & document, Value & root, bool collectComments = true );
73
+ parse (const std::string& document, Value& root, bool collectComments = true );
74
74
75
75
/* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
76
76
document.
@@ -90,14 +90,14 @@ class JSON_API Reader {
90
90
* \return \c true if the document was successfully parsed, \c false if an
91
91
error occurred.
92
92
*/
93
- bool parse (const char * beginDoc,
94
- const char * endDoc,
95
- Value & root,
93
+ bool parse (const char * beginDoc,
94
+ const char * endDoc,
95
+ Value& root,
96
96
bool collectComments = true );
97
97
98
98
// / \brief Parse from input stream.
99
99
// / \see Json::operator>>(std::istream&, Json::Value&).
100
- bool parse (std::istream & is, Value & root, bool collectComments = true );
100
+ bool parse (std::istream& is, Value& root, bool collectComments = true );
101
101
102
102
/* * \brief Returns a user friendly string that list errors in the parsed
103
103
* document.
@@ -164,8 +164,8 @@ class JSON_API Reader {
164
164
165
165
typedef std::deque<ErrorInfo> Errors;
166
166
167
- bool expectToken (TokenType type, Token & token, const char * message);
168
- bool readToken (Token & token);
167
+ bool expectToken (TokenType type, Token& token, const char * message);
168
+ bool readToken (Token& token);
169
169
void skipSpaces ();
170
170
bool match (Location pattern, int patternLength);
171
171
bool readComment ();
@@ -174,45 +174,45 @@ class JSON_API Reader {
174
174
bool readString ();
175
175
void readNumber ();
176
176
bool readValue ();
177
- bool readObject (Token & token);
178
- bool readArray (Token & token);
179
- bool decodeNumber (Token & token);
180
- bool decodeNumber (Token & token, Value & decoded);
181
- bool decodeString (Token & token);
182
- bool decodeString (Token & token, std::string & decoded);
183
- bool decodeDouble (Token & token);
184
- bool decodeDouble (Token & token, Value & decoded);
185
- bool decodeUnicodeCodePoint (Token & token,
186
- Location & current,
177
+ bool readObject (Token& token);
178
+ bool readArray (Token& token);
179
+ bool decodeNumber (Token& token);
180
+ bool decodeNumber (Token& token, Value& decoded);
181
+ bool decodeString (Token& token);
182
+ bool decodeString (Token& token, std::string& decoded);
183
+ bool decodeDouble (Token& token);
184
+ bool decodeDouble (Token& token, Value& decoded);
185
+ bool decodeUnicodeCodePoint (Token& token,
186
+ Location& current,
187
187
Location end,
188
- unsigned int & unicode);
189
- bool decodeUnicodeEscapeSequence (Token & token,
190
- Location & current,
188
+ unsigned int & unicode);
189
+ bool decodeUnicodeEscapeSequence (Token& token,
190
+ Location& current,
191
191
Location end,
192
- unsigned int & unicode);
193
- bool addError (const std::string & message, Token & token, Location extra = 0 );
192
+ unsigned int & unicode);
193
+ bool addError (const std::string& message, Token& token, Location extra = 0 );
194
194
bool recoverFromError (TokenType skipUntilToken);
195
- bool addErrorAndRecover (const std::string & message,
196
- Token & token,
195
+ bool addErrorAndRecover (const std::string& message,
196
+ Token& token,
197
197
TokenType skipUntilToken);
198
198
void skipUntilSpace ();
199
- Value & currentValue ();
199
+ Value& currentValue ();
200
200
Char getNextChar ();
201
201
void
202
- getLocationLineAndColumn (Location location, int & line, int & column) const ;
202
+ getLocationLineAndColumn (Location location, int & line, int & column) const ;
203
203
std::string getLocationLineAndColumn (Location location) const ;
204
204
void addComment (Location begin, Location end, CommentPlacement placement);
205
- void skipCommentTokens (Token & token);
205
+ void skipCommentTokens (Token& token);
206
206
207
- typedef std::stack<Value *> Nodes;
207
+ typedef std::stack<Value*> Nodes;
208
208
Nodes nodes_;
209
209
Errors errors_;
210
210
std::string document_;
211
211
Location begin_;
212
212
Location end_;
213
213
Location current_;
214
214
Location lastValueEnd_;
215
- Value * lastValue_;
215
+ Value* lastValue_;
216
216
std::string commentsBefore_;
217
217
Features features_;
218
218
bool collectComments_;
@@ -242,7 +242,7 @@ class JSON_API Reader {
242
242
\throw std::exception on parse error.
243
243
\see Json::operator<<()
244
244
*/
245
- JSON_API std::istream & operator >>(std::istream &, Value &);
245
+ JSON_API std::istream& operator >>(std::istream&, Value&);
246
246
247
247
} // namespace Json
248
248
0 commit comments