Add RuleVersionAttribute

This commit is contained in:
Sam Harwell 2013-02-23 23:12:51 -06:00
parent 2ea504a493
commit a988b668d3
2 changed files with 24 additions and 0 deletions

View File

@ -145,6 +145,7 @@
<Compile Include="RecognitionException.cs" />
<Compile Include="Recognizer`2.cs" />
<Compile Include="RuleContext.cs" />
<Compile Include="RuleVersionAttribute.cs" />
<Compile Include="Sharpen\Arrays.cs" />
<Compile Include="Sharpen\AtomicReference`1.cs" />
<Compile Include="Sharpen\BitSet.cs" />

View File

@ -0,0 +1,23 @@
namespace Antlr4.Runtime
{
using System;
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class RuleVersionAttribute : Attribute
{
private readonly int _version;
public RuleVersionAttribute(int version)
{
_version = version;
}
public int Version
{
get
{
return _version;
}
}
}
}