mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Simplify how we compute combineIntoLeaves.
This commit is contained in:
parent
7048a61660
commit
df2b684229
@ -112,7 +112,7 @@ spec = parallel $ do
|
||||
|
||||
getTotalRange (Source vector) = Range 0 $ length vector
|
||||
|
||||
combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Both (Info (Range start $ start + 1) mempty, Info (Range start $ start + 1) mempty)) (Leaf [ char ]) ], start + 1)
|
||||
combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Info <$> (pure (Range start $ start + 1)) <*> mempty) (Leaf [ char ]) ], start + 1)
|
||||
|
||||
leafWithRangesInSources sources ranges = Free $ Annotated (Info <$> ranges <*> pure mempty) (Leaf $ toList (runLeft sources) ++ toList (runRight sources))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user