Scanner style fixes.

This commit is contained in:
Ferdinand Majerech 2014-07-23 18:26:39 +02:00
parent 2a8f78f46f
commit d4a7b066d0

View file

@ -75,19 +75,17 @@ private alias MarkedYAMLExceptionData ErrorData;
final class Scanner final class Scanner
{ {
private: private:
/** /// A simple key is a key that is not denoted by the '?' indicator.
* A simple key is a key that is not denoted by the '?' indicator. /// For example:
* For example: /// ---
* --- /// block simple key: value
* block simple key: value /// ? not a simple key:
* ? not a simple key: /// : { flow simple key: value }
* : { flow simple key: value } /// We emit the KEY token before all keys, so when we find a potential simple
* We emit the KEY token before all keys, so when we find a potential /// key, we try to locate the corresponding ':' indicator. Simple keys should be
* simple key, we try to locate the corresponding ':' indicator. /// limited to a single line and 1024 characters.
* Simple keys should be limited to a single line and 1024 characters. ///
* /// 16 bytes on 64-bit.
* 16 bytes on 64-bit.
*/
static struct SimpleKey static struct SimpleKey
{ {
/// Character index in reader where the key starts. /// Character index in reader where the key starts.
@ -133,16 +131,13 @@ final class Scanner
/// Number of tokens emitted through the getToken method. /// Number of tokens emitted through the getToken method.
uint tokensTaken_; uint tokensTaken_;
/** /// Can a simple key start at the current position? A simple key may start:
* Can a simple key start at the current position? A simple key may /// - at the beginning of the line, not counting indentation spaces
* start: /// (in block context),
* - at the beginning of the line, not counting indentation spaces /// - after '{', '[', ',' (in the flow context),
* (in block context), /// - after '?', ':', '-' (in the block context).
* - after '{', '[', ',' (in the flow context), /// In the block context, this flag also signifies if a block collection
* - after '?', ':', '-' (in the block context). /// may start at the current position.
* In the block context, this flag also signifies if a block collection
* may start at the current position.
*/
bool allowSimpleKey_ = true; bool allowSimpleKey_ = true;
/// Possible simple keys indexed by flow levels. /// Possible simple keys indexed by flow levels.