static private IsParamsCapture ( LNode pattern ) : bool | ||
pattern | LNode | |
return | bool |
static bool IsParamsCapture(LNode pattern)
{
if (pattern.Calls(S.Substitute, 1)) {
LNode arg = pattern.Args.Last;
return (arg.Calls(S.DotDot, 1) || arg.Calls(S.DotDotDot, 1) || arg.AttrNamed(S.Params) != null)
&& GetCaptureIdentifier(pattern) != null;
}
return false;
}
/// <summary>Checks if <c>pattern</c> matches one of the syntax trees