revert Go "fix"

This commit is contained in:
parrt 2016-11-17 11:16:22 -08:00
parent b4d8982e95
commit 5adf79121f
1 changed files with 25 additions and 2 deletions

View File

@ -742,12 +742,35 @@ bitsetInlineComparison(s, bits) ::= <%
InvokeRule(r, argExprsChunks) ::= <<
p.SetState(<r.stateNumber>)
<if(r.labels)><r.labels:{l | <labelref(l)> = }><endif>p.<r.name; format="cap">(<if(r.ast.options.p)><r.ast.options.p><if(argExprsChunks)>,<endif><endif><argExprsChunks>);
<if(r.labels)>
<if(r.ast.options.p)>
var _x = p.<r.name>(<r.ast.options.p><if(argExprsChunks)>, <endif><argExprsChunks>)
<else>
var _x = p.<r.name; format="cap">(<argExprsChunks>)
<endif>
<r.labels:{l | <labelref(l)> = _x}; separator="\n">
<else>
<if(r.ast.options.p)>
p.<r.name>(<r.ast.options.p><if(argExprsChunks)>, <endif><argExprsChunks>)
<else>
p.<r.name; format="cap">(<argExprsChunks>)
<endif>
<endif>
>>
MatchToken(m) ::= <<
p.SetState(<m.stateNumber>)
<if(m.labels)><m.labels:{l | <labelref(l)> = }><endif>p.Match(<parser.name><m.name>);
<if(m.labels)>
var _m = p.Match(<parser.name><m.name>)
<m.labels:{l | <labelref(l)> = _m}; separator="\n">
<else>
p.Match(<parser.name><m.name>)
<endif>
>>
MatchSet(m, expr, capture) ::= "<CommonSetStuff(m, expr, capture, false)>"