1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Assign comments in decorator definitions

This commit is contained in:
Rick Winfrey 2017-08-01 11:53:38 -07:00
parent 1d56e79950
commit 61a34fe866

View File

@ -200,7 +200,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)) <|> many emptyTerm)
decorator' = Declaration.Decorator <$> expression <*> ((<>) <$ symbol ArgumentList <*> children (many expression) <*> many comment <|> many comment)
withStatement :: Assignment
withStatement = symbol WithStatement >>= \ loc -> children (mk loc <$> some with)