mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Support method calls on instances
This commit is contained in:
@@ -8,7 +8,7 @@ internal class IrisExpression : Expression
|
||||
{
|
||||
public virtual string Decompile(DecompileContext context) => ToString();
|
||||
|
||||
public static Expression ToExpression(object p)
|
||||
public static Expression Wrap(object p)
|
||||
{
|
||||
return p switch
|
||||
{
|
||||
@@ -16,7 +16,14 @@ internal class IrisExpression : Expression
|
||||
Expression expr => expr,
|
||||
Disassembler.RawConstantInfo constantInfo => new IrisConstantExpression(constantInfo.Value, constantInfo.Type),
|
||||
|
||||
_ => throw new NotImplementedException()
|
||||
_ => throw new NotImplementedException($"Unable to wrap '{p}' in an expression")
|
||||
};
|
||||
}
|
||||
|
||||
public static string Decompile(Expression expr, DecompileContext context)
|
||||
{
|
||||
return expr is IrisExpression irisExpr
|
||||
? irisExpr.Decompile(context)
|
||||
: expr.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user