Verified Commit 6f9ebc73 authored by Camil Staps's avatar Camil Staps 🙂

Implement idents of PE_UpdateComprehension with PE_Let

This is found for example in module frontend of the compiler:

	# dcl_mods & [module_n].dcl_common = common \\ common <-: ti_common_defs & module_n<-[0..]
parent 5ac8f4cc
......@@ -88,7 +88,10 @@ where
PE_Tuple es -> idents c es
PE_Record init _ fields -> idents c init + idents c [f.bind_dst \\ f <- fields] + idents c [f.bind_src \\ f <- fields]
PE_ArrayPattern eas -> foldr (\x -> (+) (idents c x.bind_src + idents c x.bind_dst)) zero eas
PE_UpdateComprehension base (PE_Update _ sels new) _ qs -> noLocals (idents ICExpression [base,new] + idents ICExpression sels + idents ICPattern qs)
PE_UpdateComprehension base (PE_Update _ sels new) _ qs ->
noLocals (idents ICExpression [base,new] + idents ICExpression sels + idents ICPattern qs)
PE_UpdateComprehension base (PE_Let locals (PE_Update _ sels new)) updateable qs ->
noLocals (idents ICPattern updateable + idents ICExpression [base,new] + idents ICPattern locals + idents ICExpression sels + idents ICPattern qs)
PE_ArrayDenot _ es -> idents c es
PE_Selection _ e s -> idents c e + idents c s
PE_Update b s e -> idents c b + idents c s + idents c e
......
Markdown is supported
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