Merge pull request #1 from lethalman/master
Fix parsing of rec sets with reserved keyword
This commit is contained in:
commit
74e1812f74
|
@ -96,10 +96,10 @@ nixIf = Fix <$> (NIf
|
||||||
setLambdaStringOrSym :: Bool -> Parser NExpr
|
setLambdaStringOrSym :: Bool -> Parser NExpr
|
||||||
setLambdaStringOrSym allowLambdas = do
|
setLambdaStringOrSym allowLambdas = do
|
||||||
trace "setLambdaStringOrSym" $ return ()
|
trace "setLambdaStringOrSym" $ return ()
|
||||||
x <- try (lookAhead identifier)
|
isSetOrArgs <- try (lookAhead (reserved "rec") *> pure True) <|>
|
||||||
<|> try (lookAhead (singleton <$> char '{'))
|
try (lookAhead (singleton <$> char '{') *> pure True)
|
||||||
<|> return ""
|
<|> pure False
|
||||||
if x == "rec" || x == "{"
|
if isSetOrArgs
|
||||||
then setOrArgs
|
then setOrArgs
|
||||||
else do
|
else do
|
||||||
trace "might still have a lambda" $ return ()
|
trace "might still have a lambda" $ return ()
|
||||||
|
|
Loading…
Reference in a new issue