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