1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Any statement as parameter

This commit is contained in:
Timothy Clem 2017-07-07 15:16:51 -07:00
parent 2235b5a614
commit 96910c7d55

View File

@ -192,13 +192,13 @@ scopeResolution = makeTerm <$> symbol ScopeResolution <*> children (Expression.S
parameter :: Assignment parameter :: Assignment
parameter = parameter =
identifier mk SplatParameter
<|> mk SplatParameter
<|> mk HashSplatParameter <|> mk HashSplatParameter
<|> mk BlockParameter <|> mk BlockParameter
<|> mk KeywordParameter <|> mk KeywordParameter
<|> mk OptionalParameter <|> mk OptionalParameter
<|> makeTerm <$> symbol DestructuredParameter <*> children (many parameter) <|> makeTerm <$> symbol DestructuredParameter <*> children (many parameter)
<|> statement
where mk s = makeTerm <$> symbol s <*> (Syntax.Identifier <$> source) where mk s = makeTerm <$> symbol s <*> (Syntax.Identifier <$> source)
method :: Assignment method :: Assignment