From a0322cf6520d6e1416215d18b4f5ff8b89480df4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 13 Apr 2017 10:50:00 -0400 Subject: [PATCH] Clearer error message for children assignment. --- src/Data/Syntax/Assignment.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 427c4c977..820a0d6c3 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -82,6 +82,7 @@ runAssignment = iterFreer (\ assignment yield nodes -> case (assignment, skipAno _ -> Error ["No rule to match " <> show node] (Rule symbol, []) -> Error [ "Expected " <> show symbol <> " but got end of input." ] (Content, []) -> Error [ "Expected leaf node but got end of input." ] + (Children _, []) -> Error [ "Expected branch node but got end of input." ] _ -> Error ["No rule to match at end of input."]) . fmap ((Result .) . flip (,)) where skipAnonymous = dropWhile ((/= Regular) . symbolType . nodeSymbol . roseValue)