mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Stub in splitting.
This commit is contained in:
parent
9f41d5072e
commit
080fda5bdf
23
app/Split.hs
23
app/Split.hs
@ -1,7 +1,26 @@
|
||||
module Split (split) where
|
||||
module Split where
|
||||
|
||||
import Diff
|
||||
import Patch
|
||||
import Syntax
|
||||
import Term
|
||||
import Unified
|
||||
import qualified Data.Set as Set
|
||||
import Rainbow
|
||||
|
||||
data Node = Node String (Set.Set Category)
|
||||
|
||||
split :: Diff a Info -> String -> String -> IO ByteString
|
||||
split diff a b = return mempty
|
||||
split _ _ _ = return mempty
|
||||
|
||||
splitDiff :: Diff a Info -> String -> String -> [(String, String)]
|
||||
splitDiff _ _ _ = []
|
||||
|
||||
splitPatch :: Patch (Term a Info) -> String -> String -> [(String, String)]
|
||||
splitPatch _ _ _ = []
|
||||
|
||||
splitTerm :: String -> Term a Info -> [Term a Node]
|
||||
splitTerm source term = splitUp $ fmap toNode term where
|
||||
toNode (Info range categories) = Node (substring range source) categories
|
||||
splitUp :: Term a Node -> [Term a Node]
|
||||
splitUp term = [term]
|
||||
|
Loading…
Reference in New Issue
Block a user