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:
parent
25fd886dfb
commit
315c5e6e9b
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user