2018-09-15 13:29:18 +00:00
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
|
|
|
{
|
|
|
|
public class DeleteExpression : ParentNode
|
|
|
|
{
|
2018-12-06 11:16:24 +00:00
|
|
|
private bool _isGlobal;
|
|
|
|
private bool _isArrayExpression;
|
2018-09-15 13:29:18 +00:00
|
|
|
|
2018-12-06 11:16:24 +00:00
|
|
|
public DeleteExpression(BaseNode child, bool isGlobal, bool isArrayExpression) : base(NodeType.DeleteExpression, child)
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-06 11:16:24 +00:00
|
|
|
_isGlobal = isGlobal;
|
|
|
|
_isArrayExpression = isArrayExpression;
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
|
2018-12-06 11:16:24 +00:00
|
|
|
public override void PrintLeft(TextWriter writer)
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-06 11:16:24 +00:00
|
|
|
if (_isGlobal)
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-06 11:16:24 +00:00
|
|
|
writer.Write("::");
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
|
2018-12-06 11:16:24 +00:00
|
|
|
writer.Write("delete");
|
2018-09-15 13:29:18 +00:00
|
|
|
|
2018-12-06 11:16:24 +00:00
|
|
|
if (_isArrayExpression)
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-06 11:16:24 +00:00
|
|
|
writer.Write("[] ");
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
|
2018-12-06 11:16:24 +00:00
|
|
|
Child.Print(writer);
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|