public static IIndentationGrammarAnalysis <SyntaxToken, SyntaxNode, GNode> match <GNode, TParent, T>( this IIndentationGrammarAnalysis <SyntaxToken, SyntaxNode, GNode> self, IEnumerable <Regex> patterns, Action <IIndentationGrammarAnalysis <SyntaxToken, SyntaxNode, GNode> > children = null, Action <TParent, T> then = null) where T : GNode, new() { foreach (var pattern in patterns) { match <GNode, TParent, T>(self, RegexParser.Create <T>(pattern), children, then); } return(self); }
//regex public static IIndentationGrammarAnalysis <SyntaxToken, SyntaxNode, GNode> match <GNode, TParent, T>( this IIndentationGrammarAnalysis <SyntaxToken, SyntaxNode, GNode> self, Regex pattern, Action <IIndentationGrammarAnalysis <SyntaxToken, SyntaxNode, GNode> > children = null, Action <TParent, T> then = null) where T : GNode, new() => match <GNode, TParent, T>(self, RegexParser.Create <T>(pattern), children, then);