From 8caea50b14dbc99510b58bb1ce004223e3fad3f4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 24 Apr 2017 13:54:33 -0400 Subject: [PATCH] =?UTF-8?q?:memo:=20AssignmentState=E2=80=99s=20fields.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Data/Syntax/Assignment.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index da1a2d9d9..b957cd3d1 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -148,10 +148,10 @@ advanceState state@AssignmentState{..} | otherwise = state data AssignmentState grammar = AssignmentState - { stateOffset :: Int - , statePos :: Info.SourcePos - , stateSource :: Source.Source - , stateNodes :: [AST grammar] + { 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. + , stateSource :: Source.Source -- ^ The remaining Source. Equal to dropping 'stateOffset' bytes off the original input Source. + , stateNodes :: [AST grammar] -- ^ The remaining nodes to assign. Note that 'children' rules recur into subterms, and thus this does not necessarily reflect all of the terms remaining to be assigned in the overall algorithm, only those “in scope.” } deriving (Eq, Show)