using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax; namespace Microsoft.CodeAnalysis.CSharp.Syntax; public sealed class CheckedStatementSyntax : StatementSyntax { private SyntaxNode? attributeLists; private BlockSyntax? block; public override SyntaxList AttributeLists => new SyntaxList(((SyntaxNode)this).GetRed(ref attributeLists, 0)); public SyntaxToken Keyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CheckedStatementSyntax)(object)((SyntaxNode)this).Green).keyword, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1)); public BlockSyntax Block => ((SyntaxNode)this).GetRed(ref block, 2); public CheckedStatementSyntax Update(SyntaxToken keyword, BlockSyntax block) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, keyword, block); } internal CheckedStatementSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position) : base(green, parent, position) { } internal override SyntaxNode? GetNodeSlot(int index) { return (SyntaxNode?)(index switch { 0 => ((SyntaxNode)this).GetRedAtZero(ref attributeLists), 2 => ((SyntaxNode)this).GetRed(ref block, 2), _ => null, }); } internal override SyntaxNode? GetCachedSlot(int index) { return (SyntaxNode?)(index switch { 0 => attributeLists, 2 => block, _ => null, }); } public override void Accept(CSharpSyntaxVisitor visitor) { visitor.VisitCheckedStatement(this); } public override TResult? Accept(CSharpSyntaxVisitor visitor) { return visitor.VisitCheckedStatement(this); } public CheckedStatementSyntax Update(SyntaxList attributeLists, SyntaxToken keyword, BlockSyntax block) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (attributeLists != AttributeLists || keyword != Keyword || block != Block) { CheckedStatementSyntax checkedStatementSyntax = SyntaxFactory.CheckedStatement(Kind(), attributeLists, keyword, block); SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations(); if (annotations == null || annotations.Length == 0) { return checkedStatementSyntax; } return checkedStatementSyntax.WithAnnotations(annotations); } return this; } internal override StatementSyntax WithAttributeListsCore(SyntaxList attributeLists) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return WithAttributeLists(attributeLists); } public new CheckedStatementSyntax WithAttributeLists(SyntaxList attributeLists) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) return Update(attributeLists, Keyword, Block); } public CheckedStatementSyntax WithKeyword(SyntaxToken keyword) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, keyword, Block); } public CheckedStatementSyntax WithBlock(BlockSyntax block) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Keyword, block); } internal override StatementSyntax AddAttributeListsCore(params AttributeListSyntax[] items) { return AddAttributeLists(items); } public new CheckedStatementSyntax AddAttributeLists(params AttributeListSyntax[] items) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return WithAttributeLists(AttributeLists.AddRange((IEnumerable)items)); } public CheckedStatementSyntax AddBlockAttributeLists(params AttributeListSyntax[] items) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return WithBlock(Block.WithAttributeLists(Block.AttributeLists.AddRange((IEnumerable)items))); } public CheckedStatementSyntax AddBlockStatements(params StatementSyntax[] items) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return WithBlock(Block.WithStatements(Block.Statements.AddRange((IEnumerable)items))); } }