From db4f05932b4982c084b330ed193ad23e801df11a Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 26 Sep 2007 21:39:16 +0000 Subject: [PATCH] Fixed a conflict between the old time-related patches and the new alt patches --- frontends/ParseRain.hs | 4 +++- frontends/ParseRainTest.hs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontends/ParseRain.hs b/frontends/ParseRain.hs index 9091548..21d3071 100644 --- a/frontends/ParseRain.hs +++ b/frontends/ParseRain.hs @@ -367,7 +367,9 @@ statement <|> block <|> each <|> 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 ; case op of (m', Just dyOp) -> return (A.Assign m' [lv] (A.ExpressionList m' [(A.Dyadic m' dyOp (A.ExprVariable (findMeta lv) lv) exp)])) diff --git a/frontends/ParseRainTest.hs b/frontends/ParseRainTest.hs index 1561bc7..b01cb87 100644 --- a/frontends/ParseRainTest.hs +++ b/frontends/ParseRainTest.hs @@ -628,6 +628,8 @@ tests = TestList parseTests testAssign, parseTests testDataType, parseTests testComm, + parseTests testAlt, + parseTests testTime, parseTests testRun, parseTests testDecl, parseTests testTopLevelDecl