aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Diagnostics/Demangler/Ast/ArraySubscriptingExpression.cs
blob: 5145ff7b0c4940bbe15582d2c9496fbb17fa653d (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
using System.IO;

namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
{
    public class ArraySubscriptingExpression : BaseNode
    {
        private BaseNode _leftNode;
        private BaseNode _subscript;

        public ArraySubscriptingExpression(BaseNode leftNode, BaseNode subscript) : base(NodeType.ArraySubscriptingExpression)
        {
            _leftNode  = leftNode;
            _subscript = subscript;
        }

        public override void PrintLeft(TextWriter writer)
        {
            writer.Write("(");
            _leftNode.Print(writer);
            writer.Write(")[");
            _subscript.Print(writer);
            writer.Write("]");            
        }
    }
}