1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00

Compile not statements.

This commit is contained in:
Patrick Thomson 2019-12-17 13:25:59 -05:00
parent e7c7910760
commit 9d0afb4f0a

View File

@ -350,7 +350,11 @@ instance Compile Py.None where
compile _it cc _ = cc (prelude ["None"])
instance Compile Py.NonlocalStatement
instance Compile Py.NotOperator
instance Compile Py.NotOperator where
compile _it@Py.NotOperator{ argument } cc next = do
val <- compile argument pure next
cc (prelude ["not"] $$ val)
instance Compile Py.ParenthesizedExpression where
compile it@Py.ParenthesizedExpression { extraChildren } cc