diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg index 01947f0745..5b7c069f6d 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg @@ -253,6 +253,9 @@ RuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,namedActions,fina }; separator="\n"> + +. = ; + .prototype. = function(}; separator=", ">) { var localctx = new (this, this._ctx, this.state}>); @@ -714,6 +717,9 @@ function (parser, ctx) { .prototype = Object.create(Context.prototype); .prototype.constructor = ; + +. = ; + .prototype.}; separator="\n\n">