Merge pull request #14639 from geoffw0/anchorquery

Swift: New query for Missing Regular Expression Anchor
This commit is contained in:
Geoffrey White
2023-11-02 09:20:19 +00:00
committed by GitHub
13 changed files with 493 additions and 6 deletions

View File

@@ -15,6 +15,11 @@ import HostnameRegexp as HostnameShared
signature module MissingRegExpAnchorSig<
RegexTreeViewSig TreeImpl, HostnameShared::HostnameRegexpSig<TreeImpl> Specific>
{
/**
* Holds if this regular expression is used in a 'replacement' operation, such
* as replacing all matches of the regular expression in the input string
* with another string.
*/
predicate isUsedAsReplace(Specific::RegExpPatternSource pattern);
/** Gets a string representation of an end anchor from a regular expression. */