17 references to Matcher
Microsoft.CodeAnalysis.Workspaces (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (17)
33var whitespace = Matcher.Repeat( 34Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsWhitespaceTrivia, "\\b")); 35var endOfLine = Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsEndOfLineTrivia, "\\n"); 36var singleBlankLine = Matcher.Sequence(whitespace, endOfLine); 38var shebangComment = Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsShebangDirectiveTrivia, "#!"); 39var singleLineComment = Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsSingleLineCommentTrivia, "//"); 40var multiLineComment = Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsMultiLineCommentTrivia, "/**/"); 41var singleLineDocumentationComment = Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsSingleLineDocCommentTrivia, "///"); 42var multiLineDocumentationComment = Matcher.Single<SyntaxTrivia>(this.SyntaxFacts.IsMultiLineDocCommentTrivia, "/** */"); 43var anyCommentMatcher = Matcher.Choice(shebangComment, singleLineComment, multiLineComment, singleLineDocumentationComment, multiLineDocumentationComment); 45var commentLine = Matcher.Sequence(whitespace, anyCommentMatcher, whitespace, endOfLine); 47_oneOrMoreBlankLines = Matcher.OneOrMore(singleBlankLine); 49Matcher.Sequence( 50Matcher.OneOrMore(commentLine), 53Matcher.Sequence( 54Matcher.OneOrMore(commentLine), 55Matcher.Repeat(singleBlankLine));