Public Sub ContinueParsing (CodeView As BBCodeView, Code As String, fromLine As Int, UpdateEveryLineCount As Int) As ResumableSub
Dim runs As List
runs.Initialize
#if B4J
Dim fx As JFX
Dim monospace As Font = fx.CreateFont("Consolas", FontSize, False, False)
Dim MonospaceBold As Font = fx.CreateFont("Consolas", FontSize, True, False)
#Else If B4A
Dim monospace As Typeface = Typeface.CreateNew(Typeface.MONOSPACE, Typeface.STYLE_NORMAL)
Dim MonospaceBold As Typeface = Typeface.CreateNew(Typeface.MONOSPACE, Typeface.STYLE_BOLD)
#Else If B4i
Dim monospace As Font = Font.CreateNew2("DevanagariSangamMN", FontSize)
Dim MonospaceBold As Font = Font.CreateNew2("DevanagariSangamMN-Bold", FontSize)
#End If
DefaultFont = xui.CreateFont(monospace, FontSize)
DefaultBoldFont = xui.CreateFont(MonospaceBold, FontSize)
Dim LineNumber As Int = fromLine + 1
Dim NewlyParsed As Int = 0
For Each Line As String In Regex.Split("\r?\n", Code)
LineNumber = LineNumber + 1
runs.Add(CreateLineNumber(LineNumber))
runs.AddAll(ParseLine(Line))
CreateRun(CRLF, TOKEN_DEFAULT, runs)
NewlyParsed = NewlyParsed + 1
If NewlyParsed = UpdateEveryLineCount Then
CodeView.ExternalRuns.AddAll(runs)
'CodeView.Redraw
Log("New parsed lines")
Sleep(50)
Dim runs As List
runs.Initialize
NewlyParsed = 0
End If
Next
CodeView.ExternalRuns.AddAll(runs)
CodeView.ParseAndDraw
Sleep(50)
Return runs
End Sub