using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax; namespace Microsoft.CodeAnalysis.CSharp.Syntax; public sealed class GotoStatementSyntax : StatementSyntax { private SyntaxNode? attributeLists; private ExpressionSyntax? expression; public override SyntaxList AttributeLists => new SyntaxList(((SyntaxNode)this).GetRed(ref attributeLists, 0)); public SyntaxToken GotoKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.GotoStatementSyntax)(object)((SyntaxNode)this).Green).gotoKeyword, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1)); public SyntaxToken CaseOrDefaultKeyword { get { //IL_002e: 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) //IL_001c: Unknown result type (might be due to invalid IL or missing references) SyntaxToken caseOrDefaultKeyword = ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.GotoStatementSyntax)(object)((SyntaxNode)this).Green).caseOrDefaultKeyword; if (caseOrDefaultKeyword == null) { return default(SyntaxToken); } return new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)caseOrDefaultKeyword, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2)); } } public ExpressionSyntax? Expression => ((SyntaxNode)this).GetRed(ref expression, 3); public SyntaxToken SemicolonToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.GotoStatementSyntax)(object)((SyntaxNode)this).Green).semicolonToken, ((SyntaxNode)this).GetChildPosition(4), ((SyntaxNode)this).GetChildIndex(4)); public GotoStatementSyntax Update(SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken) { //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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, gotoKeyword, caseOrDefaultKeyword, expression, semicolonToken); } internal GotoStatementSyntax(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), 3 => ((SyntaxNode)this).GetRed(ref expression, 3), _ => null, }); } internal override SyntaxNode? GetCachedSlot(int index) { return (SyntaxNode?)(index switch { 0 => attributeLists, 3 => expression, _ => null, }); } public override void Accept(CSharpSyntaxVisitor visitor) { visitor.VisitGotoStatement(this); } public override TResult? Accept(CSharpSyntaxVisitor visitor) { return visitor.VisitGotoStatement(this); } public GotoStatementSyntax Update(SyntaxList attributeLists, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) { //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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) if (attributeLists != AttributeLists || gotoKeyword != GotoKeyword || caseOrDefaultKeyword != CaseOrDefaultKeyword || expression != Expression || semicolonToken != SemicolonToken) { GotoStatementSyntax gotoStatementSyntax = SyntaxFactory.GotoStatement(Kind(), attributeLists, gotoKeyword, caseOrDefaultKeyword, expression, semicolonToken); SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations(); if (annotations == null || annotations.Length == 0) { return gotoStatementSyntax; } return gotoStatementSyntax.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 GotoStatementSyntax 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) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return Update(attributeLists, GotoKeyword, CaseOrDefaultKeyword, Expression, SemicolonToken); } public GotoStatementSyntax WithGotoKeyword(SyntaxToken gotoKeyword) { //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_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, gotoKeyword, CaseOrDefaultKeyword, Expression, SemicolonToken); } public GotoStatementSyntax WithCaseOrDefaultKeyword(SyntaxToken caseOrDefaultKeyword) { //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) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, GotoKeyword, caseOrDefaultKeyword, Expression, SemicolonToken); } public GotoStatementSyntax WithExpression(ExpressionSyntax? expression) { //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) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, GotoKeyword, CaseOrDefaultKeyword, expression, SemicolonToken); } public GotoStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken) { //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) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, GotoKeyword, CaseOrDefaultKeyword, Expression, semicolonToken); } internal override StatementSyntax AddAttributeListsCore(params AttributeListSyntax[] items) { return AddAttributeLists(items); } public new GotoStatementSyntax 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)); } }