GraphView.GraphViewParser.ParseMatchClause C# (CSharp) Method

ParseMatchClause() private static method

private static ParseMatchClause ( IList tokens, int &nextToken, WMatchClause &result, int &farestError ) : bool
tokens IList
nextToken int
result WMatchClause
farestError int
return bool
        private static bool ParseMatchClause(
            IList<TSqlParserToken> tokens,
            ref int nextToken,
            ref WMatchClause result,
            ref int farestError)
        {
            var currentToken = nextToken;
            var firstToken = nextToken;
            var paths = new List<WMatchPath>();
            WMatchPath path = null;
            if (!ReadToken(tokens, "MATCH", ref currentToken, ref farestError))
                return false;
            while (ParseMatchPath(tokens, ref currentToken, ref path, ref farestError))
            {
                paths.Add(path);
                if (!ReadToken(tokens, ",", ref currentToken, ref farestError))
                    break;
            }
            if (paths.Count == 0)
                return false;
            result = new WMatchClause
            {
                Paths = paths,
                FirstTokenIndex = firstToken,
                LastTokenIndex = currentToken - 1,
            };
            nextToken = currentToken;
            return true;
        }