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:
parent
c0ecbb12b6
commit
e9fc6122c4
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user