mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Move assignmentCallSite up.
This commit is contained in:
parent
6b7114ebc8
commit
5f19a7415b
@ -143,15 +143,15 @@ data AssignmentF ast grammar a where
|
||||
data Tracing f a where
|
||||
Tracing :: { tracingCallSite :: Maybe (String, SrcLoc), runTracing :: f a } -> Tracing f a
|
||||
|
||||
assignmentCallSite :: Assignment ast grammar a -> Maybe (String, SrcLoc)
|
||||
assignmentCallSite (Tracing site _ `Then` _) = site
|
||||
assignmentCallSite _ = Nothing
|
||||
|
||||
tracing :: HasCallStack => f a -> Tracing f a
|
||||
tracing f = case getCallStack callStack of
|
||||
(_ : site : _) -> Tracing (Just site) f
|
||||
_ -> Tracing Nothing f
|
||||
|
||||
assignmentCallSite :: Assignment ast grammar a -> Maybe (String, SrcLoc)
|
||||
assignmentCallSite (Tracing site _ `Then` _) = site
|
||||
assignmentCallSite _ = Nothing
|
||||
|
||||
-- | Zero-width production of the current location.
|
||||
--
|
||||
-- If assigning at the end of input or at the end of a list of children, the loccation will be returned as an empty Range and Span at the current offset. Otherwise, it will be the Range and Span of the current node.
|
||||
|
Loading…
Reference in New Issue
Block a user