1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 08:54:14 +03:00

Use emptyTerm when constructing lambdas.

This commit is contained in:
Rob Rix 2017-10-06 10:48:37 -04:00
parent f86fcf32cd
commit f22ed8fb9d

View File

@ -236,7 +236,7 @@ singletonMethod = makeTerm <$> symbol SingletonMethod <*> children (Declaration.
lambda :: Assignment
lambda = symbol Lambda >>= \ loc -> children $ do
name <- makeTerm loc <$> (Syntax.Empty <$ source)
name <- emptyTerm
params <- (symbol BlockParameters <|> symbol LambdaParameters) *> children (many parameter) <|> pure []
body <- expressions
pure $ makeTerm loc (Declaration.Function [] name params body)