1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00

Refactor withStatement to avoid a bind.

This commit is contained in:
Rob Rix 2017-08-08 14:54:40 -04:00
parent 26bf05bd30
commit e684907c9e

View File

@ -207,7 +207,7 @@ argumentList :: Assignment
argumentList = makeTerm <$> symbol ArgumentList <*> children (many expression)
withStatement :: Assignment
withStatement = symbol WithStatement >>= \ loc -> children (mk loc <$> some with)
withStatement = mk <$> symbol WithStatement <*> children (some with)
where
mk _ [child] = child
mk l children = makeTerm l children