Ejemplo n.º 1
0
        private RegexMutation AnchorRemoval(AnchorNode node, RegexNode root)
        {
            var span = node.GetSpan();

            return(new RegexMutation
            {
                OriginalNode = node,
                DisplayName = "Regex anchor removal mutation",
                Description = $"Anchor \"{root.ToString().Substring(span.Start, span.Length)}\" was removed at offset {span.Start}.",
                ReplacementPattern = root.RemoveNode(node).ToString()
            });
        }