forked from jasder/antlr
Add RuleVersionAttribute
This commit is contained in:
parent
2ea504a493
commit
a988b668d3
|
@ -145,6 +145,7 @@
|
||||||
<Compile Include="RecognitionException.cs" />
|
<Compile Include="RecognitionException.cs" />
|
||||||
<Compile Include="Recognizer`2.cs" />
|
<Compile Include="Recognizer`2.cs" />
|
||||||
<Compile Include="RuleContext.cs" />
|
<Compile Include="RuleContext.cs" />
|
||||||
|
<Compile Include="RuleVersionAttribute.cs" />
|
||||||
<Compile Include="Sharpen\Arrays.cs" />
|
<Compile Include="Sharpen\Arrays.cs" />
|
||||||
<Compile Include="Sharpen\AtomicReference`1.cs" />
|
<Compile Include="Sharpen\AtomicReference`1.cs" />
|
||||||
<Compile Include="Sharpen\BitSet.cs" />
|
<Compile Include="Sharpen\BitSet.cs" />
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue