mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
Clearer error message for children assignment.
This commit is contained in:
parent
3de5f3aaf9
commit
a0322cf652
@ -82,6 +82,7 @@ runAssignment = iterFreer (\ assignment yield nodes -> case (assignment, skipAno
|
|||||||
_ -> Error ["No rule to match " <> show node]
|
_ -> Error ["No rule to match " <> show node]
|
||||||
(Rule symbol, []) -> Error [ "Expected " <> show symbol <> " but got end of input." ]
|
(Rule symbol, []) -> Error [ "Expected " <> show symbol <> " but got end of input." ]
|
||||||
(Content, []) -> Error [ "Expected leaf node 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."])
|
_ -> Error ["No rule to match at end of input."])
|
||||||
. fmap ((Result .) . flip (,))
|
. fmap ((Result .) . flip (,))
|
||||||
where skipAnonymous = dropWhile ((/= Regular) . symbolType . nodeSymbol . roseValue)
|
where skipAnonymous = dropWhile ((/= Regular) . symbolType . nodeSymbol . roseValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user