Skip to content

Commit b86cf4b

Browse files
authored
Merge pull request #8 from hrschupp/issue1
new feature: add line labels to dictionary
2 parents 1b2f48a + 59350d3 commit b86cf4b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/modules/DeclarationDict.cls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ Private Function PrepareCode(ByVal Code As String, ByVal RegEx As RegExp) As Str
224224
DebugPrint Code, True, "PrepareCode- after remove comments"
225225
#End If
226226

227+
' treat line labels as dim (but not line numbers)
228+
.Pattern = "([\r\n]|^)([^0-9\r\n]\S*):([\r\n]|$)"
229+
Code = .Replace(Code, "$1Dim $2$3")
230+
227231
' dim a as String: a = 5 => insert line break
228232
.Pattern = "(\:\s)"
229233
Code = .Replace(Code, vbNewLine)

0 commit comments

Comments
 (0)