diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index ba5cbb668..e02b4dacc 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -55,7 +55,8 @@ data Grammar = Program | Uninterpreted | BeginBlock | EndBlock | Undef | Alias | -- | Assignment from AST in Ruby’s grammar onto a program in Ruby’s syntax. assignment :: Assignment Grammar (Program Syntax (Maybe ())) -assignment = foldr (>>) (return Nothing) <$> rule Program +assignment = foldr (>>) (pure Nothing) <$> (rule Program <> children) + comment :: Assignment Grammar (Program Syntax a) comment = wrapU . Comment.Comment <$> (rule Comment <> content)