private void StaleSimpleKeys()
{
// Check for a potential simple key for each flow level.
foreach (var key in simpleKeys)
{
// The specification requires that a simple key
// - is limited to a single line,
// - is shorter than 1024 characters.
if (key.IsPossible && (key.Line < cursor.Line || key.Index + 1024 < cursor.Index))
{
// Check if the potential simple key to be removed is required.
if (key.IsRequired)
{
var mark = cursor.Mark();
throw new SyntaxErrorException(mark, mark, "While scanning a simple key, could not find expected ':'.");
}
key.IsPossible = false;
}
}
}