mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Compile python function decorators and finish milestone #2.
This commit is contained in:
parent
c41b9cdc97
commit
2d930aa19f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user