From c128f0659b5c8b9decf6e164730ff395eaec6fe6 Mon Sep 17 00:00:00 2001 From: Felix Nieuwenhuizen Date: Sun, 13 Sep 2020 19:20:23 +0200 Subject: [PATCH] add missing semicolon to AltLabelStructDeclHeader rules with alternative labels were generating Cpp header files with missing semicolons in declarations after PR#2806 removed duplicate semicolons. StructDeclHeader and AltLabelStructDeclHeader differed in how attributes were declared --- .../resources/org/antlr/v4/tool/templates/codegen/Cpp/Cpp.stg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Cpp/Cpp.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Cpp/Cpp.stg index a945e8a5d..fb63f3d61 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Cpp/Cpp.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Cpp/Cpp.stg @@ -547,7 +547,7 @@ LeftRecursiveRuleFunction(currentRule, args, code, locals, ruleCtx, altLabelCtxs StructDeclHeader(struct, ctorAttrs, attrs, getters, dispatchMethods, interfaces, extensionMembers) ::= << class : public antlr4::ParserRuleContext, { public: - ;}; separator="\n"> + ;}; separator = "\n"> (antlr4::ParserRuleContext *parent, size_t invokingState); (antlr4::ParserRuleContext *parent, size_t invokingState}>); @@ -601,7 +601,7 @@ class : public Context *ctx); - }; separator = "\n"> + ;}; separator = "\n"> }; separator = "\n"> };