Skip to content

Commit

Permalink
Add Python to available parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-berbel authored and flbulgarelli committed May 4, 2018
1 parent 4c416b8 commit 21e1ea1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Language/Mulang/Analyzer/Analysis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ data Language
| Java
| JavaScript
| Prolog
| Haskell deriving (Show, Eq, Generic)
| Haskell
| Python deriving (Show, Eq, Generic)

--
-- Analysis Output structures
Expand Down
2 changes: 2 additions & 0 deletions src/Language/Mulang/Analyzer/SampleParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Language.Mulang.Parsers.Haskell
import Language.Mulang.Parsers.JavaScript (parseJavaScript)
import Language.Mulang.Parsers.Prolog (parseProlog)
import Language.Mulang.Parsers.Java (parseJava)
import Language.Mulang.Parsers.Python (parsePython)
import Language.Mulang.Analyzer.Analysis (Sample(..), Language(..))

parseSample :: Sample -> Either String Expression
Expand All @@ -18,3 +19,4 @@ parserFor Haskell = parseHaskell
parserFor Java = parseJava
parserFor JavaScript = maybeToEither parseJavaScript
parserFor Prolog = parseProlog
parserFor Python = parsePython

0 comments on commit 21e1ea1

Please sign in to comment.