X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=src%2Fparse.icl;h=9f43314540375c01bdcd952e3dab9564dcf805d7;hb=4c779c9791b03d96a76956e314cbc95f056448ce;hp=c28fb4c58df52ad57313e88bde5ca8869101af58;hpb=8c3da7a503f87783e3614254649ed8c04eb0d519;p=cc1516.git diff --git a/src/parse.icl b/src/parse.icl index c28fb4c..9f43314 100644 --- a/src/parse.icl +++ b/src/parse.icl @@ -175,7 +175,7 @@ trans1 t r = trans2 t $ const r derive gPrint TokenValue derive gEq TokenValue satTok :: TokenValue -> Parser Token Token -satTok t = top >>= \tok=:(pos, tv) -> if (eq t tok) (return tok) (fail (printToString t, pos)) +satTok t = top >>= \tok=:(pos, tv) -> if (eq t tok) (return tok) (fail (printToString tv, pos)) where eq (IdentToken _) (_, IdentToken _) = True eq (NumberToken _) (_, NumberToken _) = True