Allow parsing 'time ( foo )'

This commit is contained in:
Vidar Holen 2016-03-19 16:13:54 -07:00
parent 459e30804f
commit 2957fb64c9
1 changed files with 2 additions and 0 deletions

View File

@ -1698,6 +1698,7 @@ readTermOrNone = do
eof eof
return [] return []
prop_readTerm = isOk readTerm "time ( foo; bar; )"
readTerm = do readTerm = do
allspacing allspacing
m <- readAndOr m <- readAndOr
@ -2051,6 +2052,7 @@ readFunctionDefinition = called "function" $ do
readWithoutFunction = try $ do readWithoutFunction = try $ do
id <- getNextId id <- getNextId
name <- readFunctionName name <- readFunctionName
guard $ name /= "time" -- Interfers with time ( foo )
spacing spacing
readParens readParens
return $ T_Function id (FunctionKeyword False) (FunctionParentheses True) name return $ T_Function id (FunctionKeyword False) (FunctionParentheses True) name