1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

ruby: make parameter assignment more strict in accepted symbols

This commit is contained in:
Charlie Somerville 2018-04-11 15:05:39 +10:00
parent c5be01e8a0
commit d08c675318

View File

@ -229,13 +229,14 @@ scopeResolution = makeTerm <$> symbol ScopeResolution <*> children (Expression.S
parameter :: Assignment parameter :: Assignment
parameter = parameter =
mk SplatParameter mk Identifier
<|> mk Identifier'
<|> 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)
<|> expression
where mk s = makeTerm <$> symbol s <*> (Syntax.Identifier . name <$> source) where mk s = makeTerm <$> symbol s <*> (Syntax.Identifier . name <$> source)
method :: Assignment method :: Assignment