From 76edea13414757a5a897879147e0551867b80e02 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sun, 6 Aug 2017 12:57:28 -0400 Subject: [PATCH] Labels replace expectations. --- src/Data/Syntax/Assignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 6cef82a43..50ffd23cd 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -251,7 +251,7 @@ runAssignment toNode source = (\ assignment state -> go assignment state >>= req Project{} -> Left (makeError node, state) Children{} -> Left (makeError node, state) Source -> Left (makeError node, state) - Label child _ -> go child state >>= uncurry yield + Label child label -> go child state `catchError` (throwError . first (\ err -> err { errorExpected = [Left label] })) >>= uncurry yield state@State{..} = if not (null expectedSymbols) && all ((== Regular) . symbolType) expectedSymbols then dropAnonymous initialState else initialState expectedSymbols = firstSet (assignment `Then` return)