mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Extract a skipAndContinue function.
This commit is contained in:
parent
c1c50915d3
commit
025565ac68
@ -26,6 +26,7 @@ rangesAndWordsFrom startIndex string =
|
||||
Nothing -> []
|
||||
where
|
||||
takeAndContinue (parsed, rest) = (Range startIndex $ startIndex + length parsed, parsed) : rangesAndWordsFrom (startIndex + length parsed) rest
|
||||
skipAndContinue (parsed, rest) = rangesAndWordsFrom (startIndex + length parsed) rest
|
||||
parse predicate string = case span predicate string of
|
||||
([], _) -> Nothing
|
||||
(parsed, rest) -> Just (parsed, rest)
|
||||
|
Loading…
Reference in New Issue
Block a user