Get rid of EndOfFile parse theory
It just cluttered up the error messages, making them more confusing
overall.
commitd137cdba2bf37ceae1793756a1856485be5df9ce
authorEvan Czaplicki <evancz@users.noreply.github.com>
dateThu 15 Dec 2016, 21:52 (10 years ago)
parent294ee07
src/Parse/Primitives.hs+3−3
@@ -161,12 +161,12 @@ hint next parser =
161161
162162endOfFile :: Parser ()
163163endOfFile =
164− Parser $ \state@(State _ _ length _ row col ctx) _ _ eok eerr ->
164+ Parser $ \state@(State _ _ length _ _ _ _) _ _ eok eerr ->
165165 if length == 0 then
166− eok () state (expect row col ctx EndOfFile)
166+ eok () state noError
167167
168168 else
169− eerr (expect row col ctx EndOfFile)
169+ eerr noError
170170
171171
172172
src/Reporting/Error/Syntax.hs−4
@@ -90,7 +90,6 @@ data Theory
9090 | CapVar
9191 | InfixOp
9292 | Digit
93− | EndOfFile
9493 | BadSpace
9594 deriving (Eq, Ord)
9695
@@ -760,9 +759,6 @@ theoryToText context theory =
760759 Digit ->
761760 "a digit from 0 to 9"
762761
763− EndOfFile ->
764− "the end of the file"
765−
766762 BadSpace ->
767763 badSpace context
768764