Verified Commit 0e7f534c authored by Camil Staps's avatar Camil Staps 🚀

Implement idents for NodeDefWithLocals

parent 6d2f3a85
implementation module Idents
from Data.Func import $
from Data.List import concatMap
from Data.Set import :: Set, newSet, union, unions, difference, fromList
......@@ -126,13 +127,22 @@ where
instance idents ExprWithLocalDefs
where
idents ICExpression e = noLocals (idents ICExpression e.ewl_locals + idents ICExpression e.ewl_expr)
// NOTE ewl_nodes?
idents ICExpression e = noLocals $
idents ICExpression e.ewl_locals +
idents ICExpression e.ewl_expr +
idents ICExpression e.ewl_nodes
instance idents NodeDefWithLocals
where
idents c ndwl = idents ICPattern ndwl.ndwl_def.bind_dst +
noLocals (idents ICExpression ndwl.ndwl_def.bind_src + idents c ndwl.ndwl_locals)
instance idents GuardedExpr
where
idents ICExpression e = idents ICExpression e.alt_guard + idents ICExpression e.alt_expr
// NOTE alt_nodes?
idents ICExpression e = noLocals $
idents ICExpression e.alt_guard +
idents ICExpression e.alt_expr +
idents ICPattern e.alt_nodes
instance idents CaseAlt
where
......@@ -164,5 +174,3 @@ where
PS_QualifiedRecord _ s _ -> idents c s
PS_Array e -> idents c e
PS_Erroneous -> zero
//import StdMisc
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