mirror of
https://github.com/github/semantic.git
synced 2024-11-24 17:04:47 +03:00
Rename getSize to size.
This commit is contained in:
parent
71e8454fb4
commit
c8c195daf8
@ -6,7 +6,7 @@ import Range
|
||||
|
||||
-- | An annotation for a source file, including the source range and semantic
|
||||
-- | categories.
|
||||
data Info = Info { characterRange :: !Range, categories :: !(Set Category), getSize :: !Integer }
|
||||
data Info = Info { characterRange :: !Range, categories :: !(Set Category), size :: !Integer }
|
||||
deriving (Eq, Show)
|
||||
|
||||
instance Categorizable Info where
|
||||
|
@ -40,7 +40,7 @@ isFixed = not . Set.null . Set.intersection fixedCategories
|
||||
-- | Given a function that maps production names to sets of categories, produce
|
||||
-- | a Constructor.
|
||||
termConstructor :: (String -> Set.Set Category) -> Constructor
|
||||
termConstructor mapping source range name children = Info range categories (sum (getSize . copoint <$> children)) :< construct children
|
||||
termConstructor mapping source range name children = Info range categories (sum (size . copoint <$> children)) :< construct children
|
||||
where
|
||||
categories = mapping name
|
||||
construct [] = Leaf . pack . toString $ slice range source
|
||||
|
Loading…
Reference in New Issue
Block a user