1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Rename DottedName -> ScopeResolution

This commit is contained in:
Rick Winfrey 2017-06-01 11:38:42 -07:00
parent b0263ffc71
commit 5792d92b8a
2 changed files with 7 additions and 7 deletions

View File

@ -85,10 +85,10 @@ data Subscript a
instance Eq1 Subscript where liftEq = genericLiftEq instance Eq1 Subscript where liftEq = genericLiftEq
instance Show1 Subscript where liftShowsPrec = genericLiftShowsPrec instance Show1 Subscript where liftShowsPrec = genericLiftShowsPrec
-- | Dotted Name (e.g. a.b in Python) -- | ScopeResolution (e.g. import a.b in Python or a::b in C++)
data DottedName a data ScopeResolution a
= DottedName ![a] = ScopeResolution ![a]
deriving (Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable) deriving (Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)
instance Eq1 DottedName where liftEq = genericLiftEq instance Eq1 ScopeResolution where liftEq = genericLiftEq
instance Show1 DottedName where liftShowsPrec = genericLiftShowsPrec instance Show1 ScopeResolution where liftShowsPrec = genericLiftShowsPrec

View File

@ -33,7 +33,7 @@ type Syntax' =
, Expression.Bitwise , Expression.Bitwise
, Expression.Call , Expression.Call
, Expression.Comparison , Expression.Comparison
, Expression.DottedName , Expression.ScopeResolution
, Expression.MemberAccess , Expression.MemberAccess
, Expression.Subscript , Expression.Subscript
, Literal.Array , Literal.Array
@ -103,7 +103,7 @@ expression = statement
<|> await <|> await
dottedName :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location) dottedName :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location)
dottedName = makeTerm <$> symbol DottedName <*> children (Expression.DottedName <$> many expression) dottedName = makeTerm <$> symbol DottedName <*> children (Expression.ScopeResolution <$> many expression)
ellipsis :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location) ellipsis :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location)
ellipsis = makeTerm <$> symbol Ellipsis <*> (Syntax.Ellipsis <$> source) ellipsis = makeTerm <$> symbol Ellipsis <*> (Syntax.Ellipsis <$> source)