Permalink
Browse files

grammar update and bug fixes; regenerate test grammars

  • Loading branch information...
kulibali committed Mar 30, 2016
1 parent d5ef2fa commit 4f8139f773a06a39113cadf7766758077e60fc58
@@ -1149,10 +1149,14 @@ void HoistCalledDisjunctions(AST.Rule currentRule, AST.Call callNode)
if (outerArgs != null)
{
var outerVarNames = outerArgs.Parms.OfType<AST.Bind>()
.Select(b => b.VarName)
.Select(b => new string(b.VarName.Inputs.ToArray()).Trim())
.ToList();
var closedVarNames = ruleBody.OfType<AST.CallOrVar>()
.Where(cov => outerVarNames.Any(vn => vn.Inputs.SequenceEqual(cov.Name.Inputs)))
.Where(cov =>
{
var innerVarName = new string(cov.Name.Inputs.ToArray()).Trim();
return outerVarNames.Contains(innerVarName);
})
.Select(cov => cov.Items.First())
.ToList();
Oops, something went wrong.

0 comments on commit 4f8139f

Please sign in to comment.