1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

📝 AssignmentState itself.

This commit is contained in:
Rob Rix 2017-04-24 13:55:12 -04:00
parent 8caea50b14
commit a7b47952eb

View File

@ -147,6 +147,7 @@ advanceState state@AssignmentState{..}
| Rose (_ :. range :. span :. _) _ : rest <- stateNodes = AssignmentState (Info.end range) (Info.spanEnd span) (Source.drop (Info.end range - stateOffset) stateSource) rest | Rose (_ :. range :. span :. _) _ : rest <- stateNodes = AssignmentState (Info.end range) (Info.spanEnd span) (Source.drop (Info.end range - stateOffset) stateSource) rest
| otherwise = state | otherwise = state
-- | State kept while running 'Assignment's.
data AssignmentState grammar = AssignmentState data AssignmentState grammar = AssignmentState
{ stateOffset :: Int -- ^ The offset into the Source thus far reached, measured in bytes. { stateOffset :: Int -- ^ The offset into the Source thus far reached, measured in bytes.
, statePos :: Info.SourcePos -- ^ The (1-indexed) line/column position in the Source thus far reached. , statePos :: Info.SourcePos -- ^ The (1-indexed) line/column position in the Source thus far reached.