From 7aee07b3ec6a59ae3f60e4072ffdaacd6e14f5f9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 2 Oct 2019 11:24:37 -0400 Subject: [PATCH] List all the canonical parsers. --- src/Parsing/Parser.hs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/Parsing/Parser.hs b/src/Parsing/Parser.hs index 09723f2a7..22f6e5520 100644 --- a/src/Parsing/Parser.hs +++ b/src/Parsing/Parser.hs @@ -40,6 +40,7 @@ module Parsing.Parser , typescriptParser' -- * Canonical sets of parsers , aLaCarteParsers +, allParsers ) where import Assigning.Assignment @@ -278,3 +279,31 @@ aLaCarteParsers = , typescriptParser' , tsxParser' ] + +allParsers + :: ( c (Term (Sum Go.Syntax)) + , c (Term (Sum Haskell.Syntax)) + , c (Term (Sum JSON.Syntax)) + , c (Term (Sum Markdown.Syntax)) + , c (Term (Sum PHP.Syntax)) + , c (Term (Sum Python.Syntax)) + , c Py.Term + , c (Term (Sum Ruby.Syntax)) + , c (Term (Sum TSX.Syntax)) + , c (Term (Sum TypeScript.Syntax)) + ) + => PerLanguageModes + -> [(Language, SomeParser c Loc)] +allParsers modes = + [ goParser' + , haskellParser' + , javascriptParser' + , jsonParser' + , jsxParser' + , markdownParser' + , phpParser' + , pythonParser' modes + , rubyParser' + , typescriptParser' + , tsxParser' + ]