1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Assign wildcard (*) in import from statements

This commit is contained in:
Rick Winfrey 2017-07-10 16:11:03 -07:00
parent bf0f835823
commit d6e1017117

View File

@ -133,6 +133,7 @@ statement = assertStatement
<|> returnStatement <|> returnStatement
<|> tryStatement <|> tryStatement
<|> whileStatement <|> whileStatement
<|> wildcardImport
<|> withStatement <|> withStatement
expressionStatement :: Assignment expressionStatement :: Assignment
@ -358,6 +359,9 @@ importFrom = makeTerm <$> symbol ImportFromStatement <*> children (Declaration.I
importAlias :: Assignment importAlias :: Assignment
importAlias = makeTerm <$> symbol AliasedImport <*> children (flip Statement.Let <$> expression <*> expression <*> emptyTerm) importAlias = makeTerm <$> symbol AliasedImport <*> children (flip Statement.Let <$> expression <*> expression <*> emptyTerm)
wildcardImport :: Assignment
wildcardImport = makeTerm <$> symbol WildcardImport <*> (Syntax.Identifier <$> source)
assertStatement :: Assignment assertStatement :: Assignment
assertStatement = makeTerm <$ symbol AssertStatement <*> location <*> children (Expression.Call <$> (makeTerm <$> symbol AnonAssert <*> (Syntax.Identifier <$> source)) <*> many expression) assertStatement = makeTerm <$ symbol AssertStatement <*> location <*> children (Expression.Call <$> (makeTerm <$> symbol AnonAssert <*> (Syntax.Identifier <$> source)) <*> many expression)