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