1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Use the Program rule at the top level.

This commit is contained in:
Rob Rix 2017-04-05 16:17:04 -04:00
parent 25fd886dfb
commit 315c5e6e9b

View File

@ -55,7 +55,8 @@ data Grammar = Program | Uninterpreted | BeginBlock | EndBlock | Undef | Alias |
-- | Assignment from AST in Rubys grammar onto a program in Rubys 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)