Commit d229eed9 authored by Pieter Koopman's avatar Pieter Koopman
Browse files

PK: fix bug with let .. where .. in ..

Now the parser removes the offisde poistions from the stack instead of the scanner.
parent 5f642a7d
......@@ -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
......
......@@ -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}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment