From d6e101711710ca8e87cb21bc3aa3c3e352662b29 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Mon, 10 Jul 2017 16:11:03 -0700 Subject: [PATCH] Assign wildcard (*) in import from statements --- src/Language/Python/Syntax.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Language/Python/Syntax.hs b/src/Language/Python/Syntax.hs index 03ecca3f3..3c952c3ed 100644 --- a/src/Language/Python/Syntax.hs +++ b/src/Language/Python/Syntax.hs @@ -133,6 +133,7 @@ statement = assertStatement <|> returnStatement <|> tryStatement <|> whileStatement + <|> wildcardImport <|> withStatement expressionStatement :: Assignment @@ -358,6 +359,9 @@ importFrom = makeTerm <$> symbol ImportFromStatement <*> children (Declaration.I importAlias :: Assignment importAlias = makeTerm <$> symbol AliasedImport <*> children (flip Statement.Let <$> expression <*> expression <*> emptyTerm) +wildcardImport :: Assignment +wildcardImport = makeTerm <$> symbol WildcardImport <*> (Syntax.Identifier <$> source) + assertStatement :: Assignment assertStatement = makeTerm <$ symbol AssertStatement <*> location <*> children (Expression.Call <$> (makeTerm <$> symbol AnonAssert <*> (Syntax.Identifier <$> source)) <*> many expression)