mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
Add a function to replace the character range on an Info.
This commit is contained in:
parent
cd2e07bcf3
commit
8cae8fe049
@ -18,6 +18,9 @@ data Annotated a annotation f = Annotated { annotation :: !annotation, syntax ::
|
||||
data Info = Info { characterRange :: !Range, categories :: !(Set Category) }
|
||||
deriving (Eq, Show)
|
||||
|
||||
setCharacterRange :: Info -> Range -> Info
|
||||
setCharacterRange info range = Info range (Diff.categories info)
|
||||
|
||||
instance Categorizable Info where
|
||||
categories = Diff.categories
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user