@@ -10,19 +10,19 @@ namespace Rubberduck.SmartIndenter
10
10
internal class AbsoluteCodeLine
11
11
{
12
12
private const string StupidLineEnding = ": _" ;
13
- private static readonly Regex LineNumberRegex = new Regex ( @"^(?<number>(-?\d+)|(&H[0-9A-F]{1,8}))(?<separator>:)?\s+(?<code>.*)" , RegexOptions . ExplicitCapture ) ;
14
- private static readonly Regex EndOfLineCommentRegex = new Regex ( @"^(?!(Rem\s)|('))(?<code>[^']*)(\s(?<comment>'.*))$" , RegexOptions . ExplicitCapture ) ;
15
- private static readonly Regex ProcedureStartRegex = new Regex ( @"^(Public\s|Private\s|Friend\s)?(Static\s)?(Sub|Function|Property\s(Let|Get|Set))\s" ) ;
16
- private static readonly Regex ProcedureStartIgnoreRegex = new Regex ( @"^[LR]?Set\s|^Let\s|^(Public|Private)\sDeclare\s(Function|Sub)" ) ;
17
- private static readonly Regex ProcedureEndRegex = new Regex ( @"^End\s(Sub|Function|Property)" ) ;
18
- private static readonly Regex TypeEnumStartRegex = new Regex ( @"^(Public\s|Private\s)?(Enum\s|Type\s)" ) ;
19
- private static readonly Regex TypeEnumEndRegex = new Regex ( @"^End\s(Enum|Type)" ) ;
20
- private static readonly Regex InProcedureInRegex = new Regex ( @"^(Else)?If\s.*\sThen$|^Else$|^Case\s|^With|^For\s|^Do$|^Do\s|^While$|^While\s|^Select Case" ) ;
21
- private static readonly Regex InProcedureOutRegex = new Regex ( @"^Else(If)?|^Case\s|^End With|^Next\s|^Next$|^Loop$|^Loop\s|^Wend$|^End If$|^End Select" ) ;
22
- private static readonly Regex DeclarationRegex = new Regex ( @"^(Dim|Const|Static|Public|Private)\s(.*(\sAs\s)?|_)" ) ;
23
- private static readonly Regex PrecompilerInRegex = new Regex ( @"^#(Else)?If\s.+Then$|^#Else$" ) ;
24
- private static readonly Regex PrecompilerOutRegex = new Regex ( @"^#ElseIf\s.+Then|^#Else$|#End\sIf$" ) ;
25
- private static readonly Regex SingleLineElseIfRegex = new Regex ( @"^ElseIf\s.*\sThen\s.*" ) ;
13
+ private static readonly Regex LineNumberRegex = new Regex ( @"^(?<number>(-?\d+)|(&H[0-9A-F]{1,8}))(?<separator>:)?\s+(?<code>.*)" , RegexOptions . ExplicitCapture | RegexOptions . IgnoreCase ) ;
14
+ private static readonly Regex EndOfLineCommentRegex = new Regex ( @"^(?!(Rem\s)|('))(?<code>[^']*)(\s(?<comment>'.*))$" , RegexOptions . ExplicitCapture | RegexOptions . IgnoreCase ) ;
15
+ private static readonly Regex ProcedureStartRegex = new Regex ( @"^(Public\s|Private\s|Friend\s)?(Static\s)?(Sub|Function|Property\s(Let|Get|Set))\s" , RegexOptions . IgnoreCase ) ;
16
+ private static readonly Regex ProcedureStartIgnoreRegex = new Regex ( @"^[LR]?Set\s|^Let\s|^(Public|Private)\sDeclare\s(Function|Sub)" , RegexOptions . IgnoreCase ) ;
17
+ private static readonly Regex ProcedureEndRegex = new Regex ( @"^End\s(Sub|Function|Property)" , RegexOptions . IgnoreCase ) ;
18
+ private static readonly Regex TypeEnumStartRegex = new Regex ( @"^(Public\s|Private\s)?(Enum\s|Type\s)" , RegexOptions . IgnoreCase ) ;
19
+ private static readonly Regex TypeEnumEndRegex = new Regex ( @"^End\s(Enum|Type)" , RegexOptions . IgnoreCase ) ;
20
+ private static readonly Regex InProcedureInRegex = new Regex ( @"^(Else)?If\s.*\sThen$|^Else$|^Case\s|^With|^For\s|^Do$|^Do\s|^While$|^While\s|^Select Case" , RegexOptions . IgnoreCase ) ;
21
+ private static readonly Regex InProcedureOutRegex = new Regex ( @"^Else(If)?|^Case\s|^End With|^Next\s|^Next$|^Loop$|^Loop\s|^Wend$|^End If$|^End Select" , RegexOptions . IgnoreCase ) ;
22
+ private static readonly Regex DeclarationRegex = new Regex ( @"^(Dim|Const|Static|Public|Private)\s(.*(\sAs\s)?|_)" , RegexOptions . IgnoreCase ) ;
23
+ private static readonly Regex PrecompilerInRegex = new Regex ( @"^#(Else)?If\s.+Then$|^#Else$" , RegexOptions . IgnoreCase ) ;
24
+ private static readonly Regex PrecompilerOutRegex = new Regex ( @"^#ElseIf\s.+Then|^#Else$|#End\sIf$" , RegexOptions . IgnoreCase ) ;
25
+ private static readonly Regex SingleLineElseIfRegex = new Regex ( @"^ElseIf\s.*\sThen\s.*" , RegexOptions . IgnoreCase ) ;
26
26
27
27
private readonly IIndenterSettings _settings ;
28
28
private int _lineNumber ;
0 commit comments