1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Add Listable instances for QualifiedName and Import

This commit is contained in:
joshvera 2018-07-23 13:59:56 -04:00
parent 8296372c71
commit dbcf2638b0

View File

@ -53,6 +53,7 @@ import qualified Data.Syntax.Directive as Directive
import qualified Data.Syntax.Statement as Statement
import qualified Data.Syntax.Expression as Expression
import qualified Language.Ruby.Syntax as Ruby.Syntax
import qualified Language.Python.Syntax as Python.Syntax
import qualified Data.Abstract.Name as Name
import Data.Term
import Data.Text as T (Text, pack)
@ -478,6 +479,15 @@ instance Listable1 Ruby.Syntax.Require where
instance Listable1 Ruby.Syntax.Send where
liftTiers tiers = liftCons4 (liftTiers tiers) (liftTiers tiers) (liftTiers tiers) (liftTiers tiers) Ruby.Syntax.Send
instance Listable Python.Syntax.QualifiedName where
tiers = liftCons1 tiers1 Python.Syntax.QualifiedName \/ liftCons2 tiers tiers1 Python.Syntax.RelativeQualifiedName
instance Listable1 Python.Syntax.Import where
liftTiers tiers = cons2 Python.Syntax.Import
instance Listable Python.Syntax.Alias where
tiers = cons2 Python.Syntax.Alias
type ListableSyntax = Sum
'[ Comment.Comment