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:
parent
b0263ffc71
commit
5792d92b8a
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user