private CSharpSyntaxNode ParseTypeOrPatternForIsOperatorCore() { var pattern = ParsePattern(GetPrecedence(SyntaxKind.IsPatternExpression), afterIs: true); return(pattern switch { ConstantPatternSyntax cp when ConvertExpressionToType(cp.Expression, out NameSyntax type) => type, TypePatternSyntax tp => tp.Type, DiscardPatternSyntax dp => _syntaxFactory.IdentifierName(ConvertToIdentifier(dp.UnderscoreToken)), var p => p, });
private Doc PrintTypePatternSyntax(TypePatternSyntax node) { return(this.Print(node.Type)); }
public override void VisitTypePattern(TypePatternSyntax node) { Log(node, "Unsupported Syntax !"); }
public static Doc Print(TypePatternSyntax node) { return(Node.Print(node.Type)); }