30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
using System.Collections.Immutable;
|
|||
|
|
using System.Diagnostics;
|
||
|
|
|
||
|
|
namespace Microsoft.CodeAnalysis.CSharp;
|
||
|
|
|
||
|
|
internal sealed class BoundMultipleLocalDeclarations : BoundMultipleLocalDeclarationsBase
|
||
|
|
{
|
||
|
|
public BoundMultipleLocalDeclarations(SyntaxNode syntax, ImmutableArray<BoundLocalDeclaration> localDeclarations, bool hasErrors = false)
|
||
|
|
: base(BoundKind.MultipleLocalDeclarations, syntax, localDeclarations, hasErrors || localDeclarations.HasErrors())
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
[DebuggerStepThrough]
|
||
|
|
public override BoundNode? Accept(BoundTreeVisitor visitor)
|
||
|
|
{
|
||
|
|
return visitor.VisitMultipleLocalDeclarations(this);
|
||
|
|
}
|
||
|
|
|
||
|
|
public BoundMultipleLocalDeclarations Update(ImmutableArray<BoundLocalDeclaration> localDeclarations)
|
||
|
|
{
|
||
|
|
if (localDeclarations != base.LocalDeclarations)
|
||
|
|
{
|
||
|
|
BoundMultipleLocalDeclarations boundMultipleLocalDeclarations = new BoundMultipleLocalDeclarations(Syntax, localDeclarations, base.HasErrors);
|
||
|
|
boundMultipleLocalDeclarations.CopyAttributes(this);
|
||
|
|
return boundMultipleLocalDeclarations;
|
||
|
|
}
|
||
|
|
return this;
|
||
|
|
}
|
||
|
|
}
|