mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
42 lines
833 B
C#
42 lines
833 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.IL2CPU
|
|
{
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
|
|
public sealed class OpCodeAttribute : Attribute
|
|
{
|
|
public ILOpCode.Code OpCode
|
|
{
|
|
get
|
|
{
|
|
return opCode;
|
|
}
|
|
}
|
|
private readonly ILOpCode.Code opCode;
|
|
|
|
public OpCodeAttribute(ILOpCode.Code OpCode)
|
|
{
|
|
this.opCode = OpCode;
|
|
}
|
|
|
|
public string Mnemonic
|
|
{
|
|
get
|
|
{
|
|
return mnemonic;
|
|
}
|
|
}
|
|
|
|
//OLD:
|
|
private readonly string mnemonic;
|
|
|
|
public OpCodeAttribute(string Mnemonic)
|
|
{
|
|
this.mnemonic = Mnemonic;
|
|
}
|
|
}
|
|
|
|
}
|