From dfc89878c309213e0adca7c764efd293c1ac11b9 Mon Sep 17 00:00:00 2001 From: pieter Date: Thu, 12 Feb 2004 10:49:40 +0000 Subject: PK: fix bug with let .. where .. in .. Now the parser removes the offisde poistions from the stack instead of the scanner. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1447 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/parse.icl | 3 ++- frontend/scanner.icl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/parse.icl b/frontend/parse.icl index f89af28..1204a1e 100644 --- a/frontend/parse.icl +++ b/frontend/parse.icl @@ -3783,7 +3783,8 @@ wantEndLocals pState | ss_useLayout = case token of EndGroupToken -> pState - InToken -> tokenBack pState // For let expressions with cases + InToken -> tokenBack (appScanState dropOffsidePosition pState) // PK + // InToken -> tokenBack pState // For let expressions with cases _ -> parseError "local definitions" (Yes token) "end of locals with layout" pState // ~ ss_useLayout | token == CurlyCloseToken diff --git a/frontend/scanner.icl b/frontend/scanner.icl index 33f9081..dfff877 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -1671,7 +1671,8 @@ checkOffside pos index token scanState=:{ss_offsides,ss_scanOptions,ss_input} = (newToken, scanState) // -->> ("new offsides",new_offsides) = gen_end_groups (dec n) scanState | token == InToken - = (token, { scanState & ss_offsides = tl ss_offsides }) +// = (token, { scanState & ss_offsides = tl ss_offsides }) + = (token, scanState) // PK: parser removes offsides = newOffside token scanState where newOffside token scanState=:{ss_offsides,ss_scanOptions} -- cgit v1.2.3