on master help sign in
Get rid of UnexpectedDocComment error in whitespace
ce0cbd4Evan Czaplicki
compiler/src/Parse/Space.hs+1−4
@@ -52,7 +52,6 @@ chomp toError =
52
52
53 HasTab -> cerr newRow newCol (toError E.HasTab)
53 HasTab -> cerr newRow newCol (toError E.HasTab)
54 EndlessMultiComment -> cerr newRow newCol (toError E.EndlessMultiComment)
54 EndlessMultiComment -> cerr newRow newCol (toError E.EndlessMultiComment)
55− UnexpectedDocComment -> cerr newRow newCol (toError E.UnexpectedDocComment)
56
55
57
56
58
57
@@ -108,7 +107,6 @@ chompAndCheckIndent toSpaceError toIndentError =
108
107
109 HasTab -> cerr newRow newCol (toSpaceError E.HasTab)
108 HasTab -> cerr newRow newCol (toSpaceError E.HasTab)
110 EndlessMultiComment -> cerr newRow newCol (toSpaceError E.EndlessMultiComment)
109 EndlessMultiComment -> cerr newRow newCol (toSpaceError E.EndlessMultiComment)
111− UnexpectedDocComment -> cerr newRow newCol (toSpaceError E.UnexpectedDocComment)
112
110
113
111
114
112
@@ -119,7 +117,6 @@ data Status
119 = Good
117 = Good
120 | HasTab
118 | HasTab
121 | EndlessMultiComment
119 | EndlessMultiComment
122− | UnexpectedDocComment
123
120
124
121
125eatSpaces :: Ptr Word8 -> Ptr Word8 -> Row -> Col -> (# Status, Ptr Word8, Row, Col #)
122eatSpaces :: Ptr Word8 -> Ptr Word8 -> Row -> Col -> (# Status, Ptr Word8, Row, Col #)
@@ -189,7 +186,7 @@ eatMultiComment pos end row col =
189 else if P.unsafeIndex pos1 == 0x2D {- - -} then
186 else if P.unsafeIndex pos1 == 0x2D {- - -} then
190
187
191 if P.unsafeIndex pos2 == 0x7C {- | -} then
188 if P.unsafeIndex pos2 == 0x7C {- | -} then
192− (# UnexpectedDocComment, pos, row, col #)
189+ (# Good, pos, row, col #)
193 else
190 else
194 let
191 let
195 (# status, newPos, newRow, newCol #) =
192 (# status, newPos, newRow, newCol #) =