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())); }
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); }
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); }
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); }