aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Diagnostics/Demangler/Ast/DeleteExpression.cs
blob: 20d0bd8a2a6ac06dd9561ca9b9f24739664ef44f (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 readonly bool _isGlobal;
        private readonly 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);
        }
    }
}