YamlDotNet.Core.Scanner.FetchFlowCollectionEnd C# (CSharp) Method

FetchFlowCollectionEnd() private method

Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token.
private FetchFlowCollectionEnd ( bool isSequenceToken ) : void
isSequenceToken bool
return void
        private void FetchFlowCollectionEnd(bool isSequenceToken)
        {
            // Reset any potential simple key on the current flow level.

            RemoveSimpleKey();

            // Decrease the flow level.

            DecreaseFlowLevel();

            // No simple keys after the indicators ']' and '}'.

            simpleKeyAllowed = false;

            // Consume the token.

            var start = cursor.Mark();
            Skip();

            Token token;
            if (isSequenceToken)
            {
                token = new FlowSequenceEnd(start, start);
            }
            else
            {
                token = new FlowMappingEnd(start, start);
            }

            tokens.Enqueue(token);
        }