InvokeRule without Fix without Temporary variable

This commit is contained in:
sridharxp 2016-11-16 13:14:38 +05:30
parent 56c5508a37
commit 6e09f08348
2 changed files with 3 additions and 25 deletions

View File

@ -109,3 +109,4 @@ YYYY/MM/DD, github id, Full name, email
2016/11/01, RYDB3RG, Kai Stammerjohann, RYDB3RG@users.noreply.github.com
2016/11/05, runner-mei, meifakun, runner.mei@gmail.com
2016/11/15, hanjoes, Hanzhou Shi, hanzhou87@gmail.com
2016/11/06, sridharxp, Sridharan S, aurosridhar@gmail.com

View File

@ -742,35 +742,12 @@ bitsetInlineComparison(s, bits) ::= <%
InvokeRule(r, argExprsChunks) ::= <<
p.SetState(<r.stateNumber>)
<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>
<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>);
>>
MatchToken(m) ::= <<
p.SetState(<m.stateNumber>)
<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>
<if(m.labels)><m.labels:{l | <labelref(l)> = }><endif>p.Match(<parser.name><m.name>);
>>
MatchSet(m, expr, capture) ::= "<CommonSetStuff(m, expr, capture, false)>"