1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 10:27:45 +03:00

Don’t pass the blob into tagging.

This commit is contained in:
Rob Rix 2019-10-01 11:50:30 -04:00
parent c0ecbb12b6
commit e9fc6122c4
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 3 additions and 4 deletions

View File

@ -29,7 +29,6 @@ import Analysis.ConstructorName
import Analysis.HasTextElement
import Data.Abstract.Declarations
import Data.Abstract.Name
import Data.Blob
import Data.Language
import Data.Term
import Data.Text hiding (empty)
@ -99,10 +98,10 @@ type IsTaggable syntax =
)
tagging :: (Monad m, IsTaggable syntax)
=> Blob
=> Language
-> Term syntax Loc
-> Stream (Of Token) m ()
tagging b = foldSubterms (descend (blobLanguage b))
tagging = foldSubterms . descend
descend ::
( ConstructorName (TermF syntax Loc)

View File

@ -31,7 +31,7 @@ runTagging blob symbolsToSummarize
. evalState @[ContextToken] []
. Streaming.toList_
. contextualizing blob toKind
. tagging blob
. tagging (blobLanguage blob)
where
toKind x = do
guard (x `elem` symbolsToSummarize)