1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +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 Show1 Subscript where liftShowsPrec = genericLiftShowsPrec
-- | Dotted Name (e.g. a.b in Python)
data DottedName a
= DottedName ![a]
-- | ScopeResolution (e.g. import a.b in Python or a::b in C++)
data ScopeResolution a
= ScopeResolution ![a]
deriving (Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)
instance Eq1 DottedName where liftEq = genericLiftEq
instance Show1 DottedName where liftShowsPrec = genericLiftShowsPrec
instance Eq1 ScopeResolution where liftEq = genericLiftEq
instance Show1 ScopeResolution where liftShowsPrec = genericLiftShowsPrec

View File

@ -33,7 +33,7 @@ type Syntax' =
, Expression.Bitwise
, Expression.Call
, Expression.Comparison
, Expression.DottedName
, Expression.ScopeResolution
, Expression.MemberAccess
, Expression.Subscript
, Literal.Array
@ -103,7 +103,7 @@ expression = statement
<|> await
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 = makeTerm <$> symbol Ellipsis <*> (Syntax.Ellipsis <$> source)