mirror of
https://github.com/github/semantic.git
synced 2025-01-04 21:47:07 +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 Analysis.HasTextElement
|
||||||
import Data.Abstract.Declarations
|
import Data.Abstract.Declarations
|
||||||
import Data.Abstract.Name
|
import Data.Abstract.Name
|
||||||
import Data.Blob
|
|
||||||
import Data.Language
|
import Data.Language
|
||||||
import Data.Term
|
import Data.Term
|
||||||
import Data.Text hiding (empty)
|
import Data.Text hiding (empty)
|
||||||
@ -99,10 +98,10 @@ type IsTaggable syntax =
|
|||||||
)
|
)
|
||||||
|
|
||||||
tagging :: (Monad m, IsTaggable syntax)
|
tagging :: (Monad m, IsTaggable syntax)
|
||||||
=> Blob
|
=> Language
|
||||||
-> Term syntax Loc
|
-> Term syntax Loc
|
||||||
-> Stream (Of Token) m ()
|
-> Stream (Of Token) m ()
|
||||||
tagging b = foldSubterms (descend (blobLanguage b))
|
tagging = foldSubterms . descend
|
||||||
|
|
||||||
descend ::
|
descend ::
|
||||||
( ConstructorName (TermF syntax Loc)
|
( ConstructorName (TermF syntax Loc)
|
||||||
|
@ -31,7 +31,7 @@ runTagging blob symbolsToSummarize
|
|||||||
. evalState @[ContextToken] []
|
. evalState @[ContextToken] []
|
||||||
. Streaming.toList_
|
. Streaming.toList_
|
||||||
. contextualizing blob toKind
|
. contextualizing blob toKind
|
||||||
. tagging blob
|
. tagging (blobLanguage blob)
|
||||||
where
|
where
|
||||||
toKind x = do
|
toKind x = do
|
||||||
guard (x `elem` symbolsToSummarize)
|
guard (x `elem` symbolsToSummarize)
|
||||||
|
Loading…
Reference in New Issue
Block a user