tools/PascalParser.hs
changeset 6387 3dcb839b5904
parent 6386 7d7703b26bda
child 6388 14718b2685a3
--- a/tools/PascalParser.hs	Wed Nov 16 19:25:25 2011 +0300
+++ b/tools/PascalParser.hs	Wed Nov 16 20:42:45 2011 +0300
@@ -482,12 +482,12 @@
 withBlock = do
     try $ string "with"
     comments
-    (r:rs) <- (commaSep1 pas) reference
+    rs <- (commaSep1 pas) reference
     comments
     string "do"
     comments
     o <- phrase
-    return $ WithBlock r (foldl (\ph r -> WithBlock r ph) o rs)
+    return $ foldr WithBlock o rs
     
 repeatCycle = do
     try $ string "repeat"