mirror of
https://github.com/github/semantic.git
synced 2025-01-02 20:41:38 +03:00
ruby: add Assignment' type so we can remove type constraints
This commit is contained in:
parent
237ffea294
commit
5ff04bebcc
@ -147,14 +147,14 @@ expressions = makeTerm'' <$> location <*> many expression
|
||||
parenthesizedExpressions :: Assignment
|
||||
parenthesizedExpressions = makeTerm'' <$> symbol ParenthesizedStatements <*> children (Syntax.Paren <$> expressions)
|
||||
|
||||
withExtendedScope :: (Enum grammar, Ix grammar, Eq1 ast) => Assignment.Assignment ast grammar a -> Assignment.Assignment ast grammar a
|
||||
withExtendedScope :: Assignment' a -> Assignment' a
|
||||
withExtendedScope inner = do
|
||||
locals <- getRubyLocals
|
||||
result <- inner
|
||||
putRubyLocals locals
|
||||
pure result
|
||||
|
||||
withNewScope :: (Enum grammar, Ix grammar, Eq1 ast) => Assignment.Assignment ast grammar a -> Assignment.Assignment ast grammar a
|
||||
withNewScope :: Assignment' a -> Assignment' a
|
||||
withNewScope inner = withExtendedScope $ do
|
||||
putRubyLocals []
|
||||
inner
|
||||
|
Loading…
Reference in New Issue
Block a user