GraphView.GraphViewParser.ParseMatchPath C# (CSharp) Method

ParseMatchPath() private static method

private static ParseMatchPath ( IList tokens, int &nextToken, WMatchPath &result, int &farestError ) : bool
tokens IList
nextToken int
result WMatchPath
farestError int
return bool
        private static bool ParseMatchPath(
            IList<TSqlParserToken> tokens,
            ref int nextToken,
            ref WMatchPath result,
            ref int farestError)
        {
            var currentToken = nextToken;
            var firstToken = nextToken;

            var nodeList = new List<Tuple<WSchemaObjectName, WEdgeColumnReferenceExpression>>();

            Tuple<WSchemaObjectName, WEdgeColumnReferenceExpression> tuple = null;
            while (ParseMatchPathPart(tokens, ref currentToken, ref tuple, ref farestError))
            {
                nodeList.Add(tuple);
            }

            if (nodeList.Count == 0)
                return false;

            WSchemaObjectName tail = null;

            if (!ParseSchemaObjectName(tokens, ref currentToken, ref tail, ref farestError))
                return false;

            result = new WMatchPath
            {
                PathEdgeList = nodeList,
                Tail = tail,
                FirstTokenIndex = firstToken,
                LastTokenIndex = currentToken - 1
            };
            nextToken = currentToken;
            return true;
        }