Commit c11f21b1 authored by Diederik van Arkel's avatar Diederik van Arkel

Fix off by one error in reparsing; Should remove most syntax colouring bugs during typing;

parent 1952b70c
......@@ -68,10 +68,6 @@ where
*/
quickParse :: !Int !Int !(StrictList (!Info,!String)) -> (Int,Int,StrictList (!Info,!String))
quickParse fln lln text
// revert to firstParse until quickParse is debugged
= (0,slLength text - 1,firstParse (slMap snd text))
/*
quickParse beg end lines
# (s,f,l) = before 0 slFromList iniState [] lines
// # l` = firstParse (slMap snd text)
......@@ -89,7 +85,7 @@ where
during beg idx state res acc SNil
= (beg,dec idx,res acc)
during beg idx state res acc old=:(SCons (_,line) lines)
| idx >= end
| idx > end
= after beg idx state res acc old
# state` = parseLine state line
# flush = state`.has_content || (not (state.typedecl) && state`.typedecl)
......@@ -113,7 +109,7 @@ where
| not (state.typedecl) && state`.typedecl
= after beg idx {state & typedecl=True} (patch res acc) [] old
= after beg (inc idx) state` res (acc++[(info`,line)]) lines
*/
copy res acc rest
= res (acc ++ rest)
patch res acc rest
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment