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

ScanVersionDirectiveValue() private method

Scan the value of VERSION-DIRECTIVE. Scope: %YAML 1.1 # a comment \n ^^^^^^
private ScanVersionDirectiveValue ( YamlDotNet.Core.Mark start ) : Token
start YamlDotNet.Core.Mark
return YamlDotNet.Core.Tokens.Token
        private Token ScanVersionDirectiveValue(Mark start)
        {
            SkipWhitespaces();

            // Consume the major version number.

            var major = ScanVersionDirectiveNumber(start);

            // Eat '.'.

            if (!analyzer.Check('.'))
            {
                throw new SyntaxErrorException(start, cursor.Mark(), "While scanning a %YAML directive, did not find expected digit or '.' character.");
            }

            Skip();

            // Consume the minor version number.

            var minor = ScanVersionDirectiveNumber(start);

            return new VersionDirective(new Version(major, minor), start, start);
        }