From 65caff9353f1d61fc7296e41100f3e10e142af3a Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 24 Feb 2013 13:35:26 -0600 Subject: [PATCH] Appropriate use of "static readonly" or "const" instead of "final" --- .../tool/templates/codegen/CSharp/CSharp.stg | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg index 4f1ea9f5c..baf02183a 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg @@ -139,15 +139,15 @@ Parser(parser, funcs, atn, sempredFuncs, superClass) ::= << Parser_(parser, funcs, atn, sempredFuncs, ctor, superClass) ::= << public abstract class : { - public static final int + public const int =}; separator=", ", wrap, anchor>; - public static final string[] tokenNames = { + public static readonly string[] tokenNames = { }; null="\"\\"", separator=", ", wrap, anchor> }; - public static final int + public const int = }; separator=", ", wrap, anchor>; - public static final string[] ruleNames = { + public static readonly string[] ruleNames = { "}; separator=", ", wrap, anchor> }; @@ -823,18 +823,18 @@ using DFA = Antlr4.Runtime.Dfa.DFA; Lexer(lexer, atn, actionFuncs, sempredFuncs, superClass) ::= << public abstract class : { - public static final int + public const int =}; separator=", ", wrap, anchor>; - = ;}; separator="\n"> + = ;}; separator="\n"> public static string[] modeNames = { "}; separator=", ", wrap, anchor> }; - public static final string[] tokenNames = { + public static readonly string[] tokenNames = { "\", }; separator=", ", wrap, anchor> }; - public static final string[] ruleNames = { + public static readonly string[] ruleNames = { "}; separator=", ", wrap, anchor> }; @@ -864,9 +864,9 @@ public abstract class : <\t>"}>"; -public static final ATN _ATN = +public static readonly ATN _ATN = ATNSimulator.Deserialize(_serializedATN.ToCharArray()); static {