Fixed a conflict between the old time-related patches and the new alt patches

This commit is contained in:
Neil Brown 2007-09-26 21:39:16 +00:00
parent 769dc3c79a
commit db4f05932b
2 changed files with 5 additions and 1 deletions

View File

@ -367,7 +367,9 @@ statement
<|> block <|> block
<|> each <|> each
<|> runProcess <|> runProcess
<|> try comm <|> do {m <- reserved "now" ; dest <- lvalue ; sSemiColon ; return $ A.GetTime m dest}
<|> try (comm False)
<|> alt
<|> try (do { lv <- lvalue ; op <- assignOp ; exp <- expression ; sSemiColon ; <|> try (do { lv <- lvalue ; op <- assignOp ; exp <- expression ; sSemiColon ;
case op of case op of
(m', Just dyOp) -> return (A.Assign m' [lv] (A.ExpressionList m' [(A.Dyadic m' dyOp (A.ExprVariable (findMeta lv) lv) exp)])) (m', Just dyOp) -> return (A.Assign m' [lv] (A.ExpressionList m' [(A.Dyadic m' dyOp (A.ExprVariable (findMeta lv) lv) exp)]))

View File

@ -628,6 +628,8 @@ tests = TestList
parseTests testAssign, parseTests testAssign,
parseTests testDataType, parseTests testDataType,
parseTests testComm, parseTests testComm,
parseTests testAlt,
parseTests testTime,
parseTests testRun, parseTests testRun,
parseTests testDecl, parseTests testDecl,
parseTests testTopLevelDecl parseTests testTopLevelDecl