diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 9bc1b46cb..f324f9ced 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -102,8 +102,8 @@ runAssignment :: (Symbol grammar, Eq grammar, Show grammar) => Assignment (Node runAssignment = iterFreer (\ assignment yield offset source nodes -> case (assignment, dropAnonymous nodes) of -- Nullability: some rules, e.g. 'pure a' and 'many a', should match at the end of input. Either side of an alternation may be nullable, ergo Alt can match at the end of input. (Alt a b, nodes) -> yield a offset source nodes <|> yield b offset source nodes -- FIXME: Symbol `Alt` Symbol `Alt` Symbol is inefficient, should build and match against an IntMap instead. - (assignment, subtree@(Rose (nodeSymbol :. range :. sourceSpan :. Nil) children) : rest) -> case assignment of - Get -> yield (nodeSymbol :. range :. sourceSpan :. Nil) offset source nodes + (assignment, subtree@(Rose node children) : rest) -> case assignment of + Get -> yield node offset source nodes Source -> yield "" offset source rest Children childAssignment -> do c <- assignAllFrom childAssignment offset source children