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 da1586e3ad..d96dcaa72a 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 @@ -860,6 +860,8 @@ CaptureNextTokenType(d) ::= " = TokenStream.LA(1);" StructDecl(struct,ctorAttrs,attrs,getters,dispatchMethods,interfaces,extensionMembers,signatures, superClass={ParserRuleContext}) ::= << +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "")] +[System.CLSCompliant(false)] public partial class : ParserRuleContext, { ;}; separator="\n"> }; separator="\n"> @@ -883,6 +885,8 @@ public partial class : > AltLabelStructDecl(struct,attrs,getters,dispatchMethods) ::= << +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "")] +[System.CLSCompliant(false)] public partial class : Context { ;}; separator="\n"> }; separator="\n">