@@ -31,13 +31,13 @@ class CPPASSIST_API Tokenizer
3131 */
3232 enum Option
3333 {
34- OptionParseStrings = 1 // /< Parse strings (use setQuotationMarks to set string characters)
34+ OptionParseStrings = 1 // /< Parse strings (use # setQuotationMarks to set string characters)
3535 , OptionParseNumber = 2 // /< Parse numbers
3636 , OptionParseBoolean = 4 // /< Parse boolean values
3737 , OptionParseNull = 8 // /< Parse null value
38- , OptionCStyleComments = 16 // /< Enable " /* */" for multi-line comments
39- , OptionCppStyleComments = 32 // /< Enable "//" for one-line comments
40- , OptionShellStyleComments = 64 // /< Enable "#" for one-line comments
38+ , OptionCStyleComments = 16 // /< Enable '` /* */`' for multi-line comments
39+ , OptionCppStyleComments = 32 // /< Enable '`//`' for one-line comments
40+ , OptionShellStyleComments = 64 // /< Enable '`#`' for one-line comments
4141 , OptionIncludeComments = 128 // /< Include comments in the output of the tokenizer
4242 };
4343
@@ -48,34 +48,34 @@ class CPPASSIST_API Tokenizer
4848 enum TokenType
4949 {
5050 TokenEndOfStream // /< No token read, end of stream reached
51- , TokenWhitespace // /< Token contains only whitespace
52- , TokenComment // /< Token contains a comment
53- , TokenStandalone // /< Token contains a standalone string
54- , TokenString // /< Token contains a string
55- , TokenNumber // /< Token contains number
56- , TokenBoolean // /< Token contains a boolean value
57- , TokenNull // /< Token contains a null value
58- , TokenSingleChar // /< Token contains a single character
59- , TokenWord // /< Token contains a regular word (any other than above)
51+ , TokenWhitespace // /< % Token contains only whitespace
52+ , TokenComment // /< % Token contains a comment
53+ , TokenStandalone // /< % Token contains a standalone string
54+ , TokenString // /< % Token contains a string
55+ , TokenNumber // /< % Token contains number
56+ , TokenBoolean // /< % Token contains a boolean value
57+ , TokenNull // /< % Token contains a null value
58+ , TokenSingleChar // /< % Token contains a single character
59+ , TokenWord // /< % Token contains a regular word (any other than above)
6060 };
6161
6262 /* *
6363 * @brief
64- * Token
64+ * % Token
6565 */
6666 struct Token
6767 {
68- TokenType type; // /< Type of token (see TokenType)
69- std::string content; // /< Token content (the actual string read)
70- int intValue; // /< Only valid if type == TokenNumber
71- double numberValue; // /< Only valid if type == TokenNumber
72- std::string stringValue; // /< Only valid if type == TokenString
73- bool booleanValue; // /< Only valid if type == TokenBoolean
74- bool isDouble; // /< If type == TokenNumber and isDouble, use numberValue
68+ TokenType type; // /< Type of token (see # TokenType)
69+ std::string content; // /< % Token content (the actual string read)
70+ int intValue; // /< Only valid if type == # TokenNumber
71+ double numberValue; // /< Only valid if type == # TokenNumber
72+ std::string stringValue; // /< Only valid if type == # TokenString
73+ bool booleanValue; // /< Only valid if type == # TokenBoolean
74+ bool isDouble; // /< If type == # TokenNumber and isDouble, use # numberValue
7575 const char * begin; // /< Pointer to the first character of the token
7676 const char * end; // /< Pointer to the first character after the token
7777 unsigned int line; // /< Line number where the token begins
78- unsigned int column; // /< Columns number where the token begins
78+ unsigned int column; // /< Column number where the token begins
7979 };
8080
8181 /* *
@@ -84,8 +84,8 @@ class CPPASSIST_API Tokenizer
8484 */
8585 struct Lookahead
8686 {
87- TokenType type; // /< Type of token (see TokenType)
88- std::string hint; // /< Hint about value or type (only valid for TokenComment or TokenStandalone)
87+ TokenType type; // /< Type of token (see # TokenType)
88+ std::string hint; // /< Hint about value or type (only valid for # TokenComment or # TokenStandalone)
8989 };
9090
9191
@@ -125,7 +125,7 @@ class CPPASSIST_API Tokenizer
125125 * Check if a specific parsing option is set
126126 *
127127 * @return
128- * ' true' if option is set, else ' false'
128+ * ` true` if option is set, else ` false`
129129 */
130130 bool hasOption (Option option) const ;
131131
@@ -209,7 +209,7 @@ class CPPASSIST_API Tokenizer
209209 * Filename of text document
210210 *
211211 * @return
212- * ' true' if file could be loaded, else ' false'
212+ * ` true` if file could be loaded, else ` false`
213213 */
214214 bool loadDocument (const std::string & filename);
215215
@@ -238,10 +238,10 @@ class CPPASSIST_API Tokenizer
238238 * Parse and return the next token
239239 *
240240 * @return
241- * Token
241+ * % Token
242242 *
243243 * @remarks
244- * If there are no tokens left, token. type is set to TokenEndOfStream.
244+ * If there are no tokens left, Token:: type is set to # TokenEndOfStream.
245245 */
246246 Token parseToken ();
247247
@@ -252,7 +252,7 @@ class CPPASSIST_API Tokenizer
252252 * Read next token
253253 *
254254 * @return
255- * Token
255+ * % Token
256256 */
257257 Token readToken ();
258258
@@ -300,7 +300,7 @@ class CPPASSIST_API Tokenizer
300300 * Read string
301301 *
302302 * @param[in] endChar
303- * Character that marks the end of the string (usually " or ' )
303+ * Character that marks the end of the string (usually `"` or `'` )
304304 *
305305 * @remarks
306306 * Advances the position until the end of the string is reached
@@ -398,7 +398,7 @@ class CPPASSIST_API Tokenizer
398398 * Check if a standalone string matches at the current position
399399 *
400400 * @return
401- * Standalone string that matches, "" if none does
401+ * Standalone string that matches, `""` if none does
402402 */
403403 const std::string & matchStandaloneStrings () const ;
404404
@@ -407,7 +407,7 @@ class CPPASSIST_API Tokenizer
407407 * Check if there is a (floating point) number at the current position
408408 *
409409 * @return
410- * Number string, "" if no number was found
410+ * Number string, `""` if no number was found
411411 */
412412 std::string matchNumber () const ;
413413
@@ -434,7 +434,7 @@ class CPPASSIST_API Tokenizer
434434 * Convert token value into a number
435435 *
436436 * @param[in,out] token
437- * Token
437+ * % Token
438438 */
439439 void decodeNumber (Token & token);
440440
@@ -443,7 +443,7 @@ class CPPASSIST_API Tokenizer
443443 * Convert token value into a double value
444444 *
445445 * @param[in,out] token
446- * Token
446+ * % Token
447447 */
448448 void decodeDouble (Token & token);
449449
@@ -452,7 +452,7 @@ class CPPASSIST_API Tokenizer
452452 * Convert token value into string
453453 *
454454 * @param[in,out] token
455- * Token
455+ * % Token
456456 */
457457 void decodeString (Token & token);
458458
@@ -468,7 +468,7 @@ class CPPASSIST_API Tokenizer
468468 * Unicode value
469469 *
470470 * @return
471- * ' true' on success, ' false' on error
471+ * ` true` on success, ` false` on error
472472 */
473473 bool decodeUnicodeCodePoint (const char * & current, const char * end, unsigned int & unicode) const ;
474474
@@ -484,7 +484,7 @@ class CPPASSIST_API Tokenizer
484484 * Unicode value
485485 *
486486 * @return
487- * ' true' on success, ' false' on error
487+ * ` true` on success, ` false` on error
488488 */
489489 bool decodeUnicodeEscapeSequence (const char * & current, const char * end, unsigned int & unicode) const ;
490490
@@ -510,7 +510,7 @@ class CPPASSIST_API Tokenizer
510510 * Character set
511511 *
512512 * @return
513- * ' true' if c is on of the characters in chars, else ' false'
513+ * ` true` if `c` is on of the characters in chars, else ` false`
514514 */
515515 bool charIn (char c, const std::string & chars) const ;
516516
@@ -530,7 +530,7 @@ class CPPASSIST_API Tokenizer
530530 const char * m_current; // /< Current position in the document
531531 unsigned int m_line; // /< Current line number (starts with 1)
532532 unsigned int m_column; // /< Current column number (starts with 1)
533- bool m_lastCR; // /< ' true' if the last character read was '\r' , else ' false'
533+ bool m_lastCR; // /< ` true` if the last character read was `\r` , else ` false`
534534};
535535
536536
0 commit comments