Loyc.Syntax.LNodeExt.MatchesPatternNested C# (CSharp) Method

MatchesPatternNested() static private method

static private MatchesPatternNested ( LNode candidate, LNode pattern, LNode>.MMap &captures, VList &trivia ) : bool
candidate LNode
pattern LNode
captures LNode>.MMap
trivia VList
return bool
		static bool MatchesPatternNested(LNode candidate, LNode pattern, ref MMap<Symbol, LNode> captures, ref VList<LNode> trivia)
		{
			VList<LNode> unmatchedAttrs;
			if (!MatchesPattern(candidate, pattern, ref captures, out unmatchedAttrs))
				return false;
			if (unmatchedAttrs.Any(a => !a.IsTrivia))
				return false;
			trivia.AddRange(unmatchedAttrs);
			return true;
		}