GraphView.GraphViewParser.ParseSchemaObjectName C# (CSharp) Method

ParseSchemaObjectName() private static method

private static ParseSchemaObjectName ( IList tokens, int &nextToken, WSchemaObjectName &result, int &farestError ) : bool
tokens IList
nextToken int
result WSchemaObjectName
farestError int
return bool
        private static bool ParseSchemaObjectName(
            IList<TSqlParserToken> tokens,
            ref int nextToken,
            ref WSchemaObjectName result,
            ref int farestError)
        {
            var firstToken = nextToken;
            var currentToken = nextToken;
            var identifiers = new List<Identifier>();
            Identifier identifier = null;
            if (!ParseIdentifier(tokens, ref currentToken, ref identifier, ref farestError))
                return false;
            identifiers.Add(identifier);
            for (var i = 0; i < 3; ++i)
            {
                if (!ReadToken(tokens, ".", ref currentToken, ref farestError))
                    break;
                ParseIdentifier(tokens, ref currentToken, ref identifier, ref farestError);
                identifiers.Add(identifier);
            }
            result = new WSchemaObjectName
            {
                Identifiers = identifiers,
                FirstTokenIndex = firstToken,
                LastTokenIndex = currentToken - 1,
            };
            nextToken = currentToken;
            return true;
        }