read assignments no longer marked
This commit is contained in:
parent
57f262554b
commit
1585965801
1 changed files with 4 additions and 4 deletions
|
@ -202,11 +202,11 @@ invAcc a i s@(c:t) = let writeAcc = getWrite i s
|
|||
in if isNothing writeAcc
|
||||
then if isNothing readAcc
|
||||
then invAcc a (i+1) t
|
||||
else if isUnassigned (fromJust readAcc) a
|
||||
else if isUnassigned (fromJust readAcc) a -- no assignment in rest str
|
||||
then (snd (fromJust readAcc)) : (invAcc a (i+1+readLen) (drop readLen t))
|
||||
else invAcc (markRead (fromJust readAcc) a) (i+1+readLen) (drop readLen t) -- no assignment in rest str TODO check for reads here
|
||||
else invAcc (markRead (fromJust readAcc) a) (i+1+readLen) (drop readLen t)
|
||||
else invAcc (a ++ [fromJust writeAcc]) (i+1+matchLen) (drop matchLen t) -- assignment in accumStr, advance offset to end
|
||||
invAcc a _ _ = map (\(_,s,_) -> s) a
|
||||
invAcc a _ _ = []
|
||||
|
||||
getWrite :: Int -> String -> Maybe (String, Slice, Bool)
|
||||
getWrite offset s = ((Tdfa.matchOnceText §~ "^(\\**[[:word:]]+)[[:blank:]]*=") s) >>= matchToA
|
||||
|
@ -238,7 +238,7 @@ leaveBlock = map (\(v,s,b) -> (tail v,s,b)) . filter (\(v,_,_) -> head v == '*')
|
|||
getUnread :: [(String,Slice,Bool)] -> Slices
|
||||
getUnread [] = []
|
||||
getUnread ((v,s,b):ss)
|
||||
| b = getUnread ss
|
||||
| b || head v == '*' = getUnread ss
|
||||
| otherwise = s:getUnread ss
|
||||
|
||||
{- General Fontification Utilities -}
|
||||
|
|
Loading…
Reference in a new issue