Commit 8db0719d authored by Camil Staps's avatar Camil Staps 🐧

Clean.PrettyPrint: Implement PE_ArrayPattern; verify PE_UpdateComprehension

parent e0b932b1
......@@ -68,7 +68,7 @@ where
sel = case psk of
ParsedNormalSelector = "."
(ParsedUniqueSelector _) = "!"
print st (PE_UpdateComprehension base (PE_Update _ sels new) _ qs) //TODO verify
print st (PE_UpdateComprehension base (PE_Update _ sels new) _ qs)
= print st ("{" :+: base :+: " & " :+: printParsedSelections st sels :+: "=" :+: new :+: " \\\\ " :+: join st ", " qs :+: "}")
print st (PE_ArrayCompr ak pe qs)
= print st ("{" :+: ak :+: pe :+: " \\\\ " :+: join st ", " qs :+: "}")
......@@ -85,7 +85,8 @@ where
= printp st ("dynamic " :+: pe)
print st (PE_Generic id k)
= print st (id :+: "{|" :+: k :+: "|}")
// | PE_ArrayPattern ![ElemAssignment]
print st (PE_ArrayPattern eas)
= print st ("{" :+: join st "," eas :+: "}")
print st (PE_Matches _ e p _)
= print st (e :+: "=:(" :+: p :+: ")")
// | PE_Any_Code !(CodeBinding Ident) !(CodeBinding Ident) ![String]
......@@ -151,6 +152,10 @@ where
print _ StrictArray = "!"
print _ UnboxedArray = "#"
instance print ElemAssignment
where
print st b = print st ("[" :+: join st "," b.bind_dst :+: "]=" :+: b.bind_src)
// Records
instance print FieldAssignment
where
......
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