1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 02:58:36 +03:00

Rename getSize to size.

This commit is contained in:
Rob Rix 2016-04-11 15:04:44 -04:00
parent 71e8454fb4
commit c8c195daf8
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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