aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Diagnostics/Demangler/Ast/DeleteExpression.cs
blob: 14715d25e5d035ea0a62264df62819b40201c835 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.IO;

namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
{
    public class DeleteExpression : ParentNode
    {
        private bool _isGlobal;
        private bool _isArrayExpression;

        public DeleteExpression(BaseNode child, bool isGlobal, bool isArrayExpression) : base(NodeType.DeleteExpression, child)
        {
            _isGlobal          = isGlobal;
            _isArrayExpression = isArrayExpression;
        }

        public override void PrintLeft(TextWriter writer)
        {
            if (_isGlobal)
            {
                writer.Write("::");
            }

            writer.Write("delete");

            if (_isArrayExpression)
            {
                writer.Write("[] ");
            }

            Child.Print(writer);
        }
    }
}