Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clm
Commits
2f492532
Commit
2f492532
authored
Apr 29, 2003
by
Diederik van Arkel
Browse files
Fix bug with start/end detection of colour changes at beginning of document;
parent
6a8d7998
Changes
1
Hide whitespace changes
Inline
Side-by-side
CleanIDE/Ed/syncol.icl
View file @
2f492532
...
...
@@ -248,9 +248,9 @@ where
quickParse
::
!
Int
!
Int
!(
StrictList
(!
Info
,!
String
))
->
(
Int
,
Int
,
StrictList
(!
Info
,!
String
))
quickParse
fln
lln
text
#
(
beg
,
end
,
res
)
=
parseBefore
0
(
-1
,
0
,
False
,
False
,
0
)
id
[]
text
#
(
beg
,
end
,
res
)
=
parseBefore
0
(
0
,
0
,
False
,
False
,
0
)
id
[]
text
#
res
=
trace_n`
(
"quickParse"
,
beg
,
end
,
fln
,
lln
)
res
#
beg
=
if
(
beg
<
0
)
(
trace_n`
"FIX BEGIN"
0
)
beg
//
# beg = if (beg < 0) (trace_n` "FIX BEGIN" 0)
(
beg
+ 1)
#
end
=
if
(
end
>=
slLength
res
)
(
trace_n`
"FIX END"
slLength
res
-
1
)
end
=
(
beg
,
end
,
res
)
where
...
...
@@ -278,7 +278,7 @@ where
parseDuring
cln
begin
(
lev
,
def
,
tdec
,
off
)
res
acc
SNil
=
(
begin
,
dec
cln
,
res
(
slFromList
acc
))
parseDuring
cln
begin
i
=:(
lev
,
def
,
dec
,
off
)
res
acc
rest
=:(
SCons
h
=:(_,
l
)
t
)
|
cln
>
lln
|
cln
>
=
lln
=
parseAfter
cln
begin
i
res
acc
rest
|
trace_n`
(
"parseDuring"
,
cln
,
i
,
h
)
False
=
undef
#!
(
has_contents
,
j
=:(
level`
,
def`
,
dec`
,
off`
))
=
parseLine
i
l
...
...
@@ -313,16 +313,16 @@ where
|
equal_state
new
old
#!
res
=
res
(
slFromList`
[(
new
,
l
)]
SNil
)
=
(
begin
,
cln
,
slAppend
res
t
)
=
parse
During
(
inc
cln
)
begin
state`
res
[(
new
,
l
)]
t
=
parse
After
(
inc
cln
)
begin
state`
res
[(
new
,
l
)]
t
#
j`
=
(
lev
,
def
,
dec`
,
off
)
=
parse
During
cln
begin
j`
(\
r
->
res
(
slFromList`
[
fix
s
\\
s
<-
acc
]
r
))
[]
rest
=
parse
After
cln
begin
j`
(\
r
->
res
(
slFromList`
[
fix
s
\\
s
<-
acc
]
r
))
[]
rest
|
has_contents
#!
res
=
(\
r
->
res
(
slFromList`
acc
r
))
|
equal_state
new
old
#!
res
=
res
(
slFromList`
[(
new
,
l
)]
SNil
)
=
(
begin
,
cln
,
slAppend
res
t
)
=
parse
During
(
inc
cln
)
begin
state`
res
[(
new
,
l
)]
t
=
parse
During
(
inc
cln
)
begin
state`
res
(
acc
++[(
new
,
l
)])
t
=
parse
After
(
inc
cln
)
begin
state`
res
[(
new
,
l
)]
t
=
parse
After
(
inc
cln
)
begin
state`
res
(
acc
++[(
new
,
l
)])
t
where
fix
::
(!
Info
,!
String
)
->
(!
Info
,!
String
)
fix
((
c
,
t
,
d
,
o
),
l
)
=
((
c
,
False
,
True
,
o
),
l
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment