private TypeReference ParseQualifiedTypeReference(TypeReference elementType)
        {
            TypeReference returnValue = elementType;

            Token token;

            while (null != (token = NextToken()))
            {
                switch (token.Kind)
                {
                case TokenKind.LBrack:
                    returnValue = ParseArrayTypeReference(returnValue);
                    break;

                case TokenKind.PointerQualifier:
                    returnValue = new PointerTypeReference(returnValue);
                    break;

                default:
                    Push(token);
                    return(returnValue);
                }
            }

            return(returnValue);
        }
示例#2
0
        private TypeReference ParseQualifiedTypeReference(TypeReference elementType)
        {
            var returnValue = elementType;

            Token token;
            while (null != (token = NextToken()))
            {
                switch (token.Kind)
                {
                    case TokenKind.LBrack:
                        returnValue = ParseArrayTypeReference(returnValue);
                        break;
                    case TokenKind.PointerQualifier:
                        returnValue = new PointerTypeReference(returnValue);
                        break;
                    default:
                        Push(token);
                        return returnValue;
                }
            }

            return returnValue;
        }