1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Compile python function decorators and finish milestone #2.

This commit is contained in:
Patrick Thomson 2019-10-11 11:49:52 -04:00
parent c41b9cdc97
commit 2d930aa19f

View File

@ -213,7 +213,7 @@ instance Compile Py.DecoratedDefinition where
tocall <- compile extraChildren pure next
let callit go = (pure lastbound .= (tocall $$ pure lastbound)) >>> go
fmap callit (cc item)
compile definition thenReassign next >>= locate it
locate it <$> compile definition thenReassign next
compile it _ _ = fail ("Can't figure out decorated definition " <> show it)
instance Compile Py.DeleteStatement
instance Compile Py.Dictionary
@ -225,7 +225,7 @@ instance Compile Py.DottedName where
} cc _next = do
let aggregate Py.Identifier { text = inner } x = x ... Name inner
composite = foldr aggregate (pure (Name text)) rest
locate it composite >>= cc
locate it composite & cc
instance Compile Py.Ellipsis