1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 10:27:45 +03:00

Assign Decorators with no ArgumentList

This commit is contained in:
Rick Winfrey 2017-07-13 15:22:01 -07:00
parent 08560875b6
commit 9c9f43d4e9

View File

@ -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)