mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
31 lines
587 B
C#
31 lines
587 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Reflection.Emit;
|
|||
|
|
|
|||
|
|
namespace msgpack.Compiler
|
|||
|
|
{
|
|||
|
|
public class Variable
|
|||
|
|
{
|
|||
|
|
Variable (VariableType type, int index)
|
|||
|
|
{
|
|||
|
|
this.VarType = type;
|
|||
|
|
this.Index = index;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static Variable CreateLocal (LocalBuilder local)
|
|||
|
|
{
|
|||
|
|
return new Variable (VariableType.Local, local.LocalIndex);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static Variable CreateArg (int idx)
|
|||
|
|
{
|
|||
|
|
return new Variable (VariableType.Arg, idx);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public VariableType VarType { get; set; }
|
|||
|
|
public int Index { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|