public LoadedRenamingRule(RegisterRenamingRule rule) { if (rule.RegisterSetRegex != null) { RegisterSetRegex = new Regex($"^{rule.RegisterSetRegex}$"); } else { RegisterSetRegex = null; } switch (rule.Mode) { case RegisterRenamingMode.HighLow: RegisterRegex = new Regex($"^({rule.RegisterRegex})(H|L)$"); break; case RegisterRenamingMode.WithSuffix: RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)_(.*)$"); break; default: RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)$"); break; } Mode = rule.Mode; Offset = rule.Offset; }
public LoadedRenamingRule(RegisterRenamingRule rule) { if (rule.RegisterSetRegex != null) RegisterSetRegex = new Regex($"^{rule.RegisterSetRegex}$"); else RegisterSetRegex = null; switch (rule.Mode) { case RegisterRenamingMode.HighLow: RegisterRegex = new Regex($"^({rule.RegisterRegex})(H|L)$"); break; case RegisterRenamingMode.WithSuffix: RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)_(.*)$"); break; default: RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)$"); break; } Mode = rule.Mode; Offset = rule.Offset; }