()
| 99 | } |
| 100 | |
| 101 | fn build_visit_attr_matcher() -> RegexMatcher { |
| 102 | RegexMatcherBuilder::new() |
| 103 | .multi_line(true) |
| 104 | .dot_matches_new_line(true) |
| 105 | .ignore_whitespace(true) |
| 106 | .build( |
| 107 | r#" |
| 108 | ^\s*\#\[ |
| 109 | # Match any type with derive(Visitable) |
| 110 | cfg_attr\([^,]+,\s*derive\((?:csskit_derives::)?Visitable\) |
| 111 | # Capture everything from here until the type declaration to search for visit attr |
| 112 | # This captures the visit attr whether it's on same line or separate line |
| 113 | ([^\{\}]*?) |
| 114 | # Match the type declaration |
| 115 | (pub\s*(?:struct|enum)\s*) |
| 116 | # munch any comments/attributes between this and our name (for macros) |
| 117 | (:?\n?\s*(:?\/\/|\#)[^\n]*)* |
| 118 | # finally grab the word (plus any generics) |
| 119 | \s*(\w*(:?<[^>]+>)?)"#, |
| 120 | ) |
| 121 | .unwrap() |
| 122 | } |
| 123 | |
| 124 | fn build_manual_impl_matcher() -> RegexMatcher { |
| 125 | RegexMatcherBuilder::new() |
no outgoing calls
no test coverage detected