mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
🔥 withParser.
This commit is contained in:
parent
f970aeddc7
commit
2e7da5e2c1
@ -3,7 +3,6 @@ module Parser
|
||||
( Parser(..)
|
||||
, SomeParser(..)
|
||||
, someParser
|
||||
, withParser
|
||||
, ApplyAll
|
||||
-- Syntax parsers
|
||||
, syntaxParserForLanguage
|
||||
@ -88,9 +87,6 @@ someParser _ Python = Just (SomeParser pythonParser)
|
||||
someParser _ Ruby = Just (SomeParser rubyParser)
|
||||
someParser _ TypeScript = Just (SomeParser typescriptParser)
|
||||
|
||||
withParser :: SomeParser typeclasses ann -> (forall syntax . ApplyAll typeclasses syntax => Parser (Term syntax ann) -> a) -> a
|
||||
withParser (SomeParser parser) with = with parser
|
||||
|
||||
-- | Return a 'Language'-specific 'Parser', if one exists.
|
||||
syntaxParserForLanguage :: Language -> Maybe (Parser (Term Syntax (Record DefaultFields)))
|
||||
syntaxParserForLanguage language = case language of
|
||||
|
Loading…
Reference in New Issue
Block a user