Fix freezing on bare ')' with alternative layout rule (#8431)
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 12 Oct 2013 02:15:17 +0000 (04:15 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 12 Oct 2013 02:16:15 +0000 (04:16 +0200)
Patch by errge

compiler/parser/Lexer.x

index 18a9e53..63ee1f7 100644 (file)
@@ -2265,7 +2265,7 @@ alternativeLayoutRuleToken t
                  [] ->
                      do let ls = if isALRopen u
                                     then [ALRNoLayout (containsCommas u) False]
-                                    else ls
+                                    else []
                         setALRContext ls
                         -- XXX This is an error in John's code, but
                         -- it looks reachable to me at first glance