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

ScanTagDirectiveValue() private method

Scan the value of a TAG-DIRECTIVE token. Scope: %TAG !yaml! tag:yaml.org,2002: \n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private ScanTagDirectiveValue ( YamlDotNet.Core.Mark start ) : Token
start YamlDotNet.Core.Mark
return YamlDotNet.Core.Tokens.Token
        private Token ScanTagDirectiveValue(Mark start)
        {
            SkipWhitespaces();

            // Scan a handle.

            var handle = ScanTagHandle(true, start);

            // Expect a whitespace.

            if (!analyzer.IsWhite())
            {
                throw new SyntaxErrorException(start, cursor.Mark(), "While scanning a %TAG directive, did not find expected whitespace.");
            }

            SkipWhitespaces();

            // Scan a prefix.

            var prefix = ScanTagUri(null, start);

            // Expect a whitespace or line break.

            if (!analyzer.IsWhiteBreakOrZero())
            {
                throw new SyntaxErrorException(start, cursor.Mark(), "While scanning a %TAG directive, did not find expected whitespace or line break.");
            }

            return new TagDirective(handle, prefix, start, start);
        }