GraphView.GraphViewParser.ParseIdentifier C# (CSharp) Method

ParseIdentifier() private static method

private static ParseIdentifier ( IList tokens, int &nextToken, Identifier &result, int &farestError ) : bool
tokens IList
nextToken int
result Identifier
farestError int
return bool
        private static bool ParseIdentifier(
            IList<TSqlParserToken> tokens,
            ref int nextToken,
            ref Identifier result,
            ref int farestError)
        {
            var currentToken = nextToken;
            var identifierName = "";
            QuoteType quoteType;
            if (!ReadToken(tokens, TSqlTokenType.Identifier, ref identifierName, ref currentToken, ref farestError) &&
                !ReadToken(tokens, TSqlTokenType.QuotedIdentifier, ref identifierName, ref currentToken, ref farestError) &&
                !ReadToken(tokens, TSqlTokenType.AsciiStringOrQuotedIdentifier, ref identifierName, ref currentToken, ref farestError))
                return false;
            var decodedIdentifierName = Identifier.DecodeIdentifier(identifierName, out quoteType);
            result = new Identifier
            {
                Value = decodedIdentifierName,
                QuoteType = quoteType,
                FirstTokenIndex = nextToken,
                LastTokenIndex = nextToken
            };
            nextToken = currentToken;

            return true;
        }