[project @ 1999-07-06 15:21:57 by simonmar]
authorsimonmar <unknown>
Tue, 6 Jul 1999 15:21:57 +0000 (15:21 +0000)
committersimonmar <unknown>
Tue, 6 Jul 1999 15:21:57 +0000 (15:21 +0000)
only pop explicit layout contexts with '}'.

ghc/compiler/parser/Lex.lhs

index efcda1b..72b31c5 100644 (file)
@@ -522,8 +522,8 @@ lexToken cont glaexts buf =
 
     '}'# -> \ s@PState{context = ctx} ->
            case ctx of 
-               (_:ctx') -> cont ITccurly (incLexeme buf) s{context=ctx'}
-               _ -> lexError "too many '}'s" buf s
+               (NoLayout:ctx') -> cont ITccurly (incLexeme buf) s{context=ctx'}
+               _               -> lexError "too many '}'s" buf s
 
     '#'# -> case lookAhead# buf 1# of
                ')'#  | flag glaexts -> cont ITcubxparen (setCurrentPos# buf 2#)