From 9c9f43d4e9b783233c37fead37e0f231734dd077 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Thu, 13 Jul 2017 15:22:01 -0700 Subject: [PATCH] Assign Decorators with no ArgumentList --- src/Language/Python/Syntax.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/Python/Syntax.hs b/src/Language/Python/Syntax.hs index 657ca256b..fd94c19d7 100644 --- a/src/Language/Python/Syntax.hs +++ b/src/Language/Python/Syntax.hs @@ -193,7 +193,7 @@ decoratedDefinition = symbol DecoratedDefinition *> children (makeDecorator <$> where makeDecorator (loc, partialDecorator') next = makeTerm loc (partialDecorator' next) partialDecorator = (,) <$> symbol Decorator <*> children decorator' - decorator' = Declaration.Decorator <$> expression <* symbol ArgumentList <*> children (many expression <|> many emptyTerm) + decorator' = Declaration.Decorator <$> expression <*> ((symbol ArgumentList *> children (many expression <|> many emptyTerm)) <|> many emptyTerm) withStatement :: Assignment withStatement = makeTerm <$> symbol WithStatement <*> children (uncurry Statement.Let . swap <$> (symbol WithItem *> children ((,) <$> identifier <*> identifier)) <*> expression)