From a988b668d321f846555fa38bb4d9d0ebb95775dc Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 23 Feb 2013 23:12:51 -0600 Subject: [PATCH] Add RuleVersionAttribute --- .../Antlr4.Runtime/Antlr4.Runtime.csproj | 1 + .../Antlr4.Runtime/RuleVersionAttribute.cs | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 runtime/CSharp/Antlr4.Runtime/RuleVersionAttribute.cs diff --git a/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.csproj b/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.csproj index 4c7557413..c3d07473e 100644 --- a/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.csproj +++ b/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.csproj @@ -145,6 +145,7 @@ + diff --git a/runtime/CSharp/Antlr4.Runtime/RuleVersionAttribute.cs b/runtime/CSharp/Antlr4.Runtime/RuleVersionAttribute.cs new file mode 100644 index 000000000..2fa8ed137 --- /dev/null +++ b/runtime/CSharp/Antlr4.Runtime/RuleVersionAttribute.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; + } + } + } +}