Skip to content

Commit bc289cc

Browse files
committed
Hid away as much of the implementation as possible. Removed unnecessary usings
1 parent 6be77a3 commit bc289cc

File tree

5 files changed

+13
-22
lines changed

5 files changed

+13
-22
lines changed

Rubberduck.RegexAssistant/Atom.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
namespace Rubberduck.RegexAssistant
77
{
8-
public interface IAtom : IDescribable
8+
internal interface IAtom : IDescribable
99
{
1010
string Specifier { get; }
1111
}
1212

13-
public class CharacterClass : IAtom
13+
internal class CharacterClass : IAtom
1414
{
1515
public static readonly string Pattern = @"(?<!\\)\[(?<expression>.*?)(?<!\\)\]";
1616
private static readonly Regex Matcher = new Regex("^" + Pattern + "$");
@@ -96,7 +96,7 @@ public override bool Equals(object obj)
9696
}
9797
}
9898

99-
class Group : IAtom
99+
internal class Group : IAtom
100100
{
101101
public static readonly string Pattern = @"(?<!\\)\((?<expression>.*)(?<!\\)\)";
102102
private static readonly Regex Matcher = new Regex("^" + Pattern + "$");
@@ -140,7 +140,7 @@ public override bool Equals(object obj)
140140
}
141141
}
142142

143-
class Literal : IAtom
143+
internal class Literal : IAtom
144144
{
145145
public static readonly string Pattern = @"(?<expression>\\(u[\dA-F]{4}|x[\dA-F]{2}|[0-7]{3}|[bB\(\){}\\\[\]\.+*?1-9nftvrdDwWsS])|[^()\[\]{}\\*+?^$])";
146146
private static readonly Regex Matcher = new Regex("^" + Pattern + "$");

Rubberduck.RegexAssistant/IRegularExpression.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
namespace Rubberduck.RegexAssistant
99
{
10-
public interface IRegularExpression : IDescribable
10+
internal interface IRegularExpression : IDescribable
1111
{
1212
Quantifier Quantifier { get; }
1313
}
1414

15-
public class ConcatenatedExpression : IRegularExpression
15+
internal class ConcatenatedExpression : IRegularExpression
1616
{
1717
private readonly Quantifier _quantifier;
1818
internal readonly IList<IRegularExpression> Subexpressions;
@@ -40,7 +40,7 @@ public Quantifier Quantifier
4040
}
4141
}
4242

43-
public class AlternativesExpression : IRegularExpression
43+
internal class AlternativesExpression : IRegularExpression
4444
{
4545
private readonly Quantifier _quantifier;
4646
internal readonly IList<IRegularExpression> Subexpressions;
@@ -68,7 +68,7 @@ public Quantifier Quantifier
6868
}
6969
}
7070

71-
public class SingleAtomExpression : IRegularExpression
71+
internal class SingleAtomExpression : IRegularExpression
7272
{
7373
public readonly IAtom Atom;
7474
private readonly Quantifier _quantifier;
@@ -105,8 +105,8 @@ public override bool Equals(object obj)
105105
return false;
106106
}
107107
}
108-
109-
public static class RegularExpression
108+
109+
internal static class RegularExpression
110110
{
111111

112112
/// <summary>

Rubberduck.RegexAssistant/Quantifier.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-

2-
using System;
1+
using System;
32
using System.Text.RegularExpressions;
43

54
namespace Rubberduck.RegexAssistant
65
{
7-
public class Quantifier
6+
internal class Quantifier
87
{
98
public static readonly string Pattern = @"(?<quantifier>(?<!\\)[\?\*\+]|(?<!\\)\{(\d+)(,\d*)?(?<!\\)\})";
109
private static readonly Regex Matcher = new Regex(@"^\{(?<min>\d+)(?<max>,\d*)?\}$");
@@ -104,7 +103,7 @@ public override string ToString()
104103
}
105104
}
106105

107-
public enum QuantifierKind
106+
internal enum QuantifierKind
108107
{
109108
None, Expression, Wildcard
110109
}

Rubberduck.RegexAssistant/QuantifierExtensions.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
using Rubberduck.RegexAssistant.i18n;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
72

83
namespace Rubberduck.RegexAssistant.Extensions
94
{

Rubberduck.RegexAssistant/Tests/RegularExpressionTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using Microsoft.VisualStudio.TestTools.UnitTesting;
2-
using System;
32
using System.Collections.Generic;
43
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
74

85
namespace Rubberduck.RegexAssistant.Tests
96
{

0 commit comments

Comments
 (0)