mirror of
https://github.com/github/semantic.git
synced 2025-01-05 05:58:34 +03:00
Remove otiose changes in Taggable.
This commit is contained in:
parent
9d884e4af3
commit
47a7d945bc
@ -43,7 +43,6 @@ import qualified Data.Syntax.Expression as Expression
|
||||
import qualified Data.Syntax.Literal as Literal
|
||||
import qualified Data.Syntax.Statement as Statement
|
||||
import qualified Data.Syntax.Type as Type
|
||||
|
||||
import qualified Language.Go.Syntax as Go
|
||||
import qualified Language.Go.Type as Go
|
||||
import qualified Language.Haskell.Syntax as Haskell
|
||||
@ -54,10 +53,9 @@ import qualified Language.Python.Syntax as Python
|
||||
import qualified Language.Ruby.Syntax as Ruby
|
||||
import qualified Language.TypeScript.Syntax as TypeScript
|
||||
|
||||
subtractLocation :: Location -> Location -> Range
|
||||
subtractLocation a b = subtractRange (locationByteRange a) (locationByteRange b)
|
||||
|
||||
-- TODO: Move to src/Data
|
||||
|
||||
-- TODO: Move to src/Data
|
||||
data Token
|
||||
= Enter { tokenName :: Text, tokenSnippetRange :: Maybe Range }
|
||||
| Exit { tokenName :: Text, tokenSnippetRange :: Maybe Range}
|
||||
@ -143,6 +141,9 @@ descend lang t@(In loc _) = do
|
||||
traverse_ subtermRef t
|
||||
exit (constructorName term) snippetRange
|
||||
|
||||
subtractLocation :: Location -> Location -> Range
|
||||
subtractLocation a b = subtractRange (locationByteRange a) (locationByteRange b)
|
||||
|
||||
-- Instances
|
||||
|
||||
instance ( Apply Show1 fs, Apply Functor fs, Apply Foldable fs, Apply Traversable fs, Apply Taggable fs) => Taggable (Sum fs) where
|
||||
|
Loading…
Reference in New Issue
Block a user