2018-09-15 13:29:18 +00:00
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
|
|
|
{
|
|
|
|
public class BracedRangeExpression : BaseNode
|
|
|
|
{
|
2018-12-05 00:52:39 +00:00
|
|
|
private BaseNode FirstNode;
|
|
|
|
private BaseNode LastNode;
|
|
|
|
private BaseNode Expression;
|
2018-09-15 13:29:18 +00:00
|
|
|
|
2018-12-05 00:52:39 +00:00
|
|
|
public BracedRangeExpression(BaseNode FirstNode, BaseNode LastNode, BaseNode Expression) : base(NodeType.BracedRangeExpression)
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-05 00:52:39 +00:00
|
|
|
this.FirstNode = FirstNode;
|
|
|
|
this.LastNode = LastNode;
|
|
|
|
this.Expression = Expression;
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
|
2018-12-05 00:52:39 +00:00
|
|
|
public override void PrintLeft(TextWriter Writer)
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-05 00:52:39 +00:00
|
|
|
Writer.Write("[");
|
|
|
|
FirstNode.Print(Writer);
|
|
|
|
Writer.Write(" ... ");
|
|
|
|
LastNode.Print(Writer);
|
|
|
|
Writer.Write("]");
|
2018-09-15 13:29:18 +00:00
|
|
|
|
2018-12-05 00:52:39 +00:00
|
|
|
if (!Expression.GetType().Equals(NodeType.BracedExpression) || !Expression.GetType().Equals(NodeType.BracedRangeExpression))
|
2018-09-15 13:29:18 +00:00
|
|
|
{
|
2018-12-05 00:52:39 +00:00
|
|
|
Writer.Write(" = ");
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
|
2018-12-05 00:52:39 +00:00
|
|
|
Expression.Print(Writer);
|
2018-09-15 13:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|