1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Don't detect locals on rhs

This commit is contained in:
Timothy Clem 2020-01-10 13:01:55 -08:00
parent 9cd8717cc2
commit 3d04836a8a

View File

@ -398,7 +398,7 @@ assignment' = makeTerm <$> symbol Assignment <*> children (Ruby.Syntax.
assign c l r = inject (Statement.AugmentedAssignment (makeTerm1 (c l r))) assign c l r = inject (Statement.AugmentedAssignment (makeTerm1 (c l r)))
lhs = makeTerm <$> symbol LeftAssignmentList <*> children (many expr) <|> expr lhs = makeTerm <$> symbol LeftAssignmentList <*> children (many expr) <|> expr
rhs = makeTerm <$> symbol RightAssignmentList <*> children (many expr) <|> expr rhs = makeTerm <$> symbol RightAssignmentList <*> children (many expression) <|> expression
expr = makeTerm <$> symbol RestAssignment <*> restAssign expr = makeTerm <$> symbol RestAssignment <*> restAssign
<|> makeTerm <$> symbol DestructuredLeftAssignment <*> children (many expr) <|> makeTerm <$> symbol DestructuredLeftAssignment <*> children (many expr)
<|> lhsIdent <|> lhsIdent