language-python
language-python copied to clipboard
A parser for Python 2.x and 3.x written in Haskell
This adds the functionality mentioned in #71 .
There are cases in which `stack build` crashes using the current configuration (#73 ) , but newer GHCs don't display that behaviour. Suggestion : bump to LTS-19.x (== GHC 9.0.2)
``` $ stack build ghc: panic! (the 'impossible' happened) (GHC version 8.2.2 for x86_64-apple-darwin): Prelude.chr: bad argument: 1543503875 Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug -- While building simple...
Please add a change-log (also to the .cabal package).
I just noticed these instances are missing, and would be a valuable addition
Compilation of module `Language.Python.Version3.Parser.Parser` (generated by `happy-1.20`) takes 15 min with GHC 8.0 - 8.4 (on a 2016 macbook pro). This is not a problem with GHC 7.10 or GHC...
Quoter
I needed a Quasiquoter, so I added a simple one (basically a wrapper for [dataToExp](https://hackage.haskell.org/package/template-haskell-2.12.0.0/docs/Language-Haskell-TH-Syntax.html#v:dataToExpQ). I had the existing test running through, with obviously no error, but didn't manage to...
# Summary In python3 (at least on 3.8.10), `star_expression` in comprehension is handled as a parse error. However, version 3 parser can parse the expression. Although this issue may not...
# Summary Assignment expression (https://www.python.org/dev/peps/pep-0572/) is not yet available on language-python. * result on ghci ``` *PyParser> import qualified Language.Python.Version3.Parser as PyParser *PyParser> PyParser.parseExpr "print(x := 2)" "" Left (UnexpectedToken...
combineSrcSpans treats its first argument as the 'start' and second as the 'end', leading to strange behavior like combining (1,1-2) and (1,1) to get (1,1): ``` >>> x = SpanCoLinear...