Fix code style
This commit is contained in:
parent
e9a99c0e0e
commit
2299ef0565
46 changed files with 1246 additions and 455 deletions
|
@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public ArraySubscriptingExpression(BaseNode LeftNode, BaseNode Subscript) : base(NodeType.ArraySubscriptingExpression)
|
public ArraySubscriptingExpression(BaseNode LeftNode, BaseNode Subscript) : base(NodeType.ArraySubscriptingExpression)
|
||||||
{
|
{
|
||||||
this.LeftNode = LeftNode;
|
this.LeftNode = LeftNode;
|
||||||
this.Subscript = Subscript;
|
this.Subscript = Subscript;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,17 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
private BaseNode Base;
|
private BaseNode Base;
|
||||||
private BaseNode DimensionExpression;
|
private BaseNode DimensionExpression;
|
||||||
private string DimensionString;
|
private string DimensionString;
|
||||||
|
|
||||||
public ArrayType(BaseNode Base, BaseNode DimensionExpression = null) : base(NodeType.ArrayType)
|
public ArrayType(BaseNode Base, BaseNode DimensionExpression = null) : base(NodeType.ArrayType)
|
||||||
{
|
{
|
||||||
this.Base = Base;
|
this.Base = Base;
|
||||||
this.DimensionExpression = DimensionExpression;
|
this.DimensionExpression = DimensionExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayType(BaseNode Base, string DimensionString) : base(NodeType.ArrayType)
|
public ArrayType(BaseNode Base, string DimensionString) : base(NodeType.ArrayType)
|
||||||
{
|
{
|
||||||
this.Base = Base;
|
this.Base = Base;
|
||||||
this.DimensionString = DimensionString;
|
this.DimensionString = DimensionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,14 +39,21 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
// FIXME: detect if previous char was a ].
|
// FIXME: detect if previous char was a ].
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
Writer.Write("[");
|
|
||||||
if (DimensionString != null)
|
|
||||||
Writer.Write(DimensionString);
|
|
||||||
else if (DimensionExpression != null)
|
|
||||||
DimensionExpression.Print(Writer);
|
|
||||||
Writer.Write("]");
|
|
||||||
Base.PrintRight(Writer);
|
|
||||||
|
|
||||||
|
Writer.Write("[");
|
||||||
|
|
||||||
|
if (DimensionString != null)
|
||||||
|
{
|
||||||
|
Writer.Write(DimensionString);
|
||||||
|
}
|
||||||
|
else if (DimensionExpression != null)
|
||||||
|
{
|
||||||
|
DimensionExpression.Print(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
|
Writer.Write("]");
|
||||||
|
|
||||||
|
Base.PrintRight(Writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -70,8 +70,11 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public virtual void Print(TextWriter Writer)
|
public virtual void Print(TextWriter Writer)
|
||||||
{
|
{
|
||||||
PrintLeft(Writer);
|
PrintLeft(Writer);
|
||||||
|
|
||||||
if (HasRightPart())
|
if (HasRightPart())
|
||||||
|
{
|
||||||
PrintRight(Writer);
|
PrintRight(Writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void PrintLeft(TextWriter Writer);
|
public abstract void PrintLeft(TextWriter Writer);
|
||||||
|
@ -101,7 +104,9 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
StringWriter Writer = new StringWriter();
|
StringWriter Writer = new StringWriter();
|
||||||
|
|
||||||
Print(Writer);
|
Print(Writer);
|
||||||
|
|
||||||
return Writer.ToString();
|
return Writer.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,32 +5,37 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class BinaryExpression : BaseNode
|
public class BinaryExpression : BaseNode
|
||||||
{
|
{
|
||||||
private BaseNode LeftPart;
|
private BaseNode LeftPart;
|
||||||
private string Name;
|
private string Name;
|
||||||
private BaseNode RightPart;
|
private BaseNode RightPart;
|
||||||
|
|
||||||
public BinaryExpression(BaseNode LeftPart, string Name, BaseNode RightPart) : base(NodeType.BinaryExpression)
|
public BinaryExpression(BaseNode LeftPart, string Name, BaseNode RightPart) : base(NodeType.BinaryExpression)
|
||||||
{
|
{
|
||||||
this.LeftPart = LeftPart;
|
this.LeftPart = LeftPart;
|
||||||
this.Name = Name;
|
this.Name = Name;
|
||||||
this.RightPart = RightPart;
|
this.RightPart = RightPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Name.Equals(">"))
|
if (Name.Equals(">"))
|
||||||
|
{
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
LeftPart.Print(Writer);
|
LeftPart.Print(Writer);
|
||||||
Writer.Write(") ");
|
Writer.Write(") ");
|
||||||
|
|
||||||
Writer.Write(Name);
|
Writer.Write(Name);
|
||||||
|
|
||||||
Writer.Write(" (");
|
Writer.Write(" (");
|
||||||
RightPart.Print(Writer);
|
RightPart.Print(Writer);
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
|
||||||
|
|
||||||
if (Name.Equals(">"))
|
if (Name.Equals(">"))
|
||||||
|
{
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,12 +6,12 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
private BaseNode Element;
|
private BaseNode Element;
|
||||||
private BaseNode Expression;
|
private BaseNode Expression;
|
||||||
private bool IsArrayExpression;
|
private bool IsArrayExpression;
|
||||||
|
|
||||||
public BracedExpression(BaseNode Element, BaseNode Expression, bool IsArrayExpression) : base(NodeType.BracedExpression)
|
public BracedExpression(BaseNode Element, BaseNode Expression, bool IsArrayExpression) : base(NodeType.BracedExpression)
|
||||||
{
|
{
|
||||||
this.Element = Element;
|
this.Element = Element;
|
||||||
this.Expression = Expression;
|
this.Expression = Expression;
|
||||||
this.IsArrayExpression = IsArrayExpression;
|
this.IsArrayExpression = IsArrayExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,9 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
Writer.Write(" = ");
|
Writer.Write(" = ");
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression.Print(Writer);
|
Expression.Print(Writer);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,8 +10,8 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public BracedRangeExpression(BaseNode FirstNode, BaseNode LastNode, BaseNode Expression) : base(NodeType.BracedRangeExpression)
|
public BracedRangeExpression(BaseNode FirstNode, BaseNode LastNode, BaseNode Expression) : base(NodeType.BracedRangeExpression)
|
||||||
{
|
{
|
||||||
this.FirstNode = FirstNode;
|
this.FirstNode = FirstNode;
|
||||||
this.LastNode = LastNode;
|
this.LastNode = LastNode;
|
||||||
this.Expression = Expression;
|
this.Expression = Expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
Writer.Write(" = ");
|
Writer.Write(" = ");
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression.Print(Writer);
|
Expression.Print(Writer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
Callee.Print(Writer);
|
Callee.Print(Writer);
|
||||||
|
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
Writer.Write(string.Join<BaseNode>(", ", Nodes.ToArray()));
|
Writer.Write(string.Join<BaseNode>(", ", Nodes.ToArray()));
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
|
|
@ -6,14 +6,14 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class CastExpression : BaseNode
|
public class CastExpression : BaseNode
|
||||||
{
|
{
|
||||||
private string Kind;
|
private string Kind;
|
||||||
private BaseNode To;
|
private BaseNode To;
|
||||||
private BaseNode From;
|
private BaseNode From;
|
||||||
|
|
||||||
public CastExpression(string Kind, BaseNode To, BaseNode From) : base(NodeType.CastExpression)
|
public CastExpression(string Kind, BaseNode To, BaseNode From) : base(NodeType.CastExpression)
|
||||||
{
|
{
|
||||||
this.Kind = Kind;
|
this.Kind = Kind;
|
||||||
this.To = To;
|
this.To = To;
|
||||||
this.From = From;
|
this.From = From;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public ConditionalExpression(BaseNode ConditionNode, BaseNode ThenNode, BaseNode ElseNode) : base(NodeType.ConditionalExpression)
|
public ConditionalExpression(BaseNode ConditionNode, BaseNode ThenNode, BaseNode ElseNode) : base(NodeType.ConditionalExpression)
|
||||||
{
|
{
|
||||||
this.ThenNode = ThenNode;
|
this.ThenNode = ThenNode;
|
||||||
this.ConditionNode = ConditionNode;
|
this.ConditionNode = ConditionNode;
|
||||||
this.ElseNode = ElseNode;
|
this.ElseNode = ElseNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public ConversionExpression(BaseNode TypeNode, BaseNode Expressions) : base(NodeType.ConversionExpression)
|
public ConversionExpression(BaseNode TypeNode, BaseNode Expressions) : base(NodeType.ConversionExpression)
|
||||||
{
|
{
|
||||||
this.TypeNode = TypeNode;
|
this.TypeNode = TypeNode;
|
||||||
this.Expressions = Expressions;
|
this.Expressions = Expressions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class ConversionOperatorType : ParentNode
|
public class ConversionOperatorType : ParentNode
|
||||||
{
|
{
|
||||||
public ConversionOperatorType(BaseNode Child) : base(NodeType.ConversionOperatorType, Child)
|
public ConversionOperatorType(BaseNode Child) : base(NodeType.ConversionOperatorType, Child) { }
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,8 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class CtorDtorNameType : ParentNode
|
public class CtorDtorNameType : ParentNode
|
||||||
{
|
{
|
||||||
bool IsDestructor;
|
private bool IsDestructor;
|
||||||
|
|
||||||
public CtorDtorNameType(BaseNode Name, bool IsDestructor) : base(NodeType.CtorDtorNameType, Name)
|
public CtorDtorNameType(BaseNode Name, bool IsDestructor) : base(NodeType.CtorDtorNameType, Name)
|
||||||
{
|
{
|
||||||
this.IsDestructor = IsDestructor;
|
this.IsDestructor = IsDestructor;
|
||||||
|
@ -13,7 +14,10 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (IsDestructor)
|
if (IsDestructor)
|
||||||
|
{
|
||||||
Writer.Write("~");
|
Writer.Write("~");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write(Child.GetName());
|
Writer.Write(Child.GetName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public CtorVtableSpecialName(BaseNode FirstType, BaseNode SecondType) : base(NodeType.CtorVtableSpecialName)
|
public CtorVtableSpecialName(BaseNode FirstType, BaseNode SecondType) : base(NodeType.CtorVtableSpecialName)
|
||||||
{
|
{
|
||||||
this.FirstType = FirstType;
|
this.FirstType = FirstType;
|
||||||
this.SecondType = SecondType;
|
this.SecondType = SecondType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,24 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public DeleteExpression(BaseNode Child, bool IsGlobal, bool IsArrayExpression) : base(NodeType.DeleteExpression, Child)
|
public DeleteExpression(BaseNode Child, bool IsGlobal, bool IsArrayExpression) : base(NodeType.DeleteExpression, Child)
|
||||||
{
|
{
|
||||||
this.IsGlobal = IsGlobal;
|
this.IsGlobal = IsGlobal;
|
||||||
this.IsArrayExpression = IsArrayExpression;
|
this.IsArrayExpression = IsArrayExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (IsGlobal)
|
if (IsGlobal)
|
||||||
|
{
|
||||||
Writer.Write("::");
|
Writer.Write("::");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write("delete");
|
Writer.Write("delete");
|
||||||
|
|
||||||
if (IsArrayExpression)
|
if (IsArrayExpression)
|
||||||
|
{
|
||||||
Writer.Write("[] ");
|
Writer.Write("[] ");
|
||||||
|
}
|
||||||
|
|
||||||
Child.Print(Writer);
|
Child.Print(Writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class DtorName : ParentNode
|
public class DtorName : ParentNode
|
||||||
{
|
{
|
||||||
public DtorName(BaseNode Name) : base(NodeType.DtOrName, Name)
|
public DtorName(BaseNode Name) : base(NodeType.DtOrName, Name) { }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,9 +4,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class DynamicExceptionSpec : ParentNode
|
public class DynamicExceptionSpec : ParentNode
|
||||||
{
|
{
|
||||||
public DynamicExceptionSpec(BaseNode Child) : base(NodeType.DynamicExceptionSpec, Child)
|
public DynamicExceptionSpec(BaseNode Child) : base(NodeType.DynamicExceptionSpec, Child) { }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class ElaboratedType : ParentNode
|
public class ElaboratedType : ParentNode
|
||||||
{
|
{
|
||||||
private string Elaborated;
|
private string Elaborated;
|
||||||
|
|
||||||
public ElaboratedType(string Elaborated, BaseNode Type) : base(NodeType.ElaboratedType, Type)
|
public ElaboratedType(string Elaborated, BaseNode Type) : base(NodeType.ElaboratedType, Type)
|
||||||
{
|
{
|
||||||
this.Elaborated = Elaborated;
|
this.Elaborated = Elaborated;
|
||||||
|
|
|
@ -4,15 +4,15 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class EnclosedExpression : BaseNode
|
public class EnclosedExpression : BaseNode
|
||||||
{
|
{
|
||||||
private string Prefix;
|
private string Prefix;
|
||||||
private BaseNode Expression;
|
private BaseNode Expression;
|
||||||
private string Postfix;
|
private string Postfix;
|
||||||
|
|
||||||
public EnclosedExpression(string Prefix, BaseNode Expression, string Postfix) : base(NodeType.EnclosedExpression)
|
public EnclosedExpression(string Prefix, BaseNode Expression, string Postfix) : base(NodeType.EnclosedExpression)
|
||||||
{
|
{
|
||||||
this.Prefix = Prefix;
|
this.Prefix = Prefix;
|
||||||
this.Expression = Expression;
|
this.Expression = Expression;
|
||||||
this.Postfix = Postfix;
|
this.Postfix = Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
|
|
@ -10,14 +10,15 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
private BaseNode Ref;
|
private BaseNode Ref;
|
||||||
private BaseNode Attrs;
|
private BaseNode Attrs;
|
||||||
private BaseNode Ret;
|
private BaseNode Ret;
|
||||||
|
|
||||||
public EncodedFunction(BaseNode Name, BaseNode Params, BaseNode CV, BaseNode Ref, BaseNode Attrs, BaseNode Ret) : base(NodeType.NameType)
|
public EncodedFunction(BaseNode Name, BaseNode Params, BaseNode CV, BaseNode Ref, BaseNode Attrs, BaseNode Ret) : base(NodeType.NameType)
|
||||||
{
|
{
|
||||||
this.Name = Name;
|
this.Name = Name;
|
||||||
this.Params = Params;
|
this.Params = Params;
|
||||||
this.CV = CV;
|
this.CV = CV;
|
||||||
this.Ref = Ref;
|
this.Ref = Ref;
|
||||||
this.Attrs = Attrs;
|
this.Attrs = Attrs;
|
||||||
this.Ret = Ret;
|
this.Ret = Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
@ -25,10 +26,15 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
if (Ret != null)
|
if (Ret != null)
|
||||||
{
|
{
|
||||||
Ret.PrintLeft(Writer);
|
Ret.PrintLeft(Writer);
|
||||||
|
|
||||||
if (!Ret.HasRightPart())
|
if (!Ret.HasRightPart())
|
||||||
|
{
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Name.Print(Writer);
|
Name.Print(Writer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HasRightPart()
|
public override bool HasRightPart()
|
||||||
|
@ -39,21 +45,33 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintRight(TextWriter Writer)
|
public override void PrintRight(TextWriter Writer)
|
||||||
{
|
{
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
|
|
||||||
if (Params != null)
|
if (Params != null)
|
||||||
|
{
|
||||||
Params.Print(Writer);
|
Params.Print(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
|
||||||
if (Ret != null)
|
if (Ret != null)
|
||||||
|
{
|
||||||
Ret.PrintRight(Writer);
|
Ret.PrintRight(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
if (CV != null)
|
if (CV != null)
|
||||||
|
{
|
||||||
CV.Print(Writer);
|
CV.Print(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
if (Ref != null)
|
if (Ref != null)
|
||||||
|
{
|
||||||
Ref.Print(Writer);
|
Ref.Print(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
if (Attrs != null)
|
if (Attrs != null)
|
||||||
|
{
|
||||||
Attrs.Print(Writer);
|
Attrs.Print(Writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,18 +4,17 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class FoldExpression : BaseNode
|
public class FoldExpression : BaseNode
|
||||||
{
|
{
|
||||||
private bool IsLeftFold;
|
private bool IsLeftFold;
|
||||||
|
private string OperatorName;
|
||||||
private string OperatorName;
|
|
||||||
private BaseNode Expression;
|
private BaseNode Expression;
|
||||||
private BaseNode Initializer;
|
private BaseNode Initializer;
|
||||||
|
|
||||||
public FoldExpression(bool IsLeftFold, string OperatorName, BaseNode Expression, BaseNode Initializer) : base(NodeType.FunctionParameter)
|
public FoldExpression(bool IsLeftFold, string OperatorName, BaseNode Expression, BaseNode Initializer) : base(NodeType.FunctionParameter)
|
||||||
{
|
{
|
||||||
this.IsLeftFold = IsLeftFold;
|
this.IsLeftFold = IsLeftFold;
|
||||||
this.OperatorName = OperatorName;
|
this.OperatorName = OperatorName;
|
||||||
this.Expression = Expression;
|
this.Expression = Expression;
|
||||||
this.Initializer = Initializer;
|
this.Initializer = Initializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
|
|
@ -4,11 +4,11 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class ForwardTemplateReference : BaseNode
|
public class ForwardTemplateReference : BaseNode
|
||||||
{
|
{
|
||||||
private int Index;
|
// TODO: Compute inside the Demangler
|
||||||
|
|
||||||
// TOOD: Compute inside the Demangler
|
|
||||||
public BaseNode Reference;
|
public BaseNode Reference;
|
||||||
|
|
||||||
|
private int Index;
|
||||||
|
|
||||||
public ForwardTemplateReference(int Index) : base(NodeType.ForwardTemplateReference)
|
public ForwardTemplateReference(int Index) : base(NodeType.ForwardTemplateReference)
|
||||||
{
|
{
|
||||||
this.Index = Index;
|
this.Index = Index;
|
||||||
|
|
|
@ -14,8 +14,11 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
Writer.Write("fp ");
|
Writer.Write("fp ");
|
||||||
|
|
||||||
if (Number != null)
|
if (Number != null)
|
||||||
|
{
|
||||||
Writer.Write(Number);
|
Writer.Write(Number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,18 +4,19 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class FunctionType : BaseNode
|
public class FunctionType : BaseNode
|
||||||
{
|
{
|
||||||
private BaseNode ReturnType;
|
private BaseNode ReturnType;
|
||||||
private BaseNode Params;
|
private BaseNode Params;
|
||||||
private BaseNode CVQualifier;
|
private BaseNode CVQualifier;
|
||||||
private SimpleReferenceType ReferenceQualifier;
|
private SimpleReferenceType ReferenceQualifier;
|
||||||
private BaseNode ExceptionSpec;
|
private BaseNode ExceptionSpec;
|
||||||
|
|
||||||
public FunctionType(BaseNode ReturnType, BaseNode Params, BaseNode CVQualifier, SimpleReferenceType ReferenceQualifier, BaseNode ExceptionSpec) : base(NodeType.FunctionType)
|
public FunctionType(BaseNode ReturnType, BaseNode Params, BaseNode CVQualifier, SimpleReferenceType ReferenceQualifier, BaseNode ExceptionSpec) : base(NodeType.FunctionType)
|
||||||
{
|
{
|
||||||
this.ReturnType = ReturnType;
|
this.ReturnType = ReturnType;
|
||||||
this.Params = Params;
|
this.Params = Params;
|
||||||
this.CVQualifier = CVQualifier;
|
this.CVQualifier = CVQualifier;
|
||||||
this.ReferenceQualifier = ReferenceQualifier;
|
this.ReferenceQualifier = ReferenceQualifier;
|
||||||
this.ExceptionSpec = ExceptionSpec;
|
this.ExceptionSpec = ExceptionSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
@ -29,8 +30,11 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
Params.Print(Writer);
|
Params.Print(Writer);
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
|
||||||
ReturnType.PrintRight(Writer);
|
ReturnType.PrintRight(Writer);
|
||||||
|
|
||||||
CVQualifier.Print(Writer);
|
CVQualifier.Print(Writer);
|
||||||
|
|
||||||
if (ReferenceQualifier.Qualifier != Reference.None)
|
if (ReferenceQualifier.Qualifier != Reference.None)
|
||||||
{
|
{
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
|
|
|
@ -6,19 +6,22 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class InitListExpression : BaseNode
|
public class InitListExpression : BaseNode
|
||||||
{
|
{
|
||||||
private BaseNode TypeNode;
|
private BaseNode TypeNode;
|
||||||
private List<BaseNode> Nodes;
|
private List<BaseNode> Nodes;
|
||||||
|
|
||||||
public InitListExpression(BaseNode TypeNode, List<BaseNode> Nodes) : base(NodeType.InitListExpression)
|
public InitListExpression(BaseNode TypeNode, List<BaseNode> Nodes) : base(NodeType.InitListExpression)
|
||||||
{
|
{
|
||||||
this.TypeNode = TypeNode;
|
this.TypeNode = TypeNode;
|
||||||
this.Nodes = Nodes;
|
this.Nodes = Nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (TypeNode != null)
|
if (TypeNode != null)
|
||||||
|
{
|
||||||
TypeNode.Print(Writer);
|
TypeNode.Print(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write("{");
|
Writer.Write("{");
|
||||||
Writer.Write(string.Join<BaseNode>(", ", Nodes.ToArray()));
|
Writer.Write(string.Join<BaseNode>(", ", Nodes.ToArray()));
|
||||||
Writer.Write("}");
|
Writer.Write("}");
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class IntegerCastExpression : ParentNode
|
public class IntegerCastExpression : ParentNode
|
||||||
{
|
{
|
||||||
private string Number;
|
private string Number;
|
||||||
|
|
||||||
public IntegerCastExpression(BaseNode Type, string Number) : base(NodeType.IntegerCastExpression, Type)
|
public IntegerCastExpression(BaseNode Type, string Number) : base(NodeType.IntegerCastExpression, Type)
|
||||||
{
|
{
|
||||||
this.Number = Number;
|
this.Number = Number;
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public IntegerLiteral(string LitteralName, string LitteralValue) : base(NodeType.IntegerLiteral)
|
public IntegerLiteral(string LitteralName, string LitteralValue) : base(NodeType.IntegerLiteral)
|
||||||
{
|
{
|
||||||
this.LitteralValue = LitteralValue;
|
this.LitteralValue = LitteralValue;
|
||||||
this.LitteralName = LitteralName;
|
this.LitteralName = LitteralName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
|
|
@ -4,10 +4,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class LiteralOperator : ParentNode
|
public class LiteralOperator : ParentNode
|
||||||
{
|
{
|
||||||
public LiteralOperator(BaseNode Child) : base(NodeType.LiteralOperator, Child)
|
public LiteralOperator(BaseNode Child) : base(NodeType.LiteralOperator, Child) { }
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public LocalName(BaseNode Encoding, BaseNode Entity) : base(NodeType.LocalName)
|
public LocalName(BaseNode Encoding, BaseNode Entity) : base(NodeType.LocalName)
|
||||||
{
|
{
|
||||||
this.Encoding = Encoding;
|
this.Encoding = Encoding;
|
||||||
this.Entity = Entity;
|
this.Entity = Entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
|
|
@ -5,14 +5,13 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class MemberExpression : BaseNode
|
public class MemberExpression : BaseNode
|
||||||
{
|
{
|
||||||
private BaseNode LeftNode;
|
private BaseNode LeftNode;
|
||||||
|
private string Kind;
|
||||||
private BaseNode RightNode;
|
private BaseNode RightNode;
|
||||||
|
|
||||||
private string Kind;
|
|
||||||
|
|
||||||
public MemberExpression(BaseNode LeftNode, string Kind, BaseNode RightNode) : base(NodeType.MemberExpression)
|
public MemberExpression(BaseNode LeftNode, string Kind, BaseNode RightNode) : base(NodeType.MemberExpression)
|
||||||
{
|
{
|
||||||
this.LeftNode = LeftNode;
|
this.LeftNode = LeftNode;
|
||||||
this.Kind = Kind;
|
this.Kind = Kind;
|
||||||
this.RightNode = RightNode;
|
this.RightNode = RightNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
this.NameValue = NameValue;
|
this.NameValue = NameValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NameType(string NameValue) : base(NodeType.NameType)
|
public NameType(string NameValue) : base(NodeType.NameType)
|
||||||
{
|
{
|
||||||
this.NameValue = NameValue;
|
this.NameValue = NameValue;
|
||||||
|
|
|
@ -6,9 +6,10 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
private BaseNode Prev;
|
private BaseNode Prev;
|
||||||
private BaseNode TemplateArgument;
|
private BaseNode TemplateArgument;
|
||||||
|
|
||||||
public NameTypeWithTemplateArguments(BaseNode Prev, BaseNode TemplateArgument) : base(NodeType.NameTypeWithTemplateArguments)
|
public NameTypeWithTemplateArguments(BaseNode Prev, BaseNode TemplateArgument) : base(NodeType.NameTypeWithTemplateArguments)
|
||||||
{
|
{
|
||||||
this.Prev = Prev;
|
this.Prev = Prev;
|
||||||
this.TemplateArgument = TemplateArgument;
|
this.TemplateArgument = TemplateArgument;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class NestedName : ParentNode
|
public class NestedName : ParentNode
|
||||||
{
|
{
|
||||||
private BaseNode Name;
|
private BaseNode Name;
|
||||||
|
|
||||||
public NestedName(BaseNode Name, BaseNode Type) : base(NodeType.NestedName, Type)
|
public NestedName(BaseNode Name, BaseNode Type) : base(NodeType.NestedName, Type)
|
||||||
{
|
{
|
||||||
this.Name = Name;
|
this.Name = Name;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class NewExpression : BaseNode
|
public class NewExpression : BaseNode
|
||||||
{
|
{
|
||||||
private NodeArray Expressions;
|
private NodeArray Expressions;
|
||||||
private BaseNode TypeNode;
|
private BaseNode TypeNode;
|
||||||
private NodeArray Initializers;
|
private NodeArray Initializers;
|
||||||
|
|
||||||
private bool IsGlobal;
|
private bool IsGlobal;
|
||||||
|
@ -13,21 +13,27 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
|
|
||||||
public NewExpression(NodeArray Expressions, BaseNode TypeNode, NodeArray Initializers, bool IsGlobal, bool IsArrayExpression) : base(NodeType.NewExpression)
|
public NewExpression(NodeArray Expressions, BaseNode TypeNode, NodeArray Initializers, bool IsGlobal, bool IsArrayExpression) : base(NodeType.NewExpression)
|
||||||
{
|
{
|
||||||
this.Expressions = Expressions;
|
this.Expressions = Expressions;
|
||||||
this.TypeNode = TypeNode;
|
this.TypeNode = TypeNode;
|
||||||
this.Initializers = Initializers;
|
this.Initializers = Initializers;
|
||||||
this.IsGlobal = IsGlobal;
|
|
||||||
|
this.IsGlobal = IsGlobal;
|
||||||
this.IsArrayExpression = IsArrayExpression;
|
this.IsArrayExpression = IsArrayExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (IsGlobal)
|
if (IsGlobal)
|
||||||
|
{
|
||||||
Writer.Write("::operator ");
|
Writer.Write("::operator ");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write("new ");
|
Writer.Write("new ");
|
||||||
|
|
||||||
if (IsArrayExpression)
|
if (IsArrayExpression)
|
||||||
|
{
|
||||||
Writer.Write("[] ");
|
Writer.Write("[] ");
|
||||||
|
}
|
||||||
|
|
||||||
if (Expressions.Nodes.Count != 0)
|
if (Expressions.Nodes.Count != 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,10 +5,8 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class PackedTemplateParameter : NodeArray
|
public class PackedTemplateParameter : NodeArray
|
||||||
{
|
{
|
||||||
public PackedTemplateParameter(List<BaseNode> Nodes) : base(Nodes, NodeType.PackedTemplateParameter)
|
public PackedTemplateParameter(List<BaseNode> Nodes) : base(Nodes, NodeType.PackedTemplateParameter) { }
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
foreach (BaseNode Node in Nodes)
|
foreach (BaseNode Node in Nodes)
|
||||||
|
@ -34,6 +32,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class PackedTemplateParameterExpansion : ParentNode
|
public class PackedTemplateParameterExpansion : ParentNode
|
||||||
{
|
{
|
||||||
public PackedTemplateParameterExpansion(BaseNode Child) : base(NodeType.PackedTemplateParameterExpansion, Child)
|
public PackedTemplateParameterExpansion(BaseNode Child) : base(NodeType.PackedTemplateParameterExpansion, Child) {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public abstract class ParentNode : BaseNode
|
public abstract class ParentNode : BaseNode
|
||||||
{
|
{
|
||||||
public BaseNode Child { get; private set; }
|
public BaseNode Child { get; private set; }
|
||||||
|
|
||||||
public ParentNode(NodeType Type, BaseNode Child) : base(Type)
|
public ParentNode(NodeType Type, BaseNode Child) : base(Type)
|
||||||
{
|
{
|
||||||
this.Child = Child;
|
this.Child = Child;
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class PointerType : BaseNode
|
public class PointerType : BaseNode
|
||||||
{
|
{
|
||||||
private BaseNode Child;
|
private BaseNode Child;
|
||||||
|
|
||||||
public PointerType(BaseNode Child) : base(NodeType.PointerType)
|
public PointerType(BaseNode Child) : base(NodeType.PointerType)
|
||||||
{
|
{
|
||||||
this.Child = Child;
|
this.Child = Child;
|
||||||
|
@ -19,15 +20,25 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
Child.PrintLeft(Writer);
|
Child.PrintLeft(Writer);
|
||||||
if (Child.IsArray())
|
if (Child.IsArray())
|
||||||
|
{
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
|
}
|
||||||
|
|
||||||
if (Child.IsArray() || Child.HasFunctions())
|
if (Child.IsArray() || Child.HasFunctions())
|
||||||
|
{
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write("*");
|
Writer.Write("*");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintRight(TextWriter Writer)
|
public override void PrintRight(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Child.IsArray() || Child.HasFunctions())
|
if (Child.IsArray() || Child.HasFunctions())
|
||||||
|
{
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
}
|
||||||
|
|
||||||
Child.PrintRight(Writer);
|
Child.PrintRight(Writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class PostfixExpression : ParentNode
|
public class PostfixExpression : ParentNode
|
||||||
{
|
{
|
||||||
private string Operator;
|
private string Operator;
|
||||||
|
|
||||||
public PostfixExpression(BaseNode Type, string Operator) : base(NodeType.PostfixExpression, Type)
|
public PostfixExpression(BaseNode Type, string Operator) : base(NodeType.PostfixExpression, Type)
|
||||||
{
|
{
|
||||||
this.Operator = Operator;
|
this.Operator = Operator;
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class PostfixQualifiedType : ParentNode
|
public class PostfixQualifiedType : ParentNode
|
||||||
{
|
{
|
||||||
private string PostfixQualifier;
|
private string PostfixQualifier;
|
||||||
|
|
||||||
public PostfixQualifiedType(string PostfixQualifier, BaseNode Type) : base(NodeType.PostfixQualifiedType, Type)
|
public PostfixQualifiedType(string PostfixQualifier, BaseNode Type) : base(NodeType.PostfixQualifiedType, Type)
|
||||||
{
|
{
|
||||||
this.PostfixQualifier = PostfixQualifier;
|
this.PostfixQualifier = PostfixQualifier;
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public QualifiedName(BaseNode Qualifier, BaseNode Name) : base(NodeType.QualifiedName)
|
public QualifiedName(BaseNode Qualifier, BaseNode Name) : base(NodeType.QualifiedName)
|
||||||
{
|
{
|
||||||
this.Qualifier = Qualifier;
|
this.Qualifier = Qualifier;
|
||||||
this.Name = Name;
|
this.Name = Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
Const,
|
Const,
|
||||||
Volatile,
|
Volatile,
|
||||||
Restricted = 4
|
Restricted = 4
|
||||||
};
|
}
|
||||||
|
|
||||||
public enum Reference
|
public enum Reference
|
||||||
{
|
{
|
||||||
|
@ -32,10 +32,12 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
Writer.Write(" const");
|
Writer.Write(" const");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Qualifier & CV.Volatile) != 0)
|
if ((Qualifier & CV.Volatile) != 0)
|
||||||
{
|
{
|
||||||
Writer.Write(" volatile");
|
Writer.Write(" volatile");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Qualifier & CV.Restricted) != 0)
|
if ((Qualifier & CV.Restricted) != 0)
|
||||||
{
|
{
|
||||||
Writer.Write(" restrict");
|
Writer.Write(" restrict");
|
||||||
|
@ -45,7 +47,10 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Child != null)
|
if (Child != null)
|
||||||
|
{
|
||||||
Child.PrintLeft(Writer);
|
Child.PrintLeft(Writer);
|
||||||
|
}
|
||||||
|
|
||||||
PrintQualifier(Writer);
|
PrintQualifier(Writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +62,9 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintRight(TextWriter Writer)
|
public override void PrintRight(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Child != null)
|
if (Child != null)
|
||||||
|
{
|
||||||
Child.PrintRight(Writer);
|
Child.PrintRight(Writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +83,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
Writer.Write("&");
|
Writer.Write("&");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Qualifier & Reference.RValue) != 0)
|
if ((Qualifier & Reference.RValue) != 0)
|
||||||
{
|
{
|
||||||
Writer.Write("&&");
|
Writer.Write("&&");
|
||||||
|
@ -85,9 +93,14 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Child != null)
|
if (Child != null)
|
||||||
|
{
|
||||||
Child.PrintLeft(Writer);
|
Child.PrintLeft(Writer);
|
||||||
|
}
|
||||||
else if (Qualifier != Reference.None)
|
else if (Qualifier != Reference.None)
|
||||||
|
{
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
|
}
|
||||||
|
|
||||||
PrintQualifier(Writer);
|
PrintQualifier(Writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +112,9 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintRight(TextWriter Writer)
|
public override void PrintRight(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Child != null)
|
if (Child != null)
|
||||||
|
{
|
||||||
Child.PrintRight(Writer);
|
Child.PrintRight(Writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,13 +4,13 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class ReferenceType : BaseNode
|
public class ReferenceType : BaseNode
|
||||||
{
|
{
|
||||||
private string Reference;
|
private string Reference;
|
||||||
private BaseNode Child;
|
private BaseNode Child;
|
||||||
|
|
||||||
public ReferenceType(string Reference, BaseNode Child) : base(NodeType.ReferenceType)
|
public ReferenceType(string Reference, BaseNode Child) : base(NodeType.ReferenceType)
|
||||||
{
|
{
|
||||||
this.Reference = Reference;
|
this.Reference = Reference;
|
||||||
this.Child = Child;
|
this.Child = Child;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HasRightPart()
|
public override bool HasRightPart()
|
||||||
|
@ -21,16 +21,26 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
Child.PrintLeft(Writer);
|
Child.PrintLeft(Writer);
|
||||||
|
|
||||||
if (Child.IsArray())
|
if (Child.IsArray())
|
||||||
|
{
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
|
}
|
||||||
|
|
||||||
if (Child.IsArray() || Child.HasFunctions())
|
if (Child.IsArray() || Child.HasFunctions())
|
||||||
|
{
|
||||||
Writer.Write("(");
|
Writer.Write("(");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write(Reference);
|
Writer.Write(Reference);
|
||||||
}
|
}
|
||||||
public override void PrintRight(TextWriter Writer)
|
public override void PrintRight(TextWriter Writer)
|
||||||
{
|
{
|
||||||
if (Child.IsArray() || Child.HasFunctions())
|
if (Child.IsArray() || Child.HasFunctions())
|
||||||
|
{
|
||||||
Writer.Write(")");
|
Writer.Write(")");
|
||||||
|
}
|
||||||
|
|
||||||
Child.PrintRight(Writer);
|
Child.PrintRight(Writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
public class SpecialName : ParentNode
|
public class SpecialName : ParentNode
|
||||||
{
|
{
|
||||||
private string SpecialValue;
|
private string SpecialValue;
|
||||||
|
|
||||||
public SpecialName(string SpecialValue, BaseNode Type) : base(NodeType.SpecialName, Type)
|
public SpecialName(string SpecialValue, BaseNode Type) : base(NodeType.SpecialName, Type)
|
||||||
{
|
{
|
||||||
this.SpecialValue = SpecialValue;
|
this.SpecialValue = SpecialValue;
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
IStream,
|
IStream,
|
||||||
OStream,
|
OStream,
|
||||||
IOStream,
|
IOStream,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private SpecialType SpecialSubstitutionKey;
|
private SpecialType SpecialSubstitutionKey;
|
||||||
|
|
||||||
public SpecialSubstitution(SpecialType SpecialSubstitutionKey) : base(NodeType.SpecialSubstitution)
|
public SpecialSubstitution(SpecialType SpecialSubstitutionKey) : base(NodeType.SpecialSubstitution)
|
||||||
|
@ -36,7 +36,10 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
return "basic_string";
|
return "basic_string";
|
||||||
case SpecialType.String:
|
case SpecialType.String:
|
||||||
if (Type == NodeType.ExpandedSpecialSubstitution)
|
if (Type == NodeType.ExpandedSpecialSubstitution)
|
||||||
|
{
|
||||||
return "basic_string";
|
return "basic_string";
|
||||||
|
}
|
||||||
|
|
||||||
return "string";
|
return "string";
|
||||||
case SpecialType.IStream:
|
case SpecialType.IStream:
|
||||||
return "istream";
|
return "istream";
|
||||||
|
@ -45,6 +48,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
case SpecialType.IOStream:
|
case SpecialType.IOStream:
|
||||||
return "iostream";
|
return "iostream";
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +69,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
case SpecialType.IOStream:
|
case SpecialType.IOStream:
|
||||||
return "std::basic_iostream<char, std::char_traits<char> >";
|
return "std::basic_iostream<char, std::char_traits<char> >";
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,20 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
||||||
{
|
{
|
||||||
public class TemplateArguments : NodeArray
|
public class TemplateArguments : NodeArray
|
||||||
{
|
{
|
||||||
public TemplateArguments(List<BaseNode> Nodes) : base(Nodes, NodeType.TemplateArguments)
|
public TemplateArguments(List<BaseNode> Nodes) : base(Nodes, NodeType.TemplateArguments) { }
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
public override void PrintLeft(TextWriter Writer)
|
public override void PrintLeft(TextWriter Writer)
|
||||||
{
|
{
|
||||||
string Params = string.Join<BaseNode>(", ", Nodes.ToArray());
|
string Params = string.Join<BaseNode>(", ", Nodes.ToArray());
|
||||||
|
|
||||||
Writer.Write("<");
|
Writer.Write("<");
|
||||||
|
|
||||||
Writer.Write(Params);
|
Writer.Write(Params);
|
||||||
|
|
||||||
if (Params.EndsWith(">"))
|
if (Params.EndsWith(">"))
|
||||||
|
{
|
||||||
Writer.Write(" ");
|
Writer.Write(" ");
|
||||||
|
}
|
||||||
|
|
||||||
Writer.Write(">");
|
Writer.Write(">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue