getWrites
This commit is contained in:
parent
9dbe6c7a79
commit
8db24a3336
1 changed files with 7 additions and 0 deletions
|
@ -212,6 +212,13 @@ getWrite offset accumStr = ((Tdfa.matchOnceText §~ "(\\**[[:word:]]+)[[:blank:]
|
|||
let m = match ! 1 -- extract the match group (0 = the whole match)
|
||||
in Just (fst m, (offset+(fst (snd m)), offset+(fst (snd m))+(snd (snd m))), False)
|
||||
|
||||
getWrites :: CheckString -> [(String, Slice, Bool)]
|
||||
getWrites s = matchToAs $ (Tdfa.matchAllText §~ "(\\**[[:word:]]+)[[:blank:]]*=") s
|
||||
where matchToAs (match: mts) =
|
||||
let m = match ! 1 -- extract the match group (0 = the whole match)
|
||||
in (fst m, (fst (snd m), (fst (snd m))+(snd (snd m))), False): matchToAs mts
|
||||
matchToAs _ = []
|
||||
|
||||
enterBlock :: [(String,Slice,Bool)] -> [(String,Slice,Bool)]
|
||||
enterBlock = map (\(v,s,b) -> ('*':v,s,b))
|
||||
|
||||
|
|
Loading…
Reference in a new issue