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

FetchFlowCollectionStart() private method

Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token.
private FetchFlowCollectionStart ( bool isSequenceToken ) : void
isSequenceToken bool
return void
        private void FetchFlowCollectionStart(bool isSequenceToken)
        {
            // The indicators '[' and '{' may start a simple key.

            SaveSimpleKey();

            // Increase the flow level.

            IncreaseFlowLevel();

            // A simple key may follow the indicators '[' and '{'.

            simpleKeyAllowed = true;

            // Consume the token.

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

            // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token.

            Token token;
            if (isSequenceToken)
            {
                token = new FlowSequenceStart(start, start);
            }
            else
            {
                token = new FlowMappingStart(start, start);
            }

            tokens.Enqueue(token);
        }