mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-11 18:28:50 +02:00
* Rename enum fields
* Naming conventions
* Remove unneeded ".this"
* Remove unneeded semicolons
* Remove unused Usings
* Don't use var
* Remove unneeded enum underlying types
* Explicitly label class visibility
* Remove unneeded @ prefixes
* Remove unneeded commas
* Remove unneeded if expressions
* Method doesn't use unsafe code
* Remove unneeded casts
* Initialized objects don't need an empty constructor
* Remove settings from DotSettings
* Revert "Explicitly label class visibility"
This reverts commit ad5eb5787c
.
* Small changes
* Revert external enum renaming
* Changes from feedback
* Apply previous refactorings to the merged code
59 lines
No EOL
1.4 KiB
C#
59 lines
No EOL
1.4 KiB
C#
using System.IO;
|
|
|
|
namespace Ryujinx.HLE.HOS.Diagnostics.Demangler.Ast
|
|
{
|
|
public class ArrayType : BaseNode
|
|
{
|
|
private BaseNode _base;
|
|
private BaseNode _dimensionExpression;
|
|
private string _dimensionString;
|
|
|
|
public ArrayType(BaseNode Base, BaseNode dimensionExpression = null) : base(NodeType.ArrayType)
|
|
{
|
|
_base = Base;
|
|
_dimensionExpression = dimensionExpression;
|
|
}
|
|
|
|
public ArrayType(BaseNode Base, string dimensionString) : base(NodeType.ArrayType)
|
|
{
|
|
_base = Base;
|
|
_dimensionString = dimensionString;
|
|
}
|
|
|
|
public override bool HasRightPart()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override bool IsArray()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override void PrintLeft(TextWriter writer)
|
|
{
|
|
_base.PrintLeft(writer);
|
|
}
|
|
|
|
public override void PrintRight(TextWriter writer)
|
|
{
|
|
// FIXME: detect if previous char was a ].
|
|
writer.Write(" ");
|
|
|
|
writer.Write("[");
|
|
|
|
if (_dimensionString != null)
|
|
{
|
|
writer.Write(_dimensionString);
|
|
}
|
|
else if (_dimensionExpression != null)
|
|
{
|
|
_dimensionExpression.Print(writer);
|
|
}
|
|
|
|
writer.Write("]");
|
|
|
|
_base.PrintRight(writer);
|
|
}
|
|
}
|
|
} |