public BoundTypeAlias(TypeAliasSymbol typeAliasSymbol, TypeSymbol declaredType, ImmutableArray <BoundVariableQualifier> qualifiers)
     : base(BoundNodeKind.TypeAlias)
 {
     TypeAliasSymbol = typeAliasSymbol;
     DeclaredType    = declaredType;
     Qualifiers      = qualifiers;
 }
        private BoundTypeAlias BindTypeAlias(TypeAliasSyntax syntax, TypeSymbol variableType)
        {
            variableType = BindArrayRankSpecifiers(syntax.ArrayRankSpecifiers, variableType);

            var symbol = new TypeAliasSymbol(syntax, variableType);

            AddSymbol(symbol, syntax.Identifier.SourceRange);

            var boundQualifiers = new List <BoundVariableQualifier>();

            foreach (var qualifier in syntax.Qualifiers)
            {
                boundQualifiers.Add(Bind(qualifier, BindVariableQualifier));
            }

            return(new BoundTypeAlias(symbol, variableType, boundQualifiers.ToImmutableArray()));
        }
Esempio n. 3
0
        private static void AppendTypeAlias(this ICollection <SymbolMarkupToken> markup, TypeAliasSymbol symbol)
        {
            markup.AppendKeyword("typedef");
            markup.AppendSpace();

            markup.AppendType(symbol.ValueType, true);
            markup.AppendSpace();

            markup.AppendName(SymbolMarkupKind.GlobalVariableName, symbol.Name);
        }
Esempio n. 4
0
        private static void AppendTypeAlias(this ICollection<SymbolMarkupToken> markup, TypeAliasSymbol symbol)
        {
            markup.AppendKeyword("typedef");
            markup.AppendSpace();

            markup.AppendType(symbol.ValueType, true);
            markup.AppendSpace();

            markup.AppendName(SymbolMarkupKind.GlobalVariableName, symbol.Name);
        }
Esempio n. 5
0
        private static void AppendTypeAlias(this ICollection <SymbolMarkupToken> markup, TypeAliasSymbol symbol, SymbolDisplayFormat format)
        {
            if (format == SymbolDisplayFormat.QuickInfo)
            {
                markup.AppendKeyword("typedef");
                markup.AppendSpace();

                markup.AppendType(symbol.ValueType, true);
                markup.AppendSpace();
            }

            markup.AppendName(SymbolMarkupKind.GlobalVariableName, symbol.Name);
        }