Fix parsing of rec sets with reserved keyword
This commit is contained in:
parent
f5ab0e5be4
commit
f8d0496bba
|
@ -89,10 +89,10 @@ nixLet = (Fix .) . NLet
|
|||
setLambdaStringOrSym :: Bool -> Parser NExpr
|
||||
setLambdaStringOrSym allowLambdas = do
|
||||
trace "setLambdaStringOrSym" $ return ()
|
||||
x <- try (lookAhead identifier)
|
||||
<|> try (lookAhead (singleton <$> char '{'))
|
||||
<|> return ""
|
||||
if x == "rec" || x == "{"
|
||||
isSetOrArgs <- try (lookAhead (reserved "rec") *> pure True) <|>
|
||||
try (lookAhead (singleton <$> char '{') *> pure True)
|
||||
<|> pure False
|
||||
if isSetOrArgs
|
||||
then setOrArgs
|
||||
else do
|
||||
trace "might still have a lambda" $ return ()
|
||||
|
|
Loading…
Reference in New Issue