Skip to content

Commit

Permalink
Fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
parrt committed Jan 21, 2015
1 parent 8fcd12a commit 3152b69
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ RuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,namedActions,fina

<altLabelCtxs:{l | <altLabelCtxs.(l)>}; separator="\n">

<! Define fields of this parser to export the context classes !>
<parser.name>.<currentRule.ctxType> = <currentRule.ctxType>;

<parser.name>.prototype.<currentRule.name> = function(<currentRule.args:{a | <a.name>}; separator=", ">) {

var localctx = new <currentRule.ctxType>(this, this._ctx, this.state<currentRule.args:{a | , <a.name>}>);
Expand Down Expand Up @@ -714,6 +717,9 @@ function <struct.name>(parser, ctx) {
<struct.name>.prototype = Object.create(<currentRule.name; format="cap">Context.prototype);
<struct.name>.prototype.constructor = <struct.name>;

<! Define fields of this parser to export this struct/context class !>
<parser.name>.<struct.name> = <struct.name>;

<getters:{g | <struct.name>.prototype.<g>}; separator="\n\n">
<dispatchMethods; separator="\n">

Expand Down

0 comments on commit 3152b69

Please sign in to comment.