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 PrintDiscardPatternSyntax(DiscardPatternSyntax node) { return(this.PrintSyntaxToken(node.UnderscoreToken)); }
public Discard(Context cx, DiscardPatternSyntax pattern, IExpressionParentEntity parent, int child) : this(cx, (CSharpSyntaxNode)pattern, parent, child) { }
public override void VisitDiscardPattern(DiscardPatternSyntax node) => base.VisitDiscardPattern(node);
public static Doc Print(DiscardPatternSyntax node) { return(Token.Print(node.UnderscoreToken)); }
public override void VisitDiscardPattern(DiscardPatternSyntax node) { Log(node, "Unsupported Syntax !"); }