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