mirror of
https://github.com/github/semantic.git
synced 2024-12-29 01:42:43 +03:00
Use a helper to parse block elements.
This commit is contained in:
parent
6949afe608
commit
b9c8e9964f
@ -66,10 +66,13 @@ type Term = Term.Term (Union Syntax) (Record Location)
|
||||
type Assignment = HasCallStack => Assignment.Assignment (Cofree [] (Record (CMark.NodeType ': Location))) Grammar.Grammar Term
|
||||
|
||||
assignment :: Assignment
|
||||
assignment = makeTerm <$> symbol Grammar.Document <*> children (Document <$> many paragraph)
|
||||
assignment = makeTerm <$> symbol Grammar.Document <*> children (Document <$> many blockElement)
|
||||
|
||||
-- Block elements
|
||||
|
||||
blockElement :: Assignment
|
||||
blockElement = paragraph
|
||||
|
||||
paragraph :: Assignment
|
||||
paragraph = makeTerm <$> symbol Grammar.Paragraph <*> children (Paragraph <$> many inlineElement)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user