mirror of
https://github.com/github/semantic.git
synced 2025-01-04 13:34:31 +03:00
Move reference into case maybeConstructor
This commit is contained in:
parent
d830cd1f2a
commit
64d847833c
@ -660,11 +660,11 @@ instance Evaluatable New where
|
|||||||
|
|
||||||
-- TODO: This is a typescript specific name and we should allow languages to customize it.
|
-- TODO: This is a typescript specific name and we should allow languages to customize it.
|
||||||
let constructorName = Name.name "constructor"
|
let constructorName = Name.name "constructor"
|
||||||
span <- ask @Span
|
|
||||||
reference (Reference constructorName) span ScopeGraph.New (Declaration constructorName)
|
|
||||||
maybeConstructor <- maybeLookupDeclaration (Declaration constructorName)
|
maybeConstructor <- maybeLookupDeclaration (Declaration constructorName)
|
||||||
case maybeConstructor of
|
case maybeConstructor of
|
||||||
Just slot -> do
|
Just slot -> do
|
||||||
|
span <- ask @Span
|
||||||
|
reference (Reference constructorName) span ScopeGraph.New (Declaration constructorName)
|
||||||
constructor <- deref slot
|
constructor <- deref slot
|
||||||
args <- traverse eval arguments
|
args <- traverse eval arguments
|
||||||
boundConstructor <- bindThis objectVal constructor
|
boundConstructor <- bindThis objectVal constructor
|
||||||
|
Loading…
Reference in New Issue
Block a user