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

Merge pull request #456 from github/descend-into-the-depths-of-assignment

Enter assignment RHS values during Python scope graphing.
This commit is contained in:
Patrick Thomson 2020-01-31 12:59:12 -05:00 committed by GitHub
commit 70252f613c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,8 +87,10 @@ scopeGraphModule = getAp . scopeGraph
instance ToScopeGraph Py.AssertStatement where scopeGraph = onChildren
instance ToScopeGraph Py.Assignment where
scopeGraph (Py.Assignment _ (SingleIdentifier t) _val _typ) = complete <* declare @Name (formatName t) DeclProperties
scopeGraph x = todo x
scopeGraph (Py.Assignment _ (SingleIdentifier t) val _typ) = do
declare @Name (formatName t) DeclProperties
maybe complete scopeGraph val
scopeGraph x = todo x
instance ToScopeGraph Py.Await where
scopeGraph (Py.Await _ a) = scopeGraph a