File tree Expand file tree Collapse file tree 5 files changed +13
-22
lines changed
Rubberduck.RegexAssistant Expand file tree Collapse file tree 5 files changed +13
-22
lines changed Original file line number Diff line number Diff line change 5
5
6
6
namespace Rubberduck . RegexAssistant
7
7
{
8
- public interface IAtom : IDescribable
8
+ internal interface IAtom : IDescribable
9
9
{
10
10
string Specifier { get ; }
11
11
}
12
12
13
- public class CharacterClass : IAtom
13
+ internal class CharacterClass : IAtom
14
14
{
15
15
public static readonly string Pattern = @"(?<!\\)\[(?<expression>.*?)(?<!\\)\]" ;
16
16
private static readonly Regex Matcher = new Regex ( "^" + Pattern + "$" ) ;
@@ -96,7 +96,7 @@ public override bool Equals(object obj)
96
96
}
97
97
}
98
98
99
- class Group : IAtom
99
+ internal class Group : IAtom
100
100
{
101
101
public static readonly string Pattern = @"(?<!\\)\((?<expression>.*)(?<!\\)\)" ;
102
102
private static readonly Regex Matcher = new Regex ( "^" + Pattern + "$" ) ;
@@ -140,7 +140,7 @@ public override bool Equals(object obj)
140
140
}
141
141
}
142
142
143
- class Literal : IAtom
143
+ internal class Literal : IAtom
144
144
{
145
145
public static readonly string Pattern = @"(?<expression>\\(u[\dA-F]{4}|x[\dA-F]{2}|[0-7]{3}|[bB\(\){}\\\[\]\.+*?1-9nftvrdDwWsS])|[^()\[\]{}\\*+?^$])" ;
146
146
private static readonly Regex Matcher = new Regex ( "^" + Pattern + "$" ) ;
Original file line number Diff line number Diff line change 7
7
8
8
namespace Rubberduck . RegexAssistant
9
9
{
10
- public interface IRegularExpression : IDescribable
10
+ internal interface IRegularExpression : IDescribable
11
11
{
12
12
Quantifier Quantifier { get ; }
13
13
}
14
14
15
- public class ConcatenatedExpression : IRegularExpression
15
+ internal class ConcatenatedExpression : IRegularExpression
16
16
{
17
17
private readonly Quantifier _quantifier ;
18
18
internal readonly IList < IRegularExpression > Subexpressions ;
@@ -40,7 +40,7 @@ public Quantifier Quantifier
40
40
}
41
41
}
42
42
43
- public class AlternativesExpression : IRegularExpression
43
+ internal class AlternativesExpression : IRegularExpression
44
44
{
45
45
private readonly Quantifier _quantifier ;
46
46
internal readonly IList < IRegularExpression > Subexpressions ;
@@ -68,7 +68,7 @@ public Quantifier Quantifier
68
68
}
69
69
}
70
70
71
- public class SingleAtomExpression : IRegularExpression
71
+ internal class SingleAtomExpression : IRegularExpression
72
72
{
73
73
public readonly IAtom Atom ;
74
74
private readonly Quantifier _quantifier ;
@@ -105,8 +105,8 @@ public override bool Equals(object obj)
105
105
return false ;
106
106
}
107
107
}
108
-
109
- public static class RegularExpression
108
+
109
+ internal static class RegularExpression
110
110
{
111
111
112
112
/// <summary>
Original file line number Diff line number Diff line change 1
-
2
- using System ;
1
+ using System ;
3
2
using System . Text . RegularExpressions ;
4
3
5
4
namespace Rubberduck . RegexAssistant
6
5
{
7
- public class Quantifier
6
+ internal class Quantifier
8
7
{
9
8
public static readonly string Pattern = @"(?<quantifier>(?<!\\)[\?\*\+]|(?<!\\)\{(\d+)(,\d*)?(?<!\\)\})" ;
10
9
private static readonly Regex Matcher = new Regex ( @"^\{(?<min>\d+)(?<max>,\d*)?\}$" ) ;
@@ -104,7 +103,7 @@ public override string ToString()
104
103
}
105
104
}
106
105
107
- public enum QuantifierKind
106
+ internal enum QuantifierKind
108
107
{
109
108
None , Expression , Wildcard
110
109
}
Original file line number Diff line number Diff line change 1
1
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 ;
7
2
8
3
namespace Rubberduck . RegexAssistant . Extensions
9
4
{
Original file line number Diff line number Diff line change 1
1
using Microsoft . VisualStudio . TestTools . UnitTesting ;
2
- using System ;
3
2
using System . Collections . Generic ;
4
3
using System . Linq ;
5
- using System . Text ;
6
- using System . Threading . Tasks ;
7
4
8
5
namespace Rubberduck . RegexAssistant . Tests
9
6
{
You can’t perform that action at this time.
0 commit comments