mirror of
https://github.com/github/semantic.git
synced 2024-12-27 17:05:33 +03:00
Define a convenience to construct a Markdown parser.
This commit is contained in:
parent
6af92900ff
commit
79389707fb
@ -62,6 +62,9 @@ rubyParser = AssignmentParser (ASTParser tree_sitter_ruby) headF Ruby.assignment
|
||||
pythonParser :: Parser Python.Term
|
||||
pythonParser = AssignmentParser (ASTParser tree_sitter_python) headF Python.assignment
|
||||
|
||||
markdownParser :: Parser Markdown.Term
|
||||
markdownParser = AssignmentParser MarkdownParser (\ ((nodeType :. location) :< _) -> Just (toGrammar nodeType) :. location) Markdown.assignment
|
||||
|
||||
runParser :: Parser term -> Source -> IO term
|
||||
runParser parser = case parser of
|
||||
ASTParser language -> parseToAST language
|
||||
|
Loading…
Reference in New Issue
Block a user