summaryrefslogtreecommitdiff
path: root/GrepNested.hs
diff options
context:
space:
mode:
Diffstat (limited to 'GrepNested.hs')
-rw-r--r--GrepNested.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/GrepNested.hs b/GrepNested.hs
index c62262f..df52581 100644
--- a/GrepNested.hs
+++ b/GrepNested.hs
@@ -65,10 +65,12 @@ grepNested p !lin !col s = case cmtToken p s of
65 in mkComment lin col xs : grepNested p (lin + lcnt) col' cs' 65 in mkComment lin col xs : grepNested p (lin + lcnt) col' cs'
66 (StartLine,tlen,cs) 66 (StartLine,tlen,cs)
67 -> let findEOL !tot xs = case cmtToken p xs of 67 -> let findEOL !tot xs = case cmtToken p xs of
68 (EOL,tlen,_) -> tot 68 (EOL,tlen,_) -> (tot , tlen )
69 (tok,tlen,ys) -> findEOL (tot + tlen) ys 69 (tok,tlen,ys) -> findEOL (tot + tlen) ys
70 (comment,_) = cmtSplitAt p (findEOL 0 cs) cs 70 (clen,dlen) = findEOL 0 cs
71 in mkComment lin col comment : grepNested p (lin + 1) 1 cs 71 (comment,ds) = cmtSplitAt p clen cs
72 (_,es) = cmtSplitAt p dlen ds
73 in mkComment lin col comment : grepNested p (lin + 1) 1 es
72 (EOL,tlen,cs) -> grepNested p (lin+1) 1 cs 74 (EOL,tlen,cs) -> grepNested p (lin+1) 1 cs
73 (NullInput,tlen,_) -> [] 75 (NullInput,tlen,_) -> []
74 (IgnoredChar clen,_,cs) -> grepNested p lin (col+clen) cs 76 (IgnoredChar clen,_,cs) -> grepNested p lin (col+clen) cs