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
This commit is contained in:
Felix Nieuwenhuizen 2020-09-13 19:20:23 +02:00
parent 6fed4cd522
commit c128f0659b
1 changed files with 2 additions and 2 deletions

View File

@ -547,7 +547,7 @@ LeftRecursiveRuleFunction(currentRule, args, code, locals, ruleCtx, altLabelCtxs
StructDeclHeader(struct, ctorAttrs, attrs, getters, dispatchMethods, interfaces, extensionMembers) ::= <<
class <file.exportMacro> <struct.name> : public <if (contextSuperClass)><contextSuperClass><else>antlr4::ParserRuleContext<endif><if(interfaces)>, <interfaces; separator=", "><endif> {
public:
<attrs: {a | <a>;}; separator="\n">
<attrs: {a | <a>;}; separator = "\n">
<if (ctorAttrs)><struct.name>(antlr4::ParserRuleContext *parent, size_t invokingState);<endif>
<struct.name>(antlr4::ParserRuleContext *parent, size_t invokingState<ctorAttrs: {a | , <a>}>);
<if (struct.provideCopyFrom)> <! don't need copy unless we have subclasses !>
@ -601,7 +601,7 @@ class <file.exportMacro> <struct.name> : public <currentRule.name; format = "cap
public:
<struct.name>(<currentRule.name; format = "cap">Context *ctx);
<if (attrs)><attrs: {a | <a>}; separator = "\n"><endif>
<if (attrs)><attrs: {a | <a>;}; separator = "\n"><endif>
<getters: {g | <g>}; separator = "\n">
<dispatchMethods; separator = "\n">
};