on master help sign in
Get rid of EndOfFile parse theory
d137cdbEvan Czaplicki
src/Parse/Primitives.hs+3−3
@@ -161,12 +161,12 @@ hint next parser =
161
161
162endOfFile :: Parser ()
162endOfFile :: Parser ()
163endOfFile =
163endOfFile =
164− Parser $ \state@(State _ _ length _ row col ctx) _ _ eok eerr ->
164+ Parser $ \state@(State _ _ length _ _ _ _) _ _ eok eerr ->
165 if length == 0 then
165 if length == 0 then
166− eok () state (expect row col ctx EndOfFile)
166+ eok () state noError
167
167
168 else
168 else
169− eerr (expect row col ctx EndOfFile)
169+ eerr noError
170
170
171
171
172
172
src/Reporting/Error/Syntax.hs−4
@@ -90,7 +90,6 @@ data Theory
90 | CapVar
90 | CapVar
91 | InfixOp
91 | InfixOp
92 | Digit
92 | Digit
93− | EndOfFile
94 | BadSpace
93 | BadSpace
95 deriving (Eq, Ord)
94 deriving (Eq, Ord)
96
95
@@ -760,9 +759,6 @@ theoryToText context theory =
760 Digit ->
759 Digit ->
761 "a digit from 0 to 9"
760 "a digit from 0 to 9"
762
761
763− EndOfFile ->
764− "the end of the file"
765−
766 BadSpace ->
762 BadSpace ->
767 badSpace context
763 badSpace context
768
764