Skip to content

Commit

Permalink
yet more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed May 11, 2024
1 parent eb93b31 commit 0efcc41
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/swarm-lang/Swarm/Language/Syntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,9 +1156,10 @@ data CommentType = LineComment | BlockComment
data CommentSituation = StandaloneComment | SuffixComment
deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Data, ToJSON, FromJSON)

-- | A comment is retained as some text + its original 'SrcLoc'.
-- While parsing we record all comments out-of-band, for later
-- re-insertion when formatting code.
-- | A comment is retained as some text plus metadata (source
-- location, comment type, + comment situation). While parsing we
-- record all comments out-of-band, for later re-insertion into the
-- AST.
data Comment = Comment
{ commentSrcLoc :: SrcLoc
, commentType :: CommentType
Expand Down Expand Up @@ -1191,7 +1192,7 @@ makeLenses ''Syntax'
noLoc :: Term -> Syntax
noLoc = Syntax mempty

-- | Match an untyped term without its 'SrcLoc'.
-- | Match an untyped term without annotations.
pattern STerm :: Term -> Syntax
pattern STerm t <-
Syntax _ t
Expand Down

0 comments on commit 0efcc41

Please sign in to comment.